| [ Web Proxy ] |
| Viewing: https://numpy.org/doc/stable/reference/generated/../generated/numpy.matrix_transpose.html | [Back] [Original] |
Transposes a matrix (or a stack of matrices) x.
This function is Array API compatible.
Input array having shape (, M, N) and whose two innermost
dimensions form MxN matrices.
An array containing the transpose for each matrix and having shape (, N, M).
See also
transposeGeneric transpose method.
Examples
>>> import numpy as np
>>> np.matrix_transpose([[1, 2], [3, 4]])
array([[1, 3],
[2, 4]])
>>> np.matrix_transpose([[[1, 2], [3, 4]], [[5, 6], [7, 8]]])
array([[[1, 3],
[2, 4]],
[[5, 7],
[6, 8]]])
| Web Proxy Viewer | New URL | Original Page |