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

Function test_overlap_not_adding_empty_tasks

dask/array/tests/test_overlap.py:942–960  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

940
941
942def test_overlap_not_adding_empty_tasks():
943 arr = da.zeros((30, 5), chunks=(10, 5))
944
945 def dummy(x):
946 return x
947
948 result = arr.map_overlap(dummy, depth={0: (0, 1)})
949 dsk = dict(result.dask)
950
951 def check(v):
952 return (
953 isinstance(v, tuple)
954 and len(v) >= 3
955 and isinstance(v[2], tuple)
956 and v[2] == (slice(0, 0, None), slice(None))
957 )
958
959 assert not any(check(v) for v in dsk.values())
960 result.compute()
961
962
963def test_map_overlap_new_axis():

Callers

nothing calls this directly

Calls 6

anyFunction · 0.85
checkFunction · 0.70
zerosMethod · 0.45
map_overlapMethod · 0.45
valuesMethod · 0.45
computeMethod · 0.45

Tested by

no test coverage detected