// Transpose a 1x1 matrix
type Matrix = ArrayTranspose<[[1]]>; // expected to be [[1]]
// Transpose a 2x2 matrix
type Matrix1 = ArrayTranspose<[[1, 'i'], [3, 4]]>; // expected to be [[1, 3], ["i", 4]]
// Transpose a 2x3 matrix
type Matrix2 = ArrayTranspose<[[1, true, 3], [4, 5, 6]]>; // expected to be [[1, 4], [true, 5], [3, 6]]
Transposes a given 2xN array or matrix
M
, flipping the matrix over its diagonal, switching its row and column indices.