[Numpy-discussion] `out` argument to ufuncs

Robert Kern robert.kern@gmail....
Thu Sep 4 05:24:53 CDT 2008

On Thu, Sep 4, 2008 at 05:01, Stéfan van der Walt <stefan@sun.ac.za> wrote:
> 2008/9/4 Robert Kern <robert.kern@gmail.com>:
>> I am confused. add() and subtract() *do* take an out argument.
> So it does.  We both tried a keyword-style argument, which I think is
> a reasonable expectation?

It would certainly be *nice*, but many C-implemented functions don't
do this ('cause it's a pain in C). It's even harder to do for ufuncs;
follow the chain of calls down from PyUFunc_GenericFunction().

Hmm. Now that I look at it, it might be feasible to extract the out=
keyword in construct_loop() and append it to the args tuple before
passing that down to construct_arrays(). <push onto todo stack>

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
 -- Umberto Eco

More information about the Numpy-discussion mailing list