[Numpy-discussion] Vectorize ufunc
Fri Aug 7 14:35:02 CDT 2009
The short answer is that it was easier this way.
The ufunc is created on the fly and it needs to know several things
that are easy to get once the function is called.
Sent from my iPhone
On Aug 7, 2009, at 11:42 AM, T J <email@example.com> wrote:
> I was wondering why vectorize doesn't make the ufunc available at the
> topmost level....
>>>> def a(x,y): return x + y
>>>> b = vectorize(a)
> Instead, the ufunc is stored at b.ufunc.
> Also, b.ufunc.reduce() doesn't seem to exist until I *use* the
> vectorized function at least once. Can this be changed so that it
> exists right away (and preferably at b.reduce instead of
> NumPy-Discussion mailing list
More information about the NumPy-Discussion