MCPcopy Create free account
hub / github.com/dask/dask / test_inv

Function test_inv

dask/array/tests/test_linalg.py:746–754  ·  view source on GitHub ↗
(shape, chunk)

Source from the content-addressed store, hash-verified

744
745@pytest.mark.parametrize(("shape", "chunk"), [(20, 10), (50, 10)])
746def test_inv(shape, chunk):
747 rng = np.random.default_rng(1)
748
749 A = rng.integers(1, 10, (shape, shape))
750 dA = da.from_array(A, (chunk, chunk))
751
752 res = da.linalg.inv(dA)
753 assert_eq(res, scipy.linalg.inv(A), check_graph=False)
754 assert_eq(dA.dot(res), np.eye(shape, dtype=float), check_graph=False)
755
756
757def _get_symmat(size):

Callers

nothing calls this directly

Calls 3

assert_eqFunction · 0.90
integersMethod · 0.45
dotMethod · 0.45

Tested by

no test coverage detected