diff options
author | Melissa Weber Mendonça <melissawm@gmail.com> | 2021-11-22 10:41:59 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-22 10:41:59 -0300 |
commit | 28a5c34260bbf2d187549c2bed5148b51593ddd2 (patch) | |
tree | 1ae6b10ad546e97570a823590cf15e71bf6fbe81 /numpy/core/fromnumeric.py | |
parent | 0e9b464df4720028ef8739bf75ce5a44137a0bb7 (diff) | |
parent | 5ff2462e2c0172eb6d319c95140dd8b079aaf226 (diff) | |
download | numpy-28a5c34260bbf2d187549c2bed5148b51593ddd2.tar.gz |
Merge pull request #20399 from timhoffm/doc-link
Diffstat (limited to 'numpy/core/fromnumeric.py')
-rw-r--r-- | numpy/core/fromnumeric.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py index 6858fbc6d..f26f306fa 100644 --- a/numpy/core/fromnumeric.py +++ b/numpy/core/fromnumeric.py @@ -1980,25 +1980,27 @@ def shape(a): See Also -------- - len + len : ``len(a)`` is equivalent to ``np.shape(a)[0]`` for N-D arrays with + ``N>=1``. ndarray.shape : Equivalent array method. Examples -------- >>> np.shape(np.eye(3)) (3, 3) - >>> np.shape([[1, 2]]) + >>> np.shape([[1, 3]]) (1, 2) >>> np.shape([0]) (1,) >>> np.shape(0) () - >>> a = np.array([(1, 2), (3, 4)], dtype=[('x', 'i4'), ('y', 'i4')]) + >>> a = np.array([(1, 2), (3, 4), (5, 6)], + ... dtype=[('x', 'i4'), ('y', 'i4')]) >>> np.shape(a) - (2,) + (3,) >>> a.shape - (2,) + (3,) """ try: |