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

Function test_intersect_1

dask/array/tests/test_rechunk.py:103–113  ·  view source on GitHub ↗

Convert 1 D chunks

()

Source from the content-addressed store, hash-verified

101
102
103def test_intersect_1():
104 """Convert 1 D chunks"""
105 old = ((10, 10, 10, 10, 10),)
106 new = ((25, 5, 20),)
107 answer = [
108 (((0, slice(0, 10)),), ((1, slice(0, 10)),), ((2, slice(0, 5)),)),
109 (((2, slice(5, 10)),),),
110 (((3, slice(0, 10)),), ((4, slice(0, 10)),)),
111 ]
112 cross = list(intersect_chunks(old_chunks=old, new_chunks=new))
113 assert answer == cross
114
115
116def test_intersect_2():

Callers

nothing calls this directly

Calls 1

intersect_chunksFunction · 0.90

Tested by

no test coverage detected