[Numpy-discussion] Writing new ufuncs

Anne Archibald peridot.faceted@gmail....
Sun May 11 13:17:23 CDT 2008


2008/5/11 Alan McIntyre <alan.mcintyre@gmail.com>:
> On Sun, May 11, 2008 at 2:04 PM, Anne Archibald
> <peridot.faceted@gmail.com> wrote:
>>  Also, is there a way to take a python function and automatically make
>>  a ufunc out of it? (No, vectorize doesn't implement reduce(),
>>  accumulate(), reduceat(), or outer().)
>
> I've not used it, but have a look at numpy.frompyfunc; its docstring
> suggests it turns arbitrary Python functions into ufuncs.

Ah, thanks. Shame it produces object arrays though.

Anne


More information about the Numpy-discussion mailing list