Re: [Numpy-discussion] masked ufuncs in C: on github

2009-05-15 Thread Charles R Harris
On Fri, May 15, 2009 at 7:48 PM, Eric Firing wrote: > > http://www.mail-archive.com/numpy-discussion@scipy.org/msg17595.html > > Prompted by the thread above, I decided to see what it would take to > implement ufuncs with masking in C. I described the result here: > > http://www.mail-archive.com

[Numpy-discussion] masked ufuncs in C: on github

2009-05-15 Thread Eric Firing
http://www.mail-archive.com/numpy-discussion@scipy.org/msg17595.html Prompted by the thread above, I decided to see what it would take to implement ufuncs with masking in C. I described the result here: http://www.mail-archive.com/numpy-discussion@scipy.org/msg17698.html Now I am starting a n

Re: [Numpy-discussion] Indexing with callables (was: Yorick-like functionality)

2009-05-15 Thread josef . pktd
On Fri, May 15, 2009 at 5:39 PM, David Huard wrote: > Josef, > > You're right, you can see it as a moving average. For 1D, correlate(a, > [5,.5]) yields what I expect but does not take an axis keyword. For the 2D > case, I'm rather looking for > ndimage.filters.correlate(b,0.25*np.ones((2,2))

Re: [Numpy-discussion] Indexing with callables (was: Yorick-like functionality)

2009-05-15 Thread David Huard
Josef, You're right, you can see it as a moving average. For 1D, correlate(a, [5,.5]) yields what I expect but does not take an axis keyword. For the 2D case, I'm rather looking for >>> ndimage.filters.correlate(b,0.25*np.ones((2,2)))[1:,1:] So another one-liner... maybe not worth adding to the

Re: [Numpy-discussion] Indexing with callables (was: Yorick-like functionality)

2009-05-15 Thread josef . pktd
On Fri, May 15, 2009 at 4:09 PM, David Huard wrote: > Pauli and David, > > Can this indexing syntax do things that are otherwise awkward with the > current syntax ? Otherwise, I'm not warm to the idea of making indexing more > complex than it is. > > getv : this is useful but it feels a bit redund

Re: [Numpy-discussion] Indexing with callables (was: Yorick-like functionality)

2009-05-15 Thread David Huard
Pauli and David, Can this indexing syntax do things that are otherwise awkward with the current syntax ? Otherwise, I'm not warm to the idea of making indexing more complex than it is. getv : this is useful but it feels a bit redundant with numpy.take. Is there a reason why take could not support

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

2009-05-15 Thread Eric Firing
Pierre GM wrote: > On May 13, 2009, at 7:36 PM, Matt Knox wrote: >>> Here's the catch: it's basically cheating. I got rid of the pre- >>> processing (where a mask was calculated depending on the domain and >>> the input set to a filling value depending on this mask, before the >>> actual computatio