summaryrefslogtreecommitdiff
path: root/numpy/core/fromnumeric.py
diff options
context:
space:
mode:
authorTim Hoffmann <2836374+timhoffm@users.noreply.github.com>2021-11-18 00:15:58 +0100
committerTim Hoffmann <2836374+timhoffm@users.noreply.github.com>2021-11-20 22:11:53 +0100
commit5ff2462e2c0172eb6d319c95140dd8b079aaf226 (patch)
treee5210b307c7ba1e837135640a7b7d8bab081689b /numpy/core/fromnumeric.py
parent60999d5af0fa142cabe67381e0033b203de3f083 (diff)
downloadnumpy-5ff2462e2c0172eb6d319c95140dd8b079aaf226.tar.gz
Improve See Also of ndarray.shape
Diffstat (limited to 'numpy/core/fromnumeric.py')
-rw-r--r--numpy/core/fromnumeric.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py
index a65a019c0..9b51b391a 100644
--- a/numpy/core/fromnumeric.py
+++ b/numpy/core/fromnumeric.py
@@ -1980,7 +1980,8 @@ def shape(a):
See Also
--------
- len : ``len(a)`` is equivalent to ``np.shape(a)[0]`` for 1+-dim arrays.
+ len : ``len(a)`` is equivalent to ``np.shape(a)[0]`` for N-D arrays with
+ ``N>=1``.
ndarray.shape : Equivalent array method.
Examples
@@ -1995,7 +1996,7 @@ def shape(a):
()
>>> a = np.array([(1, 2), (3, 4), (5, 6)],
- dtype=[('x', 'i4'), ('y', 'i4')])
+ ... dtype=[('x', 'i4'), ('y', 'i4')])
>>> np.shape(a)
(3,)
>>> a.shape