mseth10 edited a comment on issue #14105: nd.slice errors out when end=-1 and 
step=-1
URL: 
https://github.com/apache/incubator-mxnet/issues/14105#issuecomment-473018735
 
 
   According to numpy,
   To include element 0, slice down to None, or just omit that bound.
   ```python
   >>> data = np.random.uniform(size=(4,))
   >>> data
   array([0.39041899, 0.65619514, 0.79147856, 0.71647746])
   >>> data[2:None:-1]
   array([0.79147856, 0.65619514, 0.39041899])
   >>> data[2::-1]
   array([0.79147856, 0.65619514, 0.39041899])
   ```

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