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

Function isdag

dask/core.py:482–501  ·  view source on GitHub ↗

Does Dask form a directed acyclic graph when calculating keys? ``keys`` may be a single key or list of keys. Examples -------- >>> inc = lambda x: x + 1 >>> inc = lambda x: x + 1 >>> isdag({'x': 0, 'y': (inc, 'x')}, 'y') True >>> isdag({'x': (inc, 'y'), 'y': (inc,

(d, keys)

Source from the content-addressed store, hash-verified

480
481
482def isdag(d, keys):
483 """Does Dask form a directed acyclic graph when calculating keys?
484
485 ``keys`` may be a single key or list of keys.
486
487 Examples
488 --------
489
490 >>> inc = lambda x: x + 1
491 >>> inc = lambda x: x + 1
492 >>> isdag({'x': 0, 'y': (inc, 'x')}, 'y')
493 True
494 >>> isdag({'x': (inc, 'y'), 'y': (inc, 'x')}, 'y')
495 False
496
497 See Also
498 --------
499 getcycle
500 """
501 return not getcycle(d, keys)
502
503
504class literal:

Callers

nothing calls this directly

Calls 1

getcycleFunction · 0.85

Tested by

no test coverage detected