MCPcopy Create free account
hub / github.com/numpy/numpy / transpose

Function transpose

numpy/linalg/linalg.py:225–240  ·  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

223
224
225def transpose(a):
226 """
227 Transpose each matrix in a stack of matrices.
228
229 Unlike np.transpose, this only swaps the last two axes, rather than all of
230 them
231
232 Parameters
233 ----------
234 a : (...,M,N) array_like
235
236 Returns
237 -------
238 aT : (...,N,M) ndarray
239 """
240 return swapaxes(a, -1, -2)
241
242# Linear equations
243

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