[Numpy-discussion] `out` argument to ufuncs

Robert Kern robert.kern@gmail....
Thu Sep 4 14:43:15 CDT 2008

On Thu, Sep 4, 2008 at 08:32, Gael Varoquaux
<gael.varoquaux@normalesup.org> wrote:
> On Thu, Sep 04, 2008 at 05:24:53AM -0500, Robert Kern wrote:
>> 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.
> Hum, good!
>> > 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>
> Cool. Either that, or fix'n the docs. I had a look at the docstring and
> it wasn't hinted by the docstring. THe docstring editor is here for
> fixing these details, but I think I'll simply wait for you to add the
> keyword argument :).

It won't be happening soon. len(todo) == big.

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