Several solutions using numpy in py.checkiO seem to fail due to server problems (I suppose). For example, the solution for Escher 4 The Stone Wall (working fine on local pc and using on-site "Run")
from numpy import transpose, zeros, argmax
def stone_wall(s):
s1=s.strip().split("\n")
T=zeros((len(s1),len(s1[0])))
for i in range(len(s1)):
for j in range(len(s1[0])):
T[i][j]=s1[i][j].isdigit()
T1=transpose(T)
T2=[]
for i in T1:
T2.append(sum(i))
return argmax(T2)
"check" on py.scheckio.org returns:
Traceback (most recent call last):, File "/home/site/checkio/runners/py32.py", line 252, in echosendrecvjson, datasend = json.dumps(send), File "/usr/local/lib/python3.8/json/init.py", line 231, in dumps, return defaultencoder.encode(obj), File "/usr/local/lib/python3.8/json/encoder.py", line 199, in encode, chunks = self.iterencode(o, oneshot=True), File "/usr/local/lib/python3.8/json/encoder.py", line 257, in iterencode, return iterencode(o, 0), File "/usr/local/lib/python3.8/json/encoder.py", line 179, in default, raise TypeError(f'Object of type {o.class.name} ',TypeError: Object of type int64 is not JSON serializable,,During handling of the above exception, another exception occurred:,,Traceback (most recent call last):, File "/home/site/checkio/runners/py32.py", line 486, in <module>, rundata = echosendrecvjson(globals()'do' + rundata['do']), File "/home/site/checkio/runners/py32.py", line 255, in echosendrecvjson, error = u'TypeError: {0} is wrong data type'.format(cgi.escape(str(type(result)))),AttributeError: module 'cgi' has no attribute 'escape',
Is that an expected behavior? As far as I understand, numpy is supported.
From: https://py.checkio.org/mission/the-stone-wall/solve/
HTTP_USER_AGENT:
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 YaBrowser/19.9.0.1343 Yowser/2.5 Safari/537.36
Created at: 2019/09/13 14:47; Updated at: 2019/09/13 15:32
The question is resolved.