MCPcopy
hub / github.com/pydata/xarray / __dask_graph__

Method __dask_graph__

xarray/core/dataset.py:645–658  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

643 )
644
645 def __dask_graph__(self):
646 graphs = {k: v.__dask_graph__() for k, v in self.variables.items()}
647 graphs = {k: v for k, v in graphs.items() if v is not None}
648 if not graphs:
649 return None
650 else:
651 try:
652 from dask.highlevelgraph import HighLevelGraph
653
654 return HighLevelGraph.merge(*graphs.values())
655 except ImportError:
656 from dask import sharedict
657
658 return sharedict.merge(*graphs.values())
659
660 def __dask_keys__(self):
661 import dask

Callers 9

test_persistMethod · 0.45
test_persistMethod · 0.45
test_graph_manipulationFunction · 0.45
test_minimize_graph_sizeFunction · 0.45
num_graph_nodesMethod · 0.45
test_persistMethod · 0.45
test_asyncFunction · 0.45

Calls 3

itemsMethod · 0.80
mergeMethod · 0.45
valuesMethod · 0.45

Tested by 9

test_persistMethod · 0.36
test_persistMethod · 0.36
test_graph_manipulationFunction · 0.36
test_minimize_graph_sizeFunction · 0.36
num_graph_nodesMethod · 0.36
test_persistMethod · 0.36
test_asyncFunction · 0.36