summaryrefslogtreecommitdiff
path: root/doc/source/reference/arrays.classes.rst
diff options
context:
space:
mode:
authorRoy Smart <roytsmart@gmail.com>2023-02-17 15:29:41 -0700
committerRoy Smart <roytsmart@gmail.com>2023-02-24 01:21:55 -0700
commitf3f108d313a8b8a4f7a90fb932867f17dc48b1f6 (patch)
tree95738be8cf2ae971bc40d6820328972bbf53a7f9 /doc/source/reference/arrays.classes.rst
parentd92cc2d1c7c7153525e03c4d10377714d85cfde6 (diff)
downloadnumpy-f3f108d313a8b8a4f7a90fb932867f17dc48b1f6.tar.gz
ENH: Modified `PyUFunc_CheckOverride` to allow the `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 2f40423ee..fd8b3bfb8 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