Skip to content

Commit

Permalink
FIX: Do not force chunk in utils.read if dask is not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
remi-braun committed Oct 26, 2021
1 parent cd6730c commit c356514
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## X.Y.Z (YYYY-MM-DD)

## 0.8.1 (2021-10-26)

- FIX: Do not force `chunk` in `utils.read` if dask is not installed

## 0.8.0 (2021-10-25)

- **BREAKING CHANGE: `crs`, `footprint`, `extent`, `wgs84_extent` are now properties !**
Expand Down
2 changes: 1 addition & 1 deletion eoreader/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def wrapper(*args, **kwargs):
return wrapper


__version__ = "0.8.0"
__version__ = "0.8.1"
__title__ = "eoreader"
__description__ = (
"Remote-sensing opensource python library reading optical and SAR sensors, "
Expand Down
7 changes: 6 additions & 1 deletion eoreader/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,19 @@ def read(
Union[XDS_TYPE]: Masked xarray corresponding to the raster data and its meta data
"""
if use_dask():
chunks = True
else:
chunks = None

return rasters.read(
path,
resolution=resolution,
size=size,
resampling=resampling,
masked=masked,
indexes=indexes,
chunks=True,
chunks=chunks,
**kwargs,
)

Expand Down

0 comments on commit c356514

Please sign in to comment.