summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJaime Fernandez <jaime.frio@gmail.com>2015-03-01 22:34:01 -0800
committerJaime Fernandez <jaime.frio@gmail.com>2015-03-08 09:00:03 -0700
commitbb3ae05f773e1997b4e95655cf1795cb7c8f904b (patch)
tree152069c2dc99f41a38778ae93818a5f54484fe87 /doc
parent50e4eb87370b77792f1f6d21a5edd6ff20abee68 (diff)
downloadnumpy-bb3ae05f773e1997b4e95655cf1795cb7c8f904b.tar.gz
ENH: ufuncs can take a tuple of arrays as 'out' kwarg
Closes #4752
Diffstat (limited to 'doc')
-rw-r--r--doc/release/1.10.0-notes.rst9
-rw-r--r--doc/source/reference/ufuncs.rst15
2 files changed, 23 insertions, 1 deletions
diff --git a/doc/release/1.10.0-notes.rst b/doc/release/1.10.0-notes.rst
index a07dca80f..fe053af5f 100644
--- a/doc/release/1.10.0-notes.rst
+++ b/doc/release/1.10.0-notes.rst
@@ -71,6 +71,15 @@ Notably, this affect recarrays containing strings with whitespace, as trailing
whitespace is trimmed from chararrays but kept in ndarrays of string type.
Also, the dtype.type of nested structured fields is now inherited.
+'out' keyword argument of ufuncs now accepts tuples of arrays
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+When using the 'out' keyword argument of a ufunc, a tuple of arrays, one per
+ufunc output, can be provided. For ufuncs with a single output a single array
+is also a valid 'out' keyword argument. Previously a single array could be
+provided in the 'out' keyword argument, and it would be used as the first
+output for ufuncs with multiple outputs, is deprecated, and will result in a
+`DeprecationWarning` now and an error in the future.
+
New Features
============
diff --git a/doc/source/reference/ufuncs.rst b/doc/source/reference/ufuncs.rst
index 3d6112058..f7142bc47 100644
--- a/doc/source/reference/ufuncs.rst
+++ b/doc/source/reference/ufuncs.rst
@@ -299,7 +299,20 @@ advanced usage and will not typically be used.
.. versionadded:: 1.6
- The first output can provided as either a positional or a keyword parameter.
+ The first output can be provided as either a positional or a keyword
+ parameter. Keyword 'out' arguments are incompatible with positional
+ ones.
+
+ ..versionadded:: 1.10
+
+ The 'out' keyword argument is expected to be a tuple with one entry per
+ output (which can be `None` for arrays to be allocated by the ufunc).
+ For ufuncs with a single output, passing a single array (instead of a
+ tuple holding a single array) is also valid.
+
+ Passing a single array in the 'out' keyword argument to a ufunc with
+ multiple outputs is deprecated, and will raise a warning in numpy 1.10,
+ and an error in a future release.
*where*