We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e26aec9 commit e26fa13Copy full SHA for e26fa13
xarray/core/parallel.py
@@ -21,6 +21,7 @@
21
from .alignment import align
22
from .dataarray import DataArray
23
from .dataset import Dataset
24
+from .pycompat import is_duck_dask_array
25
26
try:
27
import dask
@@ -325,13 +326,13 @@ def _wrapper(
325
326
raise TypeError("kwargs must be a mapping (for example, a dict)")
327
328
for value in kwargs.values():
- if dask.is_dask_collection(value):
329
+ if is_duck_dask_array(value):
330
raise TypeError(
331
"Cannot pass dask collections in kwargs yet. Please compute or "
332
"load values before passing to map_blocks."
333
)
334
- if not dask.is_dask_collection(obj):
335
+ if not is_duck_dask_array(obj):
336
return func(obj, *args, **kwargs)
337
338
all_args = [obj] + list(args)
0 commit comments