Skip to content

Commit 7be2415

Browse files
jessegrabowskiDekermanjian
authored andcommitted
Ignore new numpy matmul warnings in tests
1 parent 057c8cf commit 7be2415

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

tests/statespace/test_SARIMAX.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,9 @@ def test_make_SARIMA_transition_matrix(p, d, q, P, D, Q, S):
252252
"ignore:Non-stationary starting autoregressive parameters found",
253253
"ignore:Non-invertible starting seasonal moving average",
254254
"ignore:Non-stationary starting seasonal autoregressive",
255+
"ignore:divide by zero encountered in matmul:RuntimeWarning",
256+
"ignore:overflow encountered in matmul:RuntimeWarning",
257+
"ignore:invalid value encountered in matmul:RuntimeWarning",
255258
)
256259
def test_SARIMAX_update_matches_statsmodels(p, d, q, P, D, Q, S, data, rng):
257260
sm_sarimax = sm.tsa.SARIMAX(data, order=(p, d, q), seasonal_order=(P, D, Q, S))
@@ -361,6 +364,9 @@ def test_interpretable_states_are_interpretable(arima_mod_interp, pymc_mod_inter
361364
"ignore:Non-invertible starting MA parameters found.",
362365
"ignore:Non-stationary starting autoregressive parameters found",
363366
"ignore:Maximum Likelihood optimization failed to converge.",
367+
"ignore:divide by zero encountered in matmul:RuntimeWarning",
368+
"ignore:overflow encountered in matmul:RuntimeWarning",
369+
"ignore:invalid value encountered in matmul:RuntimeWarning",
364370
)
365371
def test_representations_are_equivalent(p, d, q, P, D, Q, S, data, rng):
366372
if (d + D) > 0:

tests/statespace/test_structural.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,11 @@ def test_autoregressive_model(order, rng):
594594
@pytest.mark.parametrize("s", [10, 25, 50])
595595
@pytest.mark.parametrize("innovations", [True, False])
596596
@pytest.mark.parametrize("remove_first_state", [True, False])
597+
@pytest.mark.filterwarnings(
598+
"ignore:divide by zero encountered in matmul:RuntimeWarning",
599+
"ignore:overflow encountered in matmul:RuntimeWarning",
600+
"ignore:invalid value encountered in matmul:RuntimeWarning",
601+
)
597602
def test_time_seasonality(s, innovations, remove_first_state, rng):
598603
def random_word(rng):
599604
return "".join(rng.choice(list("abcdefghijklmnopqrstuvwxyz")) for _ in range(5))

0 commit comments

Comments
 (0)