File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -49,12 +49,17 @@ jobs:
49
49
COVERALLS_PARALLEL : true
50
50
COVERALLS_FLAG_NAME : ${{ matrix.python-version }}-${{ matrix.os }}
51
51
52
- leading_edge :
52
+ numpy_edge :
53
53
runs-on : ${{ matrix.os }}
54
54
strategy :
55
55
matrix :
56
56
python-version : ["3.12"]
57
+ numpy-version : ["numpy>=2.0.0rc1"]
57
58
os : ["ubuntu-latest"]
59
+ include :
60
+ - python-version : " 3.9"
61
+ numpy-version : " numpy<1.25"
62
+ os : " ubuntu-latest"
58
63
59
64
steps :
60
65
- name : Checkout
68
73
- name : Install dependencies
69
74
run : |
70
75
python -m pip install -U pip
71
- python -m pip install pip install pytest "numpy>=2.0.0rc1 "
76
+ python -m pip install pip install pytest "${{ matrix.numpy-version }} "
72
77
python -m pip install -e.
73
78
- name : Run tests
74
79
run : pytest
Original file line number Diff line number Diff line change 21
21
# for py2.7, will be an Exception in 3.8
22
22
from collections import Iterable
23
23
24
+ try :
25
+ # Try to import from numpy.exceptions (available in NumPy 1.25 and later)
26
+ from numpy .exceptions import VisibleDeprecationWarning
27
+ except ImportError :
28
+ # Fallback to the top-level numpy import (for older versions)
29
+ from numpy import VisibleDeprecationWarning
30
+
24
31
25
32
class EnsembleSampler (object ):
26
33
"""An ensemble MCMC sampler
@@ -511,7 +518,7 @@ def compute_log_prob(self, coords):
511
518
try :
512
519
with warnings .catch_warnings (record = True ):
513
520
warnings .simplefilter (
514
- "error" , np . exceptions . VisibleDeprecationWarning
521
+ "error" , VisibleDeprecationWarning
515
522
)
516
523
try :
517
524
dt = np .atleast_1d (blob [0 ]).dtype
You can’t perform that action at this time.
0 commit comments