Skip to content

Commit

Permalink
Fixing bug in DatasetZarr when backend is not set
Browse files Browse the repository at this point in the history
Signed-off-by: Julio Faracco <[email protected]>
  • Loading branch information
jcfaracco committed Oct 1, 2023
1 parent c7dc72f commit f952374
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dasf/datasets/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,9 +503,9 @@ def _lazy_load(self, xp, **kwargs):
store[".zarray"] = json.dumps(meta).encode()

array = zarr.open_array(store, meta_array=xp.empty(()))
return da.from_zarr(array, chunks=self._chunks).map_blocks(xp.asarray)
return da.from_zarr(array, chunks=array.chunks).map_blocks(xp.asarray)

return da.from_zarr(self._root_file, chunks=array.chunks).map_blocks(xp.asarray)
return da.from_zarr(self._root_file, chunks=self._chunks).map_blocks(xp.asarray)

def _load(self, xp, **kwargs):
"""Load data using CPU container.
Expand Down

0 comments on commit f952374

Please sign in to comment.