[Numpy-discussion] custom accumlators

Charles R Harris charlesr.harris at gmail.com
Fri Jan 5 15:08:26 EST 2007

On 1/5/07, Tim Hochberg <tim.hochberg at ieee.org> wrote:
> Matt Knox wrote:
> > I made a post about this a while ago on the scipy-user mailing list, but
> I didn't receive much of a response so I'm just throwing it out there again
> (with more detail) in case it got overlooked.
> >
> > Basically, I'd like to be able to do accumulate operations with custom
> functions. numpy.vectorize does not seem to provide an accumulate method
> with the functions it returns.
> Note that if you are looking for speed, numpy.vectorize is probably not
> what you are looking for even if it did work for this sort of stuff.
> > I'm hoping I don't have to write ufuncs in C to accomplish this, but I
> fear that may the case. Either way, it would be nice to know if it can, or
> cannot be done in an easy manner.
> >
> > I have lots of examples of where this kind of thing is useful, but I'll
> just outline two for now.
> >
> [SNIP]
> It is not obvious how to write these using numpy's primitives. You might
> want to look into one of psyco, pyrex or weave. Psyco's probably the
> easiest, but will get you the smallest (although still large) speed
> gain, if you use psyco there are some tricks I could suggest for
> speeding it up. Pyrex is probably the most polished, but I haven't used
> it with numpy so I can't comment on how natural that is.
> -tim

I think what he needs is something like a linear prediction code or a IIP
filter. The place to look would be in scipy, either in signal processing or
statistics (ARMA). I don't know that it is there, but it might (should) be.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20070105/6644b625/attachment.html>

More information about the NumPy-Discussion mailing list