Skip to content

Commit

Permalink
release(0.2.11) : fix zonal_stats
Browse files Browse the repository at this point in the history
release(0.2.11) : fix zonal_stats
  • Loading branch information
nkarasiak authored Oct 10, 2024
2 parents dd32219 + 7ebbf38 commit c0a9bc8
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pytest-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
- ubuntu-latest
python-version:
- "3.12"
- "3.10"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.11] - 2024-10-10

### Fixed

- `zonal_stats` now supported for python 3.10.

## [0.2.10] - 2024-10-10

### Added
Expand Down
2 changes: 1 addition & 1 deletion earthdaily/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# to hide warnings from rioxarray or nano seconds conversion
# warnings.filterwarnings("ignore")

__version__ = "0.2.10"
__version__ = "0.2.11"


def EarthDataStore(
Expand Down
2 changes: 1 addition & 1 deletion earthdaily/earthdatastore/cube_utils/_zonal.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def _zonal_stats_ufunc(dataset, positions, reducers):
for idx in range(len(positions)):
field_stats = []
for reducer in reducers:
field_arr = dataset[..., *positions[idx]]
field_arr = dataset[(...,) + tuple(positions[idx])]
func = f"nan{reducer}" if hasattr(np, f"nan{reducer}") else reducer
field_arr = getattr(np, func)(field_arr, axis=-1)
field_stats.append(field_arr)
Expand Down
3 changes: 2 additions & 1 deletion requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ dependencies:
- numpy
- matplotlib
- joblib
- gdal=3.7.3
- scipy
- psutil
- pystac-client
Expand All @@ -14,7 +15,7 @@ dependencies:
- pandas>=2
- geopandas
- requests
- xarray
- xarray>=2024.7.0
- rasterio
- rioxarray
- tqdm
Expand Down
2 changes: 1 addition & 1 deletion requirements_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies:
- geopandas>=0.11
- dask>=2024.3
- shapely
- xarray
- xarray>=2024.7.0
- rasterio
- rioxarray
- matplotlib
Expand Down

0 comments on commit c0a9bc8

Please sign in to comment.