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

Function test_intersect_chunks_with_nonzero

dask/array/tests/test_rechunk.py:1120–1136  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1118
1119
1120def test_intersect_chunks_with_nonzero():
1121 from dask.array.rechunk import intersect_chunks
1122
1123 old = ((4, 4), (2,))
1124 new = ((8,), (1, 1))
1125 result = list(intersect_chunks(old, new))
1126 expected = [
1127 (
1128 ((0, slice(0, 4, None)), (0, slice(0, 1, None))),
1129 ((1, slice(0, 4, None)), (0, slice(0, 1, None))),
1130 ),
1131 (
1132 ((0, slice(0, 4, None)), (0, slice(1, 2, None))),
1133 ((1, slice(0, 4, None)), (0, slice(1, 2, None))),
1134 ),
1135 ]
1136 assert result == expected
1137
1138
1139def test_intersect_chunks_with_zero():

Callers

nothing calls this directly

Calls 1

intersect_chunksFunction · 0.90

Tested by

no test coverage detected