summaryrefslogtreecommitdiff
path: root/doc/neps
diff options
context:
space:
mode:
authorStephan Hoyer <shoyer@google.com>2018-11-10 13:06:41 -0800
committerStephan Hoyer <shoyer@google.com>2018-11-10 13:16:43 -0800
commit3d49d86e0c83da1733386888c65b6490fb53497b (patch)
tree4156bba0ff9d8568188795ce63111770e6e27008 /doc/neps
parentd0e2f1ac0c0fb4aaf791c9082cff1d6b04545410 (diff)
downloadnumpy-3d49d86e0c83da1733386888c65b6490fb53497b.tar.gz
MAINT: disable __array_function__ dispatch unless environment variable set
Per discussion on the mailing list, __array_function__ isn't quite ready to release as part of NumPy 1.16: https://mail.python.org/pipermail/numpy-discussion/2018-November/078949.html We'd like to improve performance a bit, and it will be easier to support introspection on NumPy functions if we support Python 3 only. So for now, you need to set the environment variable ``NUMPY_EXPERIMENTAL_ARRAY_FUNCTION=1`` to enable dispatching.
Diffstat (limited to 'doc/neps')
-rw-r--r--doc/neps/nep-0018-array-function-protocol.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/neps/nep-0018-array-function-protocol.rst b/doc/neps/nep-0018-array-function-protocol.rst
index 75f4132a4..430199aa0 100644
--- a/doc/neps/nep-0018-array-function-protocol.rst
+++ b/doc/neps/nep-0018-array-function-protocol.rst
@@ -95,6 +95,15 @@ A prototype implementation can be found in
of NumPy functions for non-NumPy arrays. See "Non-goals" below for more
details.
+.. note::
+
+ Dispatch with the ``__array_function__`` protocol has been implemented on
+ NumPy's master branch but is not yet enabled by default. In NumPy 1.16,
+ you will need to set the environment variable
+ ``NUMPY_EXPERIMENTAL_ARRAY_FUNCTION=1`` before importing NumPy to test
+ NumPy function overrides. We anticipate the protocol will be enabled by
+ default in NumPy 1.17.
+
The interface
~~~~~~~~~~~~~