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 2020/04/22 10:20:04 UTC

[GitHub] [incubator-mxnet] acphile opened a new issue #18137: [Numpy] different behaviours between numpy and mxnet.numpy

acphile opened a new issue #18137:
URL: https://github.com/apache/incubator-mxnet/issues/18137


   ### operator between different types
   for example
   ```
   import mxnet as mx
   mx.npx.set_np()
   mx.np.arange(5)
   array([0., 1., 2., 3., 4.])
   b=mx.np.arange(5)
   a=b.astype('int32')
   a==b
   ```
   it will raise Error:
   ```
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
     File "/home/ubuntu/incubator-mxnet/python/mxnet/numpy/multiarray.py", line 991, in __eq__
       return equal(self, other)
     File "/home/ubuntu/incubator-mxnet/python/mxnet/numpy/multiarray.py", line 8451, in equal
       return _mx_nd_np.equal(x1, x2, out)
     File "/home/ubuntu/incubator-mxnet/python/mxnet/ndarray/numpy/_op.py", line 6622, in equal
       return _api_internal.equal(x1, x2, out)
     File "/home/ubuntu/incubator-mxnet/python/mxnet/_ffi/_ctypes/function.py", line 115, in __call__
       raise get_last_ffi_error()
   mxnet.base.MXNetError: MXNetError: Type inconsistent, Provided = float32, inferred type = int32
   ```
   But numpy supports equal operation between different types
   
   ### fail to use mxnet.numpy.prod(a.shape)
   ```
   >>> mx.np.prod(a.shape)
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
     File "<string>", line 31, in prod
   AssertionError: Argument a must have NDArray type, but got (5,)
   ```
   while numpy supports that.
   
   ### mxnet.numpy.ndarray.diagonal() is not supported


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



[GitHub] [incubator-mxnet] yzhliu commented on issue #18137: [Numpy] different behaviours between numpy and mxnet.numpy

Posted by GitBox <gi...@apache.org>.
yzhliu commented on issue #18137:
URL: https://github.com/apache/incubator-mxnet/issues/18137#issuecomment-638504536


   As they been well tracked by separate issues, I will close this issue.


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



[GitHub] [incubator-mxnet] yzhliu closed issue #18137: [Numpy] different behaviours between numpy and mxnet.numpy

Posted by GitBox <gi...@apache.org>.
yzhliu closed issue #18137:
URL: https://github.com/apache/incubator-mxnet/issues/18137


   


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



[GitHub] [incubator-mxnet] leezu commented on issue #18137: [Numpy] different behaviours between numpy and mxnet.numpy

Posted by GitBox <gi...@apache.org>.
leezu commented on issue #18137:
URL: https://github.com/apache/incubator-mxnet/issues/18137#issuecomment-618111157


   I think divergence between numpy and mxnet.numpy should be treated as bug as long as it's not explicitly called out in the documentation?


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



[GitHub] [incubator-mxnet] leezu commented on issue #18137: [Numpy] different behaviours between numpy and mxnet.numpy

Posted by GitBox <gi...@apache.org>.
leezu commented on issue #18137:
URL: https://github.com/apache/incubator-mxnet/issues/18137#issuecomment-625935351


   @acphile can you help to create a separate issue for each problem, to simplify tracking the individual issues?


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



[GitHub] [incubator-mxnet] yzhliu edited a comment on issue #18137: [Numpy] different behaviours between numpy and mxnet.numpy

Posted by GitBox <gi...@apache.org>.
yzhliu edited a comment on issue #18137:
URL: https://github.com/apache/incubator-mxnet/issues/18137#issuecomment-638504536


   As they have been well tracked by separate issues, I will close this issue.


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



[GitHub] [incubator-mxnet] yzhliu edited a comment on issue #18137: [Numpy] different behaviours between numpy and mxnet.numpy

Posted by GitBox <gi...@apache.org>.
yzhliu edited a comment on issue #18137:
URL: https://github.com/apache/incubator-mxnet/issues/18137#issuecomment-638504536


   As they have been well tracked by separate issues, I will close this one.


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