summaryrefslogtreecommitdiff
path: root/doc/source/reference/arrays.classes.rst
diff options
context:
space:
mode:
Diffstat (limited to 'doc/source/reference/arrays.classes.rst')
-rw-r--r--doc/source/reference/arrays.classes.rst14
1 files changed, 3 insertions, 11 deletions
diff --git a/doc/source/reference/arrays.classes.rst b/doc/source/reference/arrays.classes.rst
index 2f40423ee..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
@@ -162,15 +163,6 @@ NumPy provides several hooks that classes can customize:
.. versionadded:: 1.16
- .. note::
-
- - In NumPy 1.17, the protocol is enabled by default, but can be disabled
- with ``NUMPY_EXPERIMENTAL_ARRAY_FUNCTION=0``.
- - In NumPy 1.16, you need to set the environment variable
- ``NUMPY_EXPERIMENTAL_ARRAY_FUNCTION=1`` before importing NumPy to use
- NumPy function overrides.
- - Eventually, expect to ``__array_function__`` to always be enabled.
-
- ``func`` is an arbitrary callable exposed by NumPy's public API,
which was called in the form ``func(*args, **kwargs)``.
- ``types`` is a collection :py:class:`collections.abc.Collection`