[Numpy-discussion] Floating Point Difference between numpy and numarray
Sebastian Stephan Berg
sebastian@sipsolutions....
Wed Sep 3 04:45:24 CDT 2008
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
More information about the Numpy-discussion
mailing list