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

Function _assert_stacked_square

numpy/linalg/_linalg.py:250–258  ·  view source on GitHub ↗
(*arrays)

Source from the content-addressed store, hash-verified

248 'at least two-dimensional')
249
250def _assert_stacked_square(*arrays):
251 for a in arrays:
252 try:
253 m, n = a.shape[-2:]
254 except ValueError:
255 raise LinAlgError(f'{a.ndim}-dimensional array given. Array must be '
256 'at least two-dimensional')
257 if m != n:
258 raise LinAlgError('Last 2 dimensions of the array must be square')
259
260def _assert_finite(*arrays):
261 for a in arrays:

Callers 11

solveFunction · 0.85
invFunction · 0.85
matrix_powerFunction · 0.85
choleskyFunction · 0.85
eigvalsFunction · 0.85
eigvalshFunction · 0.85
eigFunction · 0.85
eighFunction · 0.85
condFunction · 0.85
slogdetFunction · 0.85
detFunction · 0.85

Calls 1

LinAlgErrorClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…