Hi Warren,
Thanks for the reply. I actually have a very similar version in my own
code; I was just hoping to figure out the generalized ufunc
architecture. There aren't many examples of actual uses of this
capability in NumPy, so I wanted to try and exercise it a bit.
logsumexp is kind of
David,
I haven't tried creating a ufunc before, so I can't help you with that,
but since you are working on logsumexp, you might be interested in the
version I posted here in October:
http://mail.scipy.org/pipermail/scipy-user/2009-October/022931.html
and the attached tests.
Warren
Da
I decided to take a crack at adding a generalized ufunc for logsumexp,
i.e. collapsed an array along the last dimension by subtracting the
maximum element E along that dimension, taking the exponential,
adding, and then adding back E. Functionally the same
logaddexp.reduce() but presumably