[Numpy-discussion] `out` argument to ufuncs
Thu Sep 4 08:32:18 CDT 2008
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 <firstname.lastname@example.org> wrote:
> > 2008/9/4 Robert Kern <email@example.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>
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 :).
More information about the Numpy-discussion