[Numpy-discussion] please change mean to use dtype=float
Sebastian Haase
haase at msg.ucsf.edu
Tue Sep 19 18:33:23 EDT 2006
Hello all,
I just had someone from my lab coming to my desk saying:
"My god - SciPy is really stupid ....
An array with only positive numbers claims to have a negative mean !! "?
I was asking about this before ... the reason was of course that her array was
of dtype int32 and had many large values to cause an overflow (wrap
around) .
Now that the default for axis is None (for all functions having an axis
argument),
can we please change dtype to default to float64 !?
It is really a very confusing and shocking result to get a negative mean on
all positive values.
It has been stated here before that numpy should target the "scientist" rather
than the programmers ... I would argue that mean() almost always requires
the precision of "double" (float64) to produce usable results.
Please consider this change before the 1.0 release ...
Thanks,
Sebastian Haase
More information about the NumPy-Discussion
mailing list