summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTina Oberoi <55803680+tinaoberoi@users.noreply.github.com>2020-05-21 15:01:47 +0530
committerGitHub <noreply@github.com>2020-05-21 11:31:47 +0200
commit41e254f96e8d5bd558d2edbf8b198eb4143e8b74 (patch)
treed2a2ba6838e056786c3363ca75f7d0f71414b9fa
parent6ce63913d3533bdf4028ab6bfcf0e1d3a91820ee (diff)
downloadnumpy-41e254f96e8d5bd558d2edbf8b198eb4143e8b74.tar.gz
DOC: Correct documentation of ``__array__`` when used as output array. (#16130)
-rw-r--r--doc/source/reference/arrays.classes.rst5
1 files changed, 2 insertions, 3 deletions
diff --git a/doc/source/reference/arrays.classes.rst b/doc/source/reference/arrays.classes.rst
index 6b6f366df..6c8793342 100644
--- a/doc/source/reference/arrays.classes.rst
+++ b/doc/source/reference/arrays.classes.rst
@@ -326,9 +326,8 @@ NumPy provides several hooks that classes can customize:
If a class (ndarray subclass or not) having the :func:`__array__`
method is used as the output object of an :ref:`ufunc
- <ufuncs-output-type>`, results will be written to the object
- returned by :func:`__array__`. Similar conversion is done on
- input arrays.
+ <ufuncs-output-type>`, results will *not* be written to the object
+ returned by :func:`__array__`. This practice will return ``TypeError``.
Matrix objects