MCPcopy
hub / github.com/dask/dask / merge

Method merge

dask/highlevelgraph.py:640–652  ·  view source on GitHub ↗
(cls, *graphs: Graph)

Source from the content-addressed store, hash-verified

638
639 @classmethod
640 def merge(cls, *graphs: Graph) -> HighLevelGraph:
641 layers: dict[str, Graph] = {}
642 dependencies: dict[str, set[str]] = {}
643 for g in graphs:
644 if isinstance(g, HighLevelGraph):
645 layers.update(g.layers)
646 dependencies.update(g.dependencies)
647 elif isinstance(g, Mapping):
648 layers[str(id(g))] = g
649 dependencies[str(id(g))] = set()
650 else:
651 raise TypeError(g)
652 return cls(layers, dependencies)
653
654 def visualize(self, filename="dask-hlg.svg", format=None, **kwargs):
655 """

Callers 11

_construct_graphMethod · 0.45
_checkpoint_oneFunction · 0.45
block_oneFunction · 0.45
__dask_graph__Method · 0.45
_optimized_dskMethod · 0.45
_tune_downMethod · 0.45
_optimized_dskMethod · 0.45
_layerMethod · 0.45
_fuse_annotationsFunction · 0.45
rewrite_blockwiseFunction · 0.45
fuse_rootsFunction · 0.45

Calls 1

setClass · 0.85

Tested by

no test coverage detected