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

Function test_array_chunk_shape_dep

dask/tests/test_layers.py:37–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35
36
37def test_array_chunk_shape_dep():
38 pytest.importorskip("numpy")
39 dac = pytest.importorskip("dask.array.core")
40 d = 2 # number of chunks in x,y
41 chunk = (2, 3) # chunk shape
42 shape = tuple(d * n for n in chunk) # array shape
43 chunks = dac.normalize_chunks(chunk, shape)
44 array_deps = ArrayChunkShapeDep(chunks)
45
46 def check(i, j):
47 chunk_shape = array_deps[(i, j)]
48 assert chunk_shape == chunk
49
50 for i in range(d):
51 for j in range(d):
52 check(i, j)
53
54
55def test_array_slice_deps():

Callers

nothing calls this directly

Calls 2

ArrayChunkShapeDepClass · 0.90
checkFunction · 0.70

Tested by

no test coverage detected