diff options
author | Toshiki Kataoka <kataoka@preferred.jp> | 2019-03-05 20:05:07 +0900 |
---|---|---|
committer | Toshiki Kataoka <kataoka@preferred.jp> | 2019-03-05 20:17:54 +0900 |
commit | 9cfbfd88a021dca0a669bdeab4382ebb86b92c47 (patch) | |
tree | 17327be12db5a5e8b2952c0e911f26ad2196703c | |
parent | 15b092f5541e80d7c3d0108957406c6f8686aba0 (diff) | |
download | numpy-9cfbfd88a021dca0a669bdeab4382ebb86b92c47.tar.gz |
DOC: update doc of `ndarray.T`
`ndarray.T` is simply a shorthand of `transpose` without `axes` option.
`PyArray_Transpose` returns a new view of the input array, regardless of
`ndim`.
-rw-r--r-- | numpy/core/_add_newdocs.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/numpy/core/_add_newdocs.py b/numpy/core/_add_newdocs.py index d6c784ba1..cd2a6ce4e 100644 --- a/numpy/core/_add_newdocs.py +++ b/numpy/core/_add_newdocs.py @@ -2450,8 +2450,9 @@ add_newdoc('numpy.core.multiarray', 'ndarray', ('strides', add_newdoc('numpy.core.multiarray', 'ndarray', ('T', """ - Same as self.transpose(), except that self is returned if - self.ndim < 2. + The transposed array. + + Same as ``self.transpose()``. Examples -------- @@ -2468,6 +2469,10 @@ add_newdoc('numpy.core.multiarray', 'ndarray', ('T', >>> x.T array([ 1., 2., 3., 4.]) + See Also + -------- + transpose + """)) |