xnd-project / libxnd

Subsumed into xnd
https://xnd.io/
BSD 3-Clause "New" or "Revised" License
80 stars 12 forks source link

`xnd.xnd(numpy_array)` fails. #47

Closed hameerabbasi closed 4 years ago

hameerabbasi commented 4 years ago

This used to work before:

>>> x = np.arange(5)
>>> y = xnd.array(x)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/habbasi/miniconda3/envs/uarray/lib/python3.7/site-packages/xnd/__init__.py", line 126, in __new__
    type = typeof(value)
  File "/home/habbasi/miniconda3/envs/uarray/lib/python3.7/site-packages/xnd/__init__.py", line 185, in typeof
    return _typeof(v, dtype=dtype, shortcut=True)
ValueError: type inference failed