summaryrefslogtreecommitdiff
path: root/doc/source/reference
diff options
context:
space:
mode:
authorMarten van Kerkwijk <mhvk@astro.utoronto.ca>2018-05-14 15:31:39 -0400
committerMarten van Kerkwijk <mhvk@astro.utoronto.ca>2018-05-18 09:46:44 -0400
commit8ccabd6273d4ed598ad732c33d36a5efce6c4a8a (patch)
treec184a18185e62a4bd642c47fed80423f46f9fe00 /doc/source/reference
parentc29e267e6dadcaead6af9a4b1ddc97072e8e48bc (diff)
downloadnumpy-8ccabd6273d4ed598ad732c33d36a5efce6c4a8a.tar.gz
DOC: Describe new keepdims arguments (and axes).
Both in the general documentation and in the release notes. For the latter, also include a description of ``axes``, which was missing so far.
Diffstat (limited to 'doc/source/reference')
-rw-r--r--doc/source/reference/ufuncs.rst12
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/source/reference/ufuncs.rst b/doc/source/reference/ufuncs.rst
index bebd047f6..68d85ccf5 100644
--- a/doc/source/reference/ufuncs.rst
+++ b/doc/source/reference/ufuncs.rst
@@ -360,6 +360,18 @@ advanced usage and will not typically be used.
and for generalized ufuncs for which all outputs are scalars, the output
tuples can be omitted.
+*keepdims*
+
+ .. versionadded:: 1.15
+
+ If this is set to `True`, axes which are reduced over will be left in the
+ result as a dimension with size one, so that the result will broadcast
+ correctly against the inputs. This option can only be used for generalized
+ ufuncs that operate on inputs that all have the same number of core
+ dimensions and with outputs that have no core dimensions , i.e., with
+ signatures like ``(i),(i)->()`` or ``(m,m)->()``. If used, the location of
+ the dimensions in the output can be controlled with ``axes``.
+
*casting*
.. versionadded:: 1.6