Re: [Numpy-discussion] Vectorize ufunc

2009-08-07 Thread Travis Oliphant
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 wrote: > I was wondering why vectorize doesn't make the ufunc available

[Numpy-discussion] Vectorize ufunc

2009-08-07 Thread T J
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) >>> b.reduce 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