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

Function is_dask_collection

xarray/namedarray/utils.py:68–75  ·  view source on GitHub ↗
(x: object)

Source from the content-addressed store, hash-verified

66
67
68def is_dask_collection(x: object) -> TypeGuard[DaskCollection]:
69 if module_available("dask"):
70 from dask.base import is_dask_collection
71
72 # use is_dask_collection function instead of dask.typing.DaskCollection
73 # see https://github.com/pydata/xarray/pull/8241#discussion_r1476276023
74 return is_dask_collection(x)
75 return False
76
77
78def is_duck_array(value: Any) -> TypeGuard[duckarray[Any, Any]]:

Callers 4

map_blocksFunction · 0.90
is_duck_dask_arrayFunction · 0.85
_dask_postpersistMethod · 0.85
test_lazy_corrcovFunction · 0.85

Calls 1

module_availableFunction · 0.85

Tested by 1

test_lazy_corrcovFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…