access2rohit opened a new issue #16216: Inconsistent behaviour nd.argmax 
against np.argmax when there are 'nans' in data
URL: https://github.com/apache/incubator-mxnet/issues/16216
 
 
   >>> import mxnet as mx
   >>> import mxnet.ndarray as nd
   >>> x = np.array([[1,5,3],[float('nan'), 2,6]])
   >>> x
   array([[ 1.,  5.,  3.],
          [nan,  2.,  6.]])
   >>> y = nd.array(x)
   shape=(2, 3)
   [14:05:53] src/c_api/c_api.cc:190: MXNDArrayCreateExInt64 shape=2
   >>> nd.argmax(y, axis=0)
   [0. 0. 1.]
   <NDArray 3 @cpu(0)>
   >>> nd.argmax(y, axis=1)
   [1. 2.]
   <NDArray 2 @cpu(0)>
   >>> import numpy as np
   >>> np.argmax(x, axis=0)
   array([1, 0, 1])
   >>> np.argmax(x, axis=1)
   array([1, 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:
[email protected]


With regards,
Apache Git Services

Reply via email to