diff options
| author | SabrinaSimao <sabrina_simao@hotmail.com> | 2020-06-12 14:13:23 -0300 |
|---|---|---|
| committer | SabrinaSimao <sabrina_simao@hotmail.com> | 2020-06-12 14:13:23 -0300 |
| commit | f4889614194fc50dd48b0e56ede1c223b5202566 (patch) | |
| tree | e3f5eff870e782f33acecb7cd6fb4b6ba24124e7 /numpy | |
| parent | 5345c2575a28fa2dfbbec83c99636669476c2745 (diff) | |
| download | numpy-f4889614194fc50dd48b0e56ede1c223b5202566.tar.gz | |
unify the docs for np.transpose and ndarray.transpose
Diffstat (limited to 'numpy')
| -rw-r--r-- | numpy/core/_add_newdocs.py | 3 | ||||
| -rw-r--r-- | numpy/core/fromnumeric.py | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/numpy/core/_add_newdocs.py b/numpy/core/_add_newdocs.py index d0ed3d381..a83037132 100644 --- a/numpy/core/_add_newdocs.py +++ b/numpy/core/_add_newdocs.py @@ -3998,6 +3998,8 @@ add_newdoc('numpy.core.multiarray', 'ndarray', ('transpose', Returns a view of the array with axes transposed. + Refer to `numpy.transpose` for full documentation. + For a 1-D array this has no effect, as a transposed vector is simply the same vector. To convert a 1-D array into a 2D column vector, an additional dimension must be added. `np.atleast2d(a).T` achieves this, as does @@ -4027,6 +4029,7 @@ add_newdoc('numpy.core.multiarray', 'ndarray', ('transpose', See Also -------- + ndarray.transpose : Method to reverse or permute the axes of an array. ndarray.T : Array property returning the array transposed. ndarray.reshape : Give a new shape to an array without changing its data. diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py index 2b88ccedf..cbab9424b 100644 --- a/numpy/core/fromnumeric.py +++ b/numpy/core/fromnumeric.py @@ -624,6 +624,7 @@ def transpose(a, axes=None): See Also -------- + ndarray.transpose : Method to reverse or permute the axes of an array. moveaxis argsort |
