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

Function test_cholesky_complex

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

Source from the content-addressed store, hash-verified

834
835@pytest.mark.parametrize(("shape", "chunk"), [(20, 10), (12, 3), (30, 6)])
836def test_cholesky_complex(shape, chunk):
837 rng = np.random.default_rng(42)
838 A = rng.standard_normal((shape, shape)) + 1j * rng.standard_normal((shape, shape))
839 A = A @ A.conj().T + shape * np.eye(shape)
840 dA = da.from_array(A, (chunk, chunk))
841
842 assert_eq(
843 da.linalg.cholesky(dA, lower=True),
844 scipy.linalg.cholesky(A, lower=True),
845 check_graph=False,
846 check_chunks=False,
847 )
848
849 assert_eq(
850 da.linalg.cholesky(dA, lower=False),
851 scipy.linalg.cholesky(A, lower=False),
852 check_graph=False,
853 check_chunks=False,
854 )
855
856
857@pytest.mark.parametrize("iscomplex", [False, True])

Callers

nothing calls this directly

Calls 3

assert_eqFunction · 0.90
standard_normalMethod · 0.45
conjMethod · 0.45

Tested by

no test coverage detected