summaryrefslogtreecommitdiff
path: root/doc/source/reference
diff options
context:
space:
mode:
authorMarten van Kerkwijk <mhvk@astro.utoronto.ca>2017-05-12 10:13:39 -0400
committerMarten van Kerkwijk <mhvk@astro.utoronto.ca>2017-05-17 21:13:06 -0400
commitca49f0b11bc88056bf4767ac439b298cfda16fed (patch)
treef6109a40f862a9cb604d9328af9c74db6dec41d7 /doc/source/reference
parent18bac353f667da6969716b60f3d3315ffd0b7aaa (diff)
downloadnumpy-ca49f0b11bc88056bf4767ac439b298cfda16fed.tar.gz
DOC: update documentation allowing tuple of one in reduce, etc.
Diffstat (limited to 'doc/source/reference')
-rw-r--r--doc/source/reference/ufuncs.rst9
1 files changed, 6 insertions, 3 deletions
diff --git a/doc/source/reference/ufuncs.rst b/doc/source/reference/ufuncs.rst
index b3fb4d384..9a8d8e20e 100644
--- a/doc/source/reference/ufuncs.rst
+++ b/doc/source/reference/ufuncs.rst
@@ -426,8 +426,8 @@ Methods
All ufuncs have four methods. However, these methods only make sense on
ufuncs that take two input arguments and return one output argument.
Attempting to call these methods on other ufuncs will cause a
-:exc:`ValueError`. The reduce-like methods all take an *axis* keyword
-and a *dtype* keyword, and the arrays must all have dimension >= 1.
+:exc:`ValueError`. The reduce-like methods all take an *axis* keyword, a *dtype*
+keyword, and an *out* keyword, and the arrays must all have dimension >= 1.
The *axis* keyword specifies the axis of the array over which the reduction
will take place and may be negative, but must be an integer. The
*dtype* keyword allows you to manage a very common problem that arises
@@ -443,7 +443,10 @@ mostly up to you. There is one exception: if no *dtype* is given for a
reduction on the "add" or "multiply" operations, then if the input type is
an integer (or Boolean) data-type and smaller than the size of the
:class:`int_` data type, it will be internally upcast to the :class:`int_`
-(or :class:`uint`) data-type.
+(or :class:`uint`) data-type. Finally, the *out* keyword allows you to provide
+an output array (for single-output ufuncs, which are currently the only ones
+supported; for future extension, however, a tuple with a single argument
+can be passed in). If *out* is given, the *dtype* argument is ignored.
Ufuncs also have a fifth method that allows in place operations to be
performed using fancy indexing. No buffering is used on the dimensions where