Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#424 PYTHON: numpy.std - different results for float and double

open
nobody
None
5
2011-08-26
2011-08-26
Sylwester Arabas
No

GDL> print, python('numpy', 'std', [1,2,3,4,5,6.])
1.7078251
GDL> print, python('numpy', 'std', [1,2,3,4,5,6d])
1.1547005

and sometimes...:

GDL> print, python('numpy', 'std', [1,2,3,4,5,6d])
2.1622551
GDL> print, python('numpy', 'std', [1,2,3,4,5,6d])
Warning: overflow encountered in multiply
inf

Discussion