cupy.matrix_transpose#

cupy.matrix_transpose(x, /)[source]#

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

This function is Array API compatible.

Parameters:

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

Returns:

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

Return type:

ndarray

See also

transpose

Generic transpose method.

numpy.matrix_transpose