dmlc / minpy

NumPy interface with mixed backend execution
https://minpy.readthedocs.io/en/latest/
Other
1.11k stars 112 forks source link

cannot use minpy.numpy.newaxis? #189

Open Grayscale-cc opened 4 years ago

Grayscale-cc commented 4 years ago

import minpy.numpy as np a = np.zeros((3,3)) b = a[:, :, np.newaxis]

The following error occurred when I executed the above code: b = a[:, :, np.newaxis] File "/home/ai/anaconda3/envs/mask/lib/python3.6/site-packages/minpy/array.py", line 440, in getitem np_index = tuple(_make_numpy_index(i) for i in index) File "/home/ai/anaconda3/envs/mask/lib/python3.6/site-packages/minpy/array.py", line 440, in np_index = tuple(_make_numpy_index(i) for i in index) File "/home/ai/anaconda3/envs/mask/lib/python3.6/site-packages/minpy/array.py", line 493, in _make_numpy_index np_index = wrap(raw_index).asnumpy() AttributeError: 'NoneType' object has no attribute 'asnumpy'.

Is there no newaxis in minpy now?