summaryrefslogtreecommitdiff
path: root/doc/source
diff options
context:
space:
mode:
authorMukulika <mukulikapahari@gmail.com>2021-10-28 22:05:18 +0530
committerMukulika <mukulikapahari@gmail.com>2021-10-28 22:06:05 +0530
commit2b4563ad39e5104cfb802ac1973815018d183844 (patch)
tree6e03b8014fe3b12e979c9aea6a0f5190dd2c82f1 /doc/source
parent16240591e79cb1d62007dd637ccc50b57ba9aba5 (diff)
downloadnumpy-2b4563ad39e5104cfb802ac1973815018d183844.tar.gz
DOC: Added note about base attribute
Diffstat (limited to 'doc/source')
-rw-r--r--doc/source/user/basics.copies.rst6
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/source/user/basics.copies.rst b/doc/source/user/basics.copies.rst
index 8adc34893..583a59b95 100644
--- a/doc/source/user/basics.copies.rst
+++ b/doc/source/user/basics.copies.rst
@@ -128,7 +128,7 @@ How to tell if the array is a view or a copy
The :attr:`base <.ndarray.base>` attribute of the ndarray makes it easy
to tell if an array is a view or a copy. The base attribute of a view returns
-the original array while it returns ``None`` for a copy.
+the original array while it returns ``None`` for a copy.
>>> x = np.arange(9)
>>> x
@@ -146,3 +146,7 @@ the original array while it returns ``None`` for a copy.
[3, 4, 5]])
>>> z.base is None # advanced indexing creates a copy
True
+
+Note that the ``base`` attribute should not be used to determine
+if an ndarray object is *new*; only if it is a view or a copy
+of another ndarray. \ No newline at end of file