summaryrefslogtreecommitdiff
path: root/doc/source/reference/arrays.classes.rst
diff options
context:
space:
mode:
authorSebastian Berg <sebastianb@nvidia.com>2023-03-22 12:20:00 +0100
committerGitHub <noreply@github.com>2023-03-22 12:20:00 +0100
commitb35aac2c35ccfd5efadd7f72a090c9ad99308a60 (patch)
treeb1bd47eb0b5f68488379d8ea631aaa9c360a7552 /doc/source/reference/arrays.classes.rst
parent294c7f2c893b7e5ef783fc1cb1912d06404b452b (diff)
parentf3f108d313a8b8a4f7a90fb932867f17dc48b1f6 (diff)
downloadnumpy-b35aac2c35ccfd5efadd7f72a090c9ad99308a60.tar.gz
Merge pull request #23240 from byrdie/bugfix/ufunc_where_propagation
ENH: Allow ``where`` argument to override ``__array_ufunc__``
Diffstat (limited to 'doc/source/reference/arrays.classes.rst')
-rw-r--r--doc/source/reference/arrays.classes.rst5
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/source/reference/arrays.classes.rst b/doc/source/reference/arrays.classes.rst
index 2cce595e0..34da83670 100644
--- a/doc/source/reference/arrays.classes.rst
+++ b/doc/source/reference/arrays.classes.rst
@@ -71,10 +71,11 @@ NumPy provides several hooks that classes can customize:
The method should return either the result of the operation, or
:obj:`NotImplemented` if the operation requested is not implemented.
- If one of the input or output arguments has a :func:`__array_ufunc__`
+ If one of the input, output, or ``where`` arguments has a :func:`__array_ufunc__`
method, it is executed *instead* of the ufunc. If more than one of the
arguments implements :func:`__array_ufunc__`, they are tried in the
- order: subclasses before superclasses, inputs before outputs, otherwise
+ order: subclasses before superclasses, inputs before outputs,
+ outputs before ``where``, otherwise
left to right. The first routine returning something other than
:obj:`NotImplemented` determines the result. If all of the
:func:`__array_ufunc__` operations return :obj:`NotImplemented`, a