diff --git a/.github/workflows/pytest-dev.yaml b/.github/workflows/pytest-dev.yaml index a66a15be..61518d42 100644 --- a/.github/workflows/pytest-dev.yaml +++ b/.github/workflows/pytest-dev.yaml @@ -13,6 +13,7 @@ jobs: - ubuntu-latest python-version: - "3.12" + - "3.10" runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 diff --git a/CHANGELOG.md b/CHANGELOG.md index 278685f6..fa5a786a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/earthdaily/__init__.py b/earthdaily/__init__.py index 6c23d445..419180e3 100644 --- a/earthdaily/__init__.py +++ b/earthdaily/__init__.py @@ -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( diff --git a/earthdaily/earthdatastore/cube_utils/_zonal.py b/earthdaily/earthdatastore/cube_utils/_zonal.py index 65b3ec3c..a7d29770 100644 --- a/earthdaily/earthdatastore/cube_utils/_zonal.py +++ b/earthdaily/earthdatastore/cube_utils/_zonal.py @@ -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) diff --git a/requirements.yml b/requirements.yml index fafcde60..c8039e41 100644 --- a/requirements.yml +++ b/requirements.yml @@ -6,6 +6,7 @@ dependencies: - numpy - matplotlib - joblib +- gdal=3.7.3 - scipy - psutil - pystac-client @@ -14,7 +15,7 @@ dependencies: - pandas>=2 - geopandas - requests -- xarray +- xarray>=2024.7.0 - rasterio - rioxarray - tqdm diff --git a/requirements_dev.yml b/requirements_dev.yml index 0eafca76..6fa95835 100644 --- a/requirements_dev.yml +++ b/requirements_dev.yml @@ -10,7 +10,7 @@ dependencies: - geopandas>=0.11 - dask>=2024.3 - shapely - - xarray + - xarray>=2024.7.0 - rasterio - rioxarray - matplotlib