Base.transpose

Base.transpose(*, useLog=None)

Invert the feature and point indices of the data.

Transpose the data in this object, inplace, by inverting the feature and point indices. This includes inverting the point and feature names, when available.

Parameters:

useLog (bool, None) – Local control for whether to send object creation to the logger. If None (default), use the value as specified in the “logger” “enabledByDefault” configuration option. If True, send to the logger regardless of the global option. If False, do NOT send to the logger, regardless of the global option.

See also

T

Return the transposed object as a new object.

Examples

>>> lst = [[1, 2, 3], [4, 5, 6]]
>>> X = nimble.data(lst)
>>> X
<Matrix 2pt x 3ft
     0  1  2
   ┌────────
 0 │ 1  2  3
 1 │ 4  5  6
>
>>> X.transpose()
>>> X
<Matrix 3pt x 2ft
     0  1
   ┌─────
 0 │ 1  4
 1 │ 2  5
 2 │ 3  6
>

Keywords: invert, .T, reflect, inverse