From 578590fd64aaee90d109a68242f46bb49e021ca2 Mon Sep 17 00:00:00 2001 From: Angus Gibson Date: Mon, 1 Jul 2024 16:15:02 +1000 Subject: [PATCH] Pin numpy<2.0.0 (#178) * Add new Python versions to testing matrix * Pin numpy in environment-ci.yml There are still a few incompatibilities with numpy 2.0.0, so we'll pin the previous version for the moment. In particular, xESMF regridders can't handle large grids with a number of points that overflows a 32-bit integer. * Pin numpy<2.0.0 in pyproject.toml * Remove Python 3.11 from testing For some reason it seems to hang indefinitely. We'll just disable it for the moment (3.12 works, anyway). --- .github/workflows/testing.yml | 2 +- environment-ci.yml | 1 + pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index f406515e..b0a281c5 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -23,7 +23,7 @@ jobs: shell: bash -el {0} strategy: matrix: - python-version: ["3.9", "3.10"] + python-version: ["3.9", "3.10", "3.12"] steps: - uses: actions/checkout@v3 diff --git a/environment-ci.yml b/environment-ci.yml index 4bc4c43f..a16cf6f7 100644 --- a/environment-ci.yml +++ b/environment-ci.yml @@ -3,3 +3,4 @@ channels: - conda-forge dependencies: - esmpy + - numpy<2.0.0 diff --git a/pyproject.toml b/pyproject.toml index e427db43..dacad296 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ dependencies = [ "dask[array]", "dask[distributed]", "netCDF4", - "numpy >= 1.17.0", + "numpy >= 1.17.0, < 2.0.0", "scipy >= 1.2.0", "xarray", "xesmf >= 0.8.4",