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

2009-05-18 Thread josef . pktd
On Mon, May 18, 2009 at 6:22 PM, Robert Kern wrote: > On Mon, May 18, 2009 at 13:23, Pauli Virtanen wrote: >> Mon, 18 May 2009 09:21:39 -0700, David J Strozzi wrote: >> [clip] >>> I also like pointing out that Yorick was a fast, free environment >>> developed by ~1990, when matlab/IDL were probab

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

2009-05-18 Thread Robert Kern
On Mon, May 18, 2009 at 13:23, Pauli Virtanen wrote: > Mon, 18 May 2009 09:21:39 -0700, David J Strozzi wrote: > [clip] >> I also like pointing out that Yorick was a fast, free environment >> developed by ~1990, when matlab/IDL were probably the only comparable >> games in town, but very few peopl

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

2009-05-18 Thread Pauli Virtanen
Mon, 18 May 2009 09:21:39 -0700, David J Strozzi wrote: [clip] > I also like pointing out that Yorick was a fast, free environment > developed by ~1990, when matlab/IDL were probably the only comparable > games in town, but very few people ever used it. I think this is a case > study in the triump

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

2009-05-18 Thread David J Strozzi
> >The actual list of Yorick functions relevant here appears to be here: > > http:// yorick.sourceforge.net/manual/yorick_46.php#SEC46 > http:// yorick.sourceforge.net/manual/yorick_47.php#SEC47 > >I must say that I don't see many functions missing in Numpy... > >David (Strozzi): are th

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

2009-05-16 Thread Pauli Virtanen
Fri, 15 May 2009 16:09:08 -0400, David Huard wrote: > 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. I think the indexing with callables is more syntax sugar for nested `fun

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

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

2009-05-14 Thread Pauli Virtanen
Wed, 13 May 2009 13:18:45 -0700, David J Strozzi kirjoitti: [clip] > Many of you probably know of the interpreter yorick by Dave Munro. As a > Livermoron, I use it all the time. There are some built-in functions > there, analogous to but above and beyond numpy's sum() and diff(), which > are quite