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/05/08 18:34:16 UTC

[GitHub] [incubator-mxnet] sandeep-krishnamurthy commented on issue #14777: An error occurred when the end parameter was set to a negative value in SliceAxis Op

sandeep-krishnamurthy commented on issue #14777: An error occurred when the end parameter was set to a negative value in SliceAxis Op
URL: https://github.com/apache/incubator-mxnet/issues/14777#issuecomment-490600669
 
 
   Unable to reproduce.
   ```python
   >>> x = nd.ones((3,4))
   >>> x.shape
   (3, 4)
   >>> x
   
   [[1. 1. 1. 1.]
    [1. 1. 1. 1.]
    [1. 1. 1. 1.]]
   <NDArray 3x4 @cpu(0)>
   >>> nd.slice_axis(x, axis=1, begin=-3, end=-1)
   
   [[1. 1.]
    [1. 1.]
    [1. 1.]]
   <NDArray 3x2 @cpu(0)>
   >>> nd.slice_axis(x, axis=1, begin=1, end=-1)
   
   [[1. 1.]
    [1. 1.]
    [1. 1.]]
   <NDArray 3x2 @cpu(0)>
   ```
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services