diff --git a/.github/workflows/pytest-core-nompi.yaml b/.github/workflows/pytest-core-nompi.yaml index 19c2379b9f..9b75ac714d 100644 --- a/.github/workflows/pytest-core-nompi.yaml +++ b/.github/workflows/pytest-core-nompi.yaml @@ -46,6 +46,7 @@ jobs: pytest-ubuntu-py313-gcc14-omp ] set: [base, adjoint] + include: - name: pytest-ubuntu-py311-gcc11-cxxnoomp python-version: '3.11' @@ -188,6 +189,10 @@ jobs: python3 -m pip install ${{ env.PIPFLAGS }} -e ".[tests,extras]" python3 -m pip install ${{ env.PIPFLAGS }} sympy==${{matrix.sympy}} + - name: Backward compat for numpy 1.26 + if: matrix.name == 'pytest-ubuntu-py310-gcc14-omp' + run: python3 -m pip install ${{ env.PIPFLAGS }} numpy==1.26 + - name: Check Docker image Python version if: "contains(matrix.name, 'docker')" run: | diff --git a/devito/ir/support/guards.py b/devito/ir/support/guards.py index dbb1fe9ca7..cb961e7d46 100644 --- a/devito/ir/support/guards.py +++ b/devito/ir/support/guards.py @@ -354,7 +354,7 @@ class GuardExpr(LocalObject, BooleanFunction): it is defined. """ - dtype = np.bool + dtype = np.bool_ def __init__(self, name, liveness='eager', **kwargs): super().__init__(name, liveness=liveness, **kwargs) diff --git a/requirements.txt b/requirements.txt index 3d6838202d..87b29dac9d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ pip>=9.0.1 -numpy>=2,<=2.3.3 +numpy>=1.26,<=2.4.3 sympy>=1.12.1,<1.15 psutil>=5.1.0,<8.0 py-cpuinfo<10 diff --git a/tests/test_symbolics.py b/tests/test_symbolics.py index 85d2818940..d799c68e64 100644 --- a/tests/test_symbolics.py +++ b/tests/test_symbolics.py @@ -881,7 +881,7 @@ def test_reduce_to_number(self): w_sub = uxreplace(w_lowered, {h_x: Number(3)}) - assert np.isclose(w_sub, -0.003935689) + assert np.isclose(float(w_sub), -0.003935689) assert not w_sub.is_Mul assert w_sub.is_Number