You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/02/24 06:03:12 UTC

[GitHub] reminisce commented on issue #14105: nd.slice errors out when end=-1 and step=-1

reminisce commented on issue #14105: nd.slice errors out when end=-1 and step=-1
URL: https://github.com/apache/incubator-mxnet/issues/14105#issuecomment-466737500
 
 
   According to numpy, this should return an empty array. Since MXNet does not support emtpy array in computation, it simply throws exception. So there is nothing wrong for now until we support empty arrays which has been planned.
   ```python
   >>> import numpy as np
   >>> data = np.random.uniform(size=(4,))
   >>> data
   array([0.19584417, 0.05437645, 0.73802081, 0.20259332])
   >>> data[2:-1:-1]
   array([], dtype=float64)
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services