[Numpy-discussion] Vectorize and ufunc attribute

2013-03-12 Thread T J
Prior to 1.7, I had working compatibility code such as the following: if has_good_functions: # http://projects.scipy.org/numpy/ticket/1096 from numpy import logaddexp, logaddexp2 else: logaddexp = vectorize(_logaddexp, otypes=[numpy.float64]) logaddexp2 = vectorize(_logaddexp2,

Re: [Numpy-discussion] Vectorize and ufunc attribute

2013-03-12 Thread Bradley M. Froehle
T J: You may want to look into `numpy.frompyfunc` ( http://docs.scipy.org/doc/numpy/reference/generated/numpy.frompyfunc.html). -Brad On Tue, Mar 12, 2013 at 12:40 AM, T J tjhn...@gmail.com wrote: Prior to 1.7, I had working compatibility code such as the following: if has_good_functions:

Re: [Numpy-discussion] Vectorize and ufunc attribute

2013-03-12 Thread T J
On Tue, Mar 12, 2013 at 9:59 AM, Bradley M. Froehle brad.froe...@gmail.comwrote: T J: You may want to look into `numpy.frompyfunc` ( http://docs.scipy.org/doc/numpy/reference/generated/numpy.frompyfunc.html ). Yeah that's better, but it doesn't respect the output type of the function. Be