[Numpy-discussion] Floating Point Difference between numpy and numarray
Wed Sep 3 05:42:16 CDT 2008
It should never do some black magic without telling you.
People are concerned by memory consumption, so if you use more memory
than what you think, you can encounter bugs. Least surprise is always
2008/9/3, Hanni Ali <firstname.lastname@example.org>:
> Sebastian you legend, that seems to be it.
> Thank you very much.
> >>> matrix.mean(dtype='float64')
> What seems odd is that numpy doesn't do this on it's own...
> 2008/9/3 Sebastian Stephan Berg <email@example.com>
> > Hi,
> > just guessing here. But numarray seems to calculate the result in a
> > bigger dataype, while numpy uses float32 which is the input arrays size
> > (at least I thought so, trying it confused me right now ...). In any
> > case, maybe the difference will be gone if you
> > use .mean(dtype='float64') (or whatever dtype numarray actually uses,
> > which seems to be "numarray.MaximumType(a.type())" where
> a is the array
> > to take the mean).
> > Sebastian
> > _______________________________________________
> > Numpy-discussion mailing list
> > Numpyfirstname.lastname@example.org
> Numpy-discussion mailing list
French PhD student
Information System Engineer
Blogs: http://matt.eifelle.com and http://blog.developpez.com/?blog=92
More information about the Numpy-discussion