Skip to content

Commit

Permalink
make dask-specific kwargs explicit in from_array
Browse files Browse the repository at this point in the history
  • Loading branch information
TomNicholas committed Apr 5, 2023
1 parent b15411c commit 53d6094
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions xarray/core/daskmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,13 @@ def is_chunked_array(self, data: Any) -> bool:
def chunks(self, data: "DaskArray") -> T_Chunks:
return data.chunks

def from_array(self, data, chunks, **kwargs) -> "DaskArray":
def from_array(
self, data, chunks, name=None, lock=False, inline_array=False
) -> "DaskArray":
import dask.array as da

from xarray.core import indexing

# dask-specific kwargs
name = kwargs.pop("name", None)
lock = kwargs.pop("lock", False)
inline_array = kwargs.pop("inline_array", False)

if is_duck_dask_array(data):
data = self.rechunk(data, chunks)
else:
Expand Down

0 comments on commit 53d6094

Please sign in to comment.