MCPcopy
hub / github.com/dask/dask / test_diagonal_zero_chunks

Function test_diagonal_zero_chunks

dask/array/tests/test_creation.py:1027–1036  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1025
1026
1027def test_diagonal_zero_chunks():
1028 x = da.ones((8, 8), chunks=(4, 4))
1029 dd = da.ones((8, 8), chunks=(4, 4))
1030 d = da.diagonal(dd)
1031
1032 expected = np.ones((8,))
1033 assert_eq(d, expected)
1034 assert_eq(d + d, 2 * expected)
1035 A = d + x
1036 assert_eq(A, np.full((8, 8), 2.0))
1037
1038
1039@pytest.mark.parametrize("fn", ["zeros_like", "ones_like"])

Callers

nothing calls this directly

Calls 3

assert_eqFunction · 0.90
onesMethod · 0.45
fullMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…