wkcn commented on issue #19941:
URL:
https://github.com/apache/incubator-mxnet/issues/19941#issuecomment-782773657
Thank you for the report!
I reproduce it on MXNet 2.0.
It is an invalid input, and NumPy will raise an exception.
```python
>>> np.take(a = np.ones(0), indices=np.array([3, 8, 19, 2]))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<__array_function__ internals>", line 5, in take
File "/usr/lib/python3.9/site-packages/numpy/core/fromnumeric.py", line
191, in take
return _wrapfunc(a, 'take', indices, axis=axis, out=out, mode=mode)
File "/usr/lib/python3.9/site-packages/numpy/core/fromnumeric.py", line
58, in _wrapfunc
return bound(*args, **kwds)
IndexError: cannot do a non-empty take from an empty axes.
```
However, the invalid input makes the program crash on MXNet.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]