()
| 53 | |
| 54 | |
| 55 | def test_array_slice_deps(): |
| 56 | pytest.importorskip("numpy") |
| 57 | dac = pytest.importorskip("dask.array.core") |
| 58 | d = 2 # number of chunks in x,y |
| 59 | chunk = (2, 3) # chunk shape |
| 60 | shape = tuple(d * n for n in chunk) # array shape |
| 61 | chunks = dac.normalize_chunks(chunk, shape) |
| 62 | array_deps = ArraySliceDep(chunks) |
| 63 | |
| 64 | def check(i, j): |
| 65 | slices = array_deps[(i, j)] |
| 66 | assert slices == ( |
| 67 | slice(chunk[0] * i, chunk[0] * (i + 1), None), |
| 68 | slice(chunk[1] * j, chunk[1] * (j + 1), None), |
| 69 | ) |
| 70 | |
| 71 | for i in range(d): |
| 72 | for j in range(d): |
| 73 | check(i, j) |
| 74 | |
| 75 | |
| 76 | def _dataframe_shuffle(tmpdir): |
nothing calls this directly
no test coverage detected
searching dependent graphs…