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

Function test_xarray_like_reduction

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

Source from the content-addressed store, hash-verified

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