Re: [Numpy-discussion] Bug in numpy.mean() revisited

2012-07-27 Thread Nathaniel Smith
On Fri, Jul 27, 2012 at 5:15 AM, Charles R Harris wrote: > I would support accumulating in 64 bits but, IIRC, the function will need to > be rewritten so that it works by adding 32 bit floats to the accumulator to > save space. There are also more stable methods that could also be > investigated.

Re: [Numpy-discussion] Bug in numpy.mean() revisited

2012-07-27 Thread Henry Gomersall
On Thu, 2012-07-26 at 22:15 -0600, Charles R Harris wrote: > I would support accumulating in 64 bits but, IIRC, the function will > need to be rewritten so that it works by adding 32 bit floats to the > accumulator to save space. There are also more stable methods that > could also be investigated.

Re: [Numpy-discussion] Bug in numpy.mean() revisited

2012-07-26 Thread Charles R Harris
On Thu, Jul 26, 2012 at 9:26 PM, Tom Aldcroft wrote: > There was a thread in January discussing the non-obvious behavior of > numpy.mean() for large arrays of float32 values [1]. This issue is > nicely discussed at the end of the numpy.mean() documentation [2] with > an example: > > >>> a = np.z

[Numpy-discussion] Bug in numpy.mean() revisited

2012-07-26 Thread Tom Aldcroft
There was a thread in January discussing the non-obvious behavior of numpy.mean() for large arrays of float32 values [1]. This issue is nicely discussed at the end of the numpy.mean() documentation [2] with an example: >>> a = np.zeros((2, 512*512), dtype=np.float32) >>> a[0, :] = 1.0 >>> a[1, :]