diff options
author | Marten van Kerkwijk <mhvk@astro.utoronto.ca> | 2017-11-27 13:54:54 -0500 |
---|---|---|
committer | Marten van Kerkwijk <mhvk@astro.utoronto.ca> | 2018-02-27 20:03:26 -0500 |
commit | d525cc102f26026fd3b42bd73357203ca14dd14b (patch) | |
tree | 4b1d7b8edd18e8fee347f49b17e941eb67b415ce /doc | |
parent | 5626be617d9e5b3b8758b875adf7c7c2356bf9b3 (diff) | |
download | python-numpy-d525cc102f26026fd3b42bd73357203ca14dd14b.tar.gz python-numpy-d525cc102f26026fd3b42bd73357203ca14dd14b.tar.bz2 python-numpy-d525cc102f26026fd3b42bd73357203ca14dd14b.zip |
DOC: describe axes keyword in ufunc documentation.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/source/reference/ufuncs.rst | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/source/reference/ufuncs.rst b/doc/source/reference/ufuncs.rst index 3711f660f..59d25a9ca 100644 --- a/doc/source/reference/ufuncs.rst +++ b/doc/source/reference/ufuncs.rst @@ -336,6 +336,20 @@ advanced usage and will not typically be used. of False indicate to leave the value in the output alone. This argument cannot be used for generalized ufuncs as those take non-scalar input. +*axes* + + .. versionadded:: 1.15 + + A list of tuples with indices of axes a generalized ufunc should operate + on. For instance, for a signature of ``(i,j),(j,k)->(i,k)`` appropriate + for matrix multiplication, the base elements are two-dimensional matrices + and these are taken to be stored in the two last axes of each argument. + The corresponding axes keyword would be ``[(-2, -1), (-2, -1), (-2, -1)]``. + For simplicity, for generalized ufuncs that operate on 1-dimensional arrays + (vectors), a single integer is accepted instead of a single-element tuple, + and for generalized ufuncs for which all outputs are scalars, the output + tuples can be omitted. + *casting* .. versionadded:: 1.6 |