reminisce commented on a change in pull request #17391: fix issue #17389: 
Indexing ndarray should give empty array output
URL: https://github.com/apache/incubator-mxnet/pull/17391#discussion_r375647542
 
 

 ##########
 File path: python/mxnet/ndarray/ndarray.py
 ##########
 @@ -3110,9 +3110,9 @@ def _get_index_range(start, stop, length, step=1):
     elif stop < 0:
         stop += length
         if stop < 0:
-            raise IndexError('Slicing stop %d exceeds limit of %d' % 
(stop-length, length))
+            stop = 0
 
 Review comment:
   Should `stop` be -1? Otherwise, a[0] will not be included in the sliced 
array.

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