Re: [Numpy-discussion] OS-X binary name...

2009-05-09 Thread David Cournapeau
On Wed, May 6, 2009 at 3:03 PM, Christopher Barker wrote: > Hi all, > > The binary for OS-X on sourceforge is called: > > numpy-1.3.0-py2.5-macosx10.5.dmg > > However, as far as I can tell, it works just fine on OS-X 10.4, and > maybe even 10.3.9. I have to confess I don't understand mac os x bac

[Numpy-discussion] Detecting C API mismatch (was Managing Python with NumPy and many external libraries on multiple Windows machines)

2009-05-09 Thread David Cournapeau
Hi, I worked on some code to detect C API mismatches both for developers and for users: http://github.com/cournape/numpy/tree/runtime_feature It adds the following: - if a numpy or ufunc function is added in the C API without the NPY_FEATURE_VERSION to be updated, a warning is generated at buil

Re: [Numpy-discussion] Are masked arrays slower for processing than ndarrays?

2009-05-09 Thread Pierre GM
On May 9, 2009, at 8:17 PM, Eric Firing wrote: > Eric Firing wrote: > > A part of the slowdown is what looks to me like unnecessary copying > in _MaskedBinaryOperation.__call__. It is using getdata, which > applies numpy.array to its input, forcing a copy. I think the copy > is actually

Re: [Numpy-discussion] Are masked arrays slower for processing than ndarrays?

2009-05-09 Thread Pierre GM
Short answer to the subject: Oh yes. Basically, MaskedArrays in its current implementation is more of a convenience class than anything. Most of the functions manipulating masked arrays create a lot of temporaries. When performance is needed, I must advise you to work directly on the data and

Re: [Numpy-discussion] Are masked arrays slower for processing than ndarrays?

2009-05-09 Thread Eric Firing
Eric Firing wrote: Pierre, ... I pressed "send" too soon. There are test failures with the patch I attached to my last message. I think the basic ideas are correct, but evidently there are wrinkles to be worked out. Maybe putmask() has to be used instead of where() (putmask is much faster)

Re: [Numpy-discussion] Are masked arrays slower for processing than ndarrays?

2009-05-09 Thread Eric Firing
Eli Bressert wrote: Hi, I'm using masked arrays to compute large-scale standard deviation, multiplication, gaussian, and weighted averages. At first I thought using the masked arrays would be a great way to sidestep looping (which it is), but it's still slower than expected. Here's a snippet of

Re: [Numpy-discussion] Are masked arrays slower for processing than ndarrays?

2009-05-09 Thread Eric Firing
Eli Bressert wrote: > Hi, > > I'm using masked arrays to compute large-scale standard deviation, > multiplication, gaussian, and weighted averages. At first I thought > using the masked arrays would be a great way to sidestep looping > (which it is), but it's still slower than expected. Here's a s

[Numpy-discussion] Are masked arrays slower for processing than ndarrays?

2009-05-09 Thread Eli Bressert
Hi, I'm using masked arrays to compute large-scale standard deviation, multiplication, gaussian, and weighted averages. At first I thought using the masked arrays would be a great way to sidestep looping (which it is), but it's still slower than expected. Here's a snippet of the code that I'm usin