How to transpose a matrix¶
Monadic ⍉ swaps rows and columns:
The shape changes from 3 4 to 4 3:
Transposing a vector returns it unchanged:
Transpose each matrix in a 3D array¶
Use the rank operator to transpose at rank 2:
See also: Apply a function to matrices