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

Function test_intersect_2

dask/array/tests/test_rechunk.py:116–127  ·  view source on GitHub ↗

Convert 1 D chunks

()

Source from the content-addressed store, hash-verified

114
115
116def test_intersect_2():
117 """Convert 1 D chunks"""
118 old = ((20, 20, 20, 20, 20),)
119 new = ((58, 4, 20, 18),)
120 answer = [
121 (((0, slice(0, 20)),), ((1, slice(0, 20)),), ((2, slice(0, 18)),)),
122 (((2, slice(18, 20)),), ((3, slice(0, 2)),)),
123 (((3, slice(2, 20)),), ((4, slice(0, 2)),)),
124 (((4, slice(2, 20)),),),
125 ]
126 cross = list(intersect_chunks(old_chunks=old, new_chunks=new))
127 assert answer == cross
128
129
130def test_rechunk_1d():

Callers

nothing calls this directly

Calls 1

intersect_chunksFunction · 0.90

Tested by

no test coverage detected