Skip to content

Commit 16ccc78

Browse files
committed
bugfix
1 parent 861cc57 commit 16ccc78

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

xarray/backends/api.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,9 @@ def _chunk_ds(
245245

246246
variables = {}
247247
for name, var in backend_ds.variables.items():
248+
if var._in_memory:
249+
variables[name] = var
250+
continue
248251
var_chunks = _get_chunk(
249252
var._data,
250253
chunks,

xarray/namedarray/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def _get_chunk( # type: ignore[no-untyped-def]
215215
from xarray.core.utils import emit_user_level_warning
216216
from xarray.structure.chunks import _get_breaks_cached
217217

218-
dims = dims or chunks.keys()
218+
dims = chunks.keys() if dims is None else dims
219219
shape = data.shape
220220

221221
# Determine the explicit requested chunks.

0 commit comments

Comments
 (0)