eric-haibin-lin opened a new issue #15933: indexing op does not report out of 
bound indices 
URL: https://github.com/apache/incubator-mxnet/issues/15933
 
 
   out of bound error is reported in numpy: 
   ```
   >>> import numpy as np
   >>> np.ones((1,))[[10]]
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
   IndexError: index 10 is out of bounds for axis 0 with size 1
   >>>
   ```
   
   but MXNet does not: 
   
   ```
   >>> import mxnet as mx
   >>> mx.nd.ones((1,))[[10]]
   [6.4e-44]
   <NDArray 1 @cpu(0)>
   ```
   
   We can reuse the kernel in ` nd.take(mode='raise') ` to report such an 
error. 
   
   @reminisce @haojin2 @hhexiy  

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to