Previous topic

numpy.recarray

Next topic

numpy.recarray.base

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

numpy.recarray.T

recarray.T

Same as self.transpose(), except that self is returned if self.ndim < 2.

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.])