numpy.matrix_transpose

numpy.matrix_transpose(x, /)[source]

Transposes a matrix (or a stack of matrices) x.

This function is Array API compatible.

Parameters:
xarray_like

Input array having shape (…, M, N) and whose two innermost dimensions form MxN matrices.

Returns:
outndarray

An array containing the transpose for each matrix and having shape (…, N, M).

See also

transpose

Generic transpose method.

© 2005–2024 NumPy Developers
Licensed under the 3-clause BSD License.
https://numpy.org/doc/2.0/reference/generated/numpy.matrix_transpose.html