SciPy

This is documentation for an old release of NumPy (version 1.17). Read this page in the documentation of the latest stable release (version 2.2).

numpy.ndarray.T

attribute

ndarray.T

The transposed array.

Same as self.transpose().

See also

transpose

Examples

>>>
>>> x = np.array([[1.,2.],[3.,4.]])
>>> x
array([[ 1.,  2.],
       [ 3.,  4.]])
>>> x.T
array([[ 1.,  3.],
       [ 2.,  4.]])
>>> x = np.array([1.,2.,3.,4.])
>>> x
array([ 1.,  2.,  3.,  4.])
>>> x.T
array([ 1.,  2.,  3.,  4.])

Previous topic

numpy.ndarray.dtype

Next topic

numpy.ndarray.real