From 5ff2462e2c0172eb6d319c95140dd8b079aaf226 Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Thu, 18 Nov 2021 00:15:58 +0100 Subject: Improve See Also of ndarray.shape --- numpy/core/fromnumeric.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'numpy/core/fromnumeric.py') 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 -- cgit v1.2.1