Skip to content

Commit 915262e

Browse files
committed
deps: support numpy 1.26
1 parent 1a48837 commit 915262e

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

.github/workflows/pytest-core-nompi.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ jobs:
4646
pytest-ubuntu-py313-gcc14-omp
4747
]
4848
set: [base, adjoint]
49+
50+
# default for everyone
51+
numpy: ["numpy"]
52+
4953
include:
5054
- name: pytest-ubuntu-py311-gcc11-cxxnoomp
5155
python-version: '3.11'
@@ -67,6 +71,7 @@ jobs:
6771
arch: "gcc-14"
6872
language: "openmp"
6973
sympy: "1.12"
74+
numpy: "numpy==1.26"
7075

7176
- name: pytest-ubuntu-py311-gcc10-noomp
7277
python-version: '3.11'
@@ -187,6 +192,7 @@ jobs:
187192
python3 -m pip install ${{ env.PIPFLAGS }} --upgrade pip
188193
python3 -m pip install ${{ env.PIPFLAGS }} -e ".[tests,extras]"
189194
python3 -m pip install ${{ env.PIPFLAGS }} sympy==${{matrix.sympy}}
195+
python3 -m pip install ${{ env.PIPFLAGS }} ${{matrix.numpy}}
190196
191197
- name: Check Docker image Python version
192198
if: "contains(matrix.name, 'docker')"

devito/ir/support/guards.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ class GuardExpr(LocalObject, BooleanFunction):
354354
it is defined.
355355
"""
356356

357-
dtype = np.bool
357+
dtype = np.bool_
358358

359359
def __init__(self, name, liveness='eager', **kwargs):
360360
super().__init__(name, liveness=liveness, **kwargs)

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
pip>=9.0.1
2-
numpy>=2,<=2.3.3
2+
numpy>=1.26,<=2.3.3
33
sympy>=1.12.1,<1.15
44
psutil>=5.1.0,<8.0
55
py-cpuinfo<10

tests/test_symbolics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,7 @@ def test_reduce_to_number(self):
881881

882882
w_sub = uxreplace(w_lowered, {h_x: Number(3)})
883883

884-
assert np.isclose(w_sub, -0.003935689)
884+
assert np.isclose(float(w_sub), -0.003935689)
885885
assert not w_sub.is_Mul
886886
assert w_sub.is_Number
887887

0 commit comments

Comments
 (0)