Re: [Numpy-discussion] A memory problem: why does mmap come up in numpy.inner?

2008-06-05 Thread David Cournapeau
On Thu, 2008-06-05 at 08:24 +0200, Michael Abshoff wrote: I am not what I would call familiar with numpy internals, so is there a magic thing I can do to make numpy aware that ctypes exists? I don't think any magic is needed. As long as importing ctypes works from the python you used to

Re: [Numpy-discussion] A memory problem: why does mmap come up in numpy.inner?

2008-06-05 Thread Jon Wright
Michael Abshoff wrote: Jonathan Wright wrote: ...etc. We needed this for generating the .so library file name for ctypes Can you elaborate on this a little? The we refered to another project (not numpy) where we needed to distinguish 32 bit from 64 bit platforms. We have code for picking

Re: [Numpy-discussion] One more wrinkle in going to 5.0

2008-06-05 Thread Charles Doutriaux
Arthur I'm forwarding your question to the numpy list, I'm hoping somebody there will be able to help you with that. C. Arthur M. Greene wrote: Hi All, This does not involve the CDAT-5 code, but rather files pickled under earlier versions of CDAT. These files store the variable type along

Re: [Numpy-discussion] One more wrinkle in going to 5.0

2008-06-05 Thread Travis E. Oliphant
Charles Doutriaux wrote: Arthur I'm forwarding your question to the numpy list, I'm hoping somebody there will be able to help you with that. Try using numpy.oldnumeric.load(f). Or, just replace in the pickle stream: Numeric -- numpy.oldnumeric It should work fine. If you have

Re: [Numpy-discussion] calculating the mean and variance of a large float vector

2008-06-05 Thread Keith Goodman
On Thu, Jun 5, 2008 at 4:54 PM, Christopher Marshall [EMAIL PROTECTED] wrote: I will be calculating the mean and variance of a vector with millions of elements. I was wondering how well numpy's mean and variance functions handle the numerical stability of such a calculation. How's this for

Re: [Numpy-discussion] calculating the mean and variance of a large float vector

2008-06-05 Thread Keith Goodman
On Thu, Jun 5, 2008 at 6:55 PM, Alan McIntyre [EMAIL PROTECTED] wrote: On Thu, Jun 5, 2008 at 9:06 PM, Keith Goodman [EMAIL PROTECTED] wrote: On Thu, Jun 5, 2008 at 4:54 PM, Christopher Marshall Are you worried that the mean might overflow on the intermediate sum? I suspect (but please

Re: [Numpy-discussion] calculating the mean and variance of a large float vector

2008-06-05 Thread Charles R Harris
On Thu, Jun 5, 2008 at 7:55 PM, Alan McIntyre [EMAIL PROTECTED] wrote: On Thu, Jun 5, 2008 at 9:06 PM, Keith Goodman [EMAIL PROTECTED] wrote: On Thu, Jun 5, 2008 at 4:54 PM, Christopher Marshall Are you worried that the mean might overflow on the intermediate sum? I suspect (but please

Re: [Numpy-discussion] calculating the mean and variance of a large float vector

2008-06-05 Thread Alan McIntyre
On Thu, Jun 5, 2008 at 10:16 PM, Keith Goodman [EMAIL PROTECTED] wrote: How can that lead to instability? If the last half-million values are small then they won't have a big impact on the mean even if they are ignored. The variance is a mean too (of the squares), so it should be stable too.