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 2018/11/12 04:59:09 UTC

[GitHub] eric-haibin-lin opened a new issue #13220: Many operators don't work for integer type

eric-haibin-lin opened a new issue #13220: Many operators don't work for integer type 
URL: https://github.com/apache/incubator-mxnet/issues/13220
 
 
   Many operators implicitly cast data to float and return inaccurate results: 
   ```
   >>> mx.nd.array([50000001], dtype='int32')
   
   [50000001]
   <NDArray 1 @cpu(0)>
   
   >>> mx.nd.array([50000001], dtype='int32').floor()
   
   [50000000] ------------->  should be [50000001]
   <NDArray 1 @cpu(0)> 
   
   >> mx.nd.array([50000001], dtype='int32').round()
   
   [50000000] ------------->  should be [50000001]
   <NDArray 1 @cpu(0)>
   >>> mx.nd.array([50000001], dtype='int32').ceil()
   
   [50000000] ------------->  should be [50000001]
   <NDArray 1 @cpu(0)>
   >>> mx.nd.array([50000001], dtype='int32').trunc()
   
   [50000000] ------------->  should be [50000001]
   <NDArray 1 @cpu(0)> 
   ```
   
   

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