vjache opened a new issue #17143: Wrong sum of array URL: https://github.com/apache/incubator-mxnet/issues/17143 ## Description Wrong sum of an array. I've a list of floats, I created ndarray from it using numpy and mxnet and called sum routine and got different results. ### Error Message No error just wrong arithmetic result of array summation. ## To Reproduce ``` a = [1.0504983e+07, 1.0000000e+00, 2.0000000e+00, 3.0000000e+00, 5.0000000e-01, 1.0000000e+01, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00] import numpy as np np.array(a) array([1.0504983e+07, 1.0000000e+00, 2.0000000e+00, 3.0000000e+00, 5.0000000e-01, 1.0000000e+01, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00]) np.array(a).sum() 10504999.5 # Compare this with bellow import mxnet.ndarray as md md.array(a).sum() [10505000.] # Compare this with above <NDArray 1 @cpu(0)> ``` ### Steps to reproduce See "To Reproduce" ## What have you tried to solve it? 1. 2. ## Environment ``` ----------Python Info---------- Version : 3.7.4 Compiler : MSC v.1915 64 bit (AMD64) Build : ('default', 'Aug 9 2019 18:34:13') Arch : ('64bit', 'WindowsPE') ------------Pip Info----------- Version : 19.3.1 Directory : C:\Users\vjache\miniconda3\envs\entropy\lib\site-packages\pip ----------MXNet Info----------- Version : 1.5.0 Directory : C:\Users\vjache\miniconda3\envs\entropy\lib\site-packages\mxnet Num GPUs : 0 Hashtag not found. Not installed from pre-built package. ----------System Info---------- Platform : Windows-10-10.0.18362-SP0 system : Windows node : DESKTOP-FKP41K9 release : 10 version : 10.0.18362 ----------Hardware Info---------- machine : AMD64 processor : Intel64 Family 6 Model 142 Stepping 10, GenuineIntel Name Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz ----------Network Test---------- Setting timeout: 10 Timing for MXNet: https://github.com/apache/incubator-mxnet, DNS: 0.0199 sec, LOAD: 0.6303 sec. Timing for GluonNLP GitHub: https://github.com/dmlc/gluon-nlp, DNS: 0.0007 sec, LOAD: 0.6512 sec. Timing for GluonNLP: http://gluon-nlp.mxnet.io, DNS: 0.1755 sec, LOAD: 0.8628 sec. Timing for D2L: http://d2l.ai, DNS: 0.0938 sec, LOAD: 0.4161 sec. Timing for D2L (zh-cn): http://zh.d2l.ai, DNS: 0.0637 sec, LOAD: 0.5250 sec. Timing for FashionMNIST: https://repo.mxnet.io/gluon/dataset/fashion-mnist/train-labels-idx1-ubyte.gz, DNS: 0.0957 sec, LOAD: 1.0208 sec. Timing for PYPI: https://pypi.python.org/pypi/pip, DNS: 0.1656 sec, LOAD: 1.4794 sec. Timing for Conda: https://repo.continuum.io/pkgs/free/, DNS: 0.0413 sec, LOAD: 0.1082 sec. ```
---------------------------------------------------------------- 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
