[Numpy-discussion] Vectorize ufunc

T J tjhnson@gmail....
Fri Aug 7 12:42:06 CDT 2009

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 this be changed so that it
exists right away (and preferably at b.reduce instead of

More information about the NumPy-Discussion mailing list