MCPcopy
hub / github.com/dask/dask / test_xarray_like_reduction

Function test_xarray_like_reduction

dask/tests/test_order.py:1361–1387  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1359
1360
1361def test_xarray_like_reduction():
1362 a, b, c, d, e = list("abcde")
1363
1364 dsk = {}
1365 for ix in range(3):
1366 part = {
1367 # Part1
1368 (a, 0, ix): (f,),
1369 (a, 1, ix): (f,),
1370 (b, 0, ix): (f, (a, 0, ix)),
1371 (b, 1, ix): (f, (a, 0, ix), (a, 1, ix)),
1372 (b, 2, ix): (f, (a, 1, ix)),
1373 (c, 0, ix): (f, (b, 0, ix)),
1374 (c, 1, ix): (f, (b, 1, ix)),
1375 (c, 2, ix): (f, (b, 2, ix)),
1376 }
1377 dsk.update(part)
1378 for ix in range(3):
1379 dsk.update(
1380 {
1381 (d, ix): (f, (c, ix, 0), (c, ix, 1), (c, ix, 2)),
1382 }
1383 )
1384 o = order(dsk)
1385 assert_topological_sort(dsk, o)
1386 _, pressure = diagnostics(dsk, o=o)
1387 assert max(pressure) <= 9
1388
1389
1390@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 4

orderFunction · 0.90
diagnosticsFunction · 0.90
assert_topological_sortFunction · 0.85
maxFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…