You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pointer(.) of struct array causes CPython to yield error, "Type dtype('O') not implemented" #1817
$ python /var/tmp/main.py
Traceback (most recent call last):
File "/var/tmp/main.py", line 13, in <module>
main()
File "/var/tmp/main.py", line 11, in main
pointer(foos)
File "/home/dylon/Workspace/lpython/src/runtime/lpython/lpython.py", line 446, in pointer
return x.ctypes.data_as(ctypes.POINTER(convert_numpy_dtype_to_ctype(x.dtype)))
File "/home/dylon/Workspace/lpython/src/runtime/lpython/lpython.py", line 291, in convert_numpy_dtype_to_ctype
raise NotImplementedError("Type %r not implemented" % arg)
NotImplementedError: Type dtype('O') not implemented
A solution seems to be to add the dtype to convert_numpy_dtype_to_ctype:
Activity
czgdp1807 commentedon May 17, 2023
Explained in #1814 (comment) and #1822 (comment)