[Numpy-discussion] bug ! arr.mean() outside arr.min() .. arr.max() range
oliphant.travis at ieee.org
Fri Aug 11 17:06:12 CDT 2006
Sebastian Haase wrote:
> b is a non-native byteorder array of type int16
> but see further down: same after converting to native ...
The problem is no-doubt related to "wrapping" for integers. Your total is
getting too large to fit into the reducing data-type.
d.sum() give you?
You can add d.mean(dtype='d') to force reduction over doubles.
More information about the Numpy-discussion