Re: [Numpy-discussion] Do ufuncs returned by frompyfunc(), have the out arg?

2010-04-06 Thread Ken Basye
From: Anne Archibald On 6 April 2010 15:42, Ken Basye wrote: > Folks, > I hope this is a simple question. When I created a ufunc with > np.frompyfunc(), I got an error when I called the result with an 'out' > argument: In fact, ordinary ufuncs do not accept names for their arguments. T

Re: [Numpy-discussion] Do ufuncs returned by frompyfunc() have the out arg?

2010-04-06 Thread Anne Archibald
On 6 April 2010 15:42, Ken Basye wrote: > Folks, > I hope this is a simple question. When I created a ufunc with > np.frompyfunc(), I got an error when I called the result with an 'out' > argument: In fact, ordinary ufuncs do not accept names for their arguments. This is annoying, but fixing it

[Numpy-discussion] Do ufuncs returned by frompyfunc() have the out arg?

2010-04-06 Thread Ken Basye
Folks, I hope this is a simple question. When I created a ufunc with np.frompyfunc(), I got an error when I called the result with an 'out' argument: >>> def foo(x): return x * x + 1 >>> ufoo = np.frompyfunc(foo, 1, 1) >>> arr = np.arange(9).reshape(3,3) >>> ufoo(arr, out=arr) Traceback (