summaryrefslogtreecommitdiff
path: root/doc/source/reference
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2018-06-07 14:22:14 -0600
committerGitHub <noreply@github.com>2018-06-07 14:22:14 -0600
commit57d17c3183f45aa534ea120f0887632123d8607d (patch)
tree6c36cb60cc3f2d8080661458e0401e532ede9022 /doc/source/reference
parent5cbb982c8525d4f32a3e3cd5a766fab8a6331220 (diff)
parentb02fa32630d9879453a9a35579b31a17fe6e3307 (diff)
downloadnumpy-57d17c3183f45aa534ea120f0887632123d8607d.tar.gz
Merge pull request #11018 from mhvk/gufunc-axis-and-keepdims
ENH: Implement axis for generalized ufuncs.
Diffstat (limited to 'doc/source/reference')
-rw-r--r--doc/source/reference/ufuncs.rst13
1 files changed, 12 insertions, 1 deletions
diff --git a/doc/source/reference/ufuncs.rst b/doc/source/reference/ufuncs.rst
index 995542d77..3cc956887 100644
--- a/doc/source/reference/ufuncs.rst
+++ b/doc/source/reference/ufuncs.rst
@@ -360,6 +360,17 @@ advanced usage and will not typically be used.
and for generalized ufuncs for which all outputs are scalars, the output
tuples can be omitted.
+*axis*
+
+ .. versionadded:: 1.15
+
+ A single axis over which a generalized ufunc should operate. This is a
+ short-cut for ufuncs that operate over a single, shared core dimension,
+ equivalent to passing in ``axes`` with entries of ``(axis,)`` for each
+ single-core-dimension argument and ``()`` for all others. For instance,
+ for a signature ``(i),(i)->()``, it is equivalent to passing in
+ ``axes=[(axis,), (axis,), ()]``.
+
*keepdims*
.. versionadded:: 1.15
@@ -370,7 +381,7 @@ advanced usage and will not typically be used.
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``.
+ the dimensions in the output can be controlled with ``axes`` and ``axis``.
*casting*