MCPcopy Index your code
hub / github.com/numpy/numpy / transpose

Function transpose

numpy/linalg/_linalg.py:270–285  ·  view source on GitHub ↗

Transpose each matrix in a stack of matrices. Unlike np.transpose, this only swaps the last two axes, rather than all of them Parameters ---------- a : (...,M,N) array_like Returns ------- aT : (...,N,M) ndarray

(a)

Source from the content-addressed store, hash-verified

268
269
270def transpose(a):
271 """
272 Transpose each matrix in a stack of matrices.
273
274 Unlike np.transpose, this only swaps the last two axes, rather than all of
275 them
276
277 Parameters
278 ----------
279 a : (...,M,N) array_like
280
281 Returns
282 -------
283 aT : (...,N,M) ndarray
284 """
285 return swapaxes(a, -1, -2)
286
287# Linear equations
288

Callers 4

test_svd_buildMethod · 0.90
qrFunction · 0.70
svdFunction · 0.70
pinvFunction · 0.70

Calls 1

swapaxesFunction · 0.90

Tested by 1

test_svd_buildMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…