Skip to content

Commit

Permalink
polish
Browse files Browse the repository at this point in the history
  • Loading branch information
crusaderky committed Jan 2, 2024
1 parent 14f7d99 commit 9798fdd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dask/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,10 @@ def is_dask_collection(x) -> bool:
# Read: https://github.com/dask/dask/pull/10676
return True

# xarray, pint, and possibly other wrappers always define a __dask_graph__ method,
# but it may return None if they wrap around a non-dask object.
# In all known dask collections other than dask-expr,
# calling __dask_graph__ is cheap
# calling __dask_graph__ is cheap.
return x.__dask_graph__() is not None


Expand Down

0 comments on commit 9798fdd

Please sign in to comment.