Hi all,

There is a PR, ready to be merged, that adds the possibility of passing a
tuple of arrays in the 'out' kwarg to ufuncs with multiple outputs:

https://github.com/numpy/numpy/pull/5621

The new functionality is as follows:

* If the ufunc has a single output, then the 'out' kwarg can either be a
single array (or None) like today, or a tuple holding a single array (or
None).

* If the ufunc has more than one output, then the 'out' kwarg must be a
tuple with one array (or None) per output argument. The old behavior, where
only the first output could be specified, is now deprecated, will raise a
deprecation warning, and potentially be changed to an error in the future.

* In both cases, positional and keyword output arguments are incompatible.
This has been made a little more strict, as the following is valid in <=
1.9.x but will now raise an error:

np.add(2, 2, None, out=arr)

There seemed to be a reasonable amount of agreement on the goodness of this
change from the discussions on github, but I wanted to inform the larger
audience, in case there are any addressable concerns.

Jaime

-- 
(\__/)
( O.o)
( > <) Este es Conejo. Copia a Conejo en tu firma y ayúdale en sus planes
de dominación mundial.
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to