diff options
author | Marten van Kerkwijk <mhvk@astro.utoronto.ca> | 2018-04-30 12:32:26 -0400 |
---|---|---|
committer | Marten van Kerkwijk <mhvk@astro.utoronto.ca> | 2018-06-07 14:37:21 -0400 |
commit | 2abef6cb51d6b7e8c704b4c65328f392152ad23d (patch) | |
tree | ecda80d7e9ce8d01fec3e6d2d6c69169401e5768 /doc/source/reference | |
parent | e782814afe729695266f291c126929131a5817c2 (diff) | |
download | numpy-2abef6cb51d6b7e8c704b4c65328f392152ad23d.tar.gz |
DOC: Describe new axis argument.
Both in the general documentation and in the release notes.
Diffstat (limited to 'doc/source/reference')
-rw-r--r-- | doc/source/reference/ufuncs.rst | 13 |
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* |