Skip to content

Commit 883242d

Browse files
Catch invalid cast to int warning emitted by np.ma.masked_array during test_marginalized_change_point_model
1 parent daf3469 commit 883242d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pymc_experimental/tests/model/test_marginal_model.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ def disaster_model():
4242
early_rate = pm.Exponential("early_rate", 1.0, initval=3)
4343
late_rate = pm.Exponential("late_rate", 1.0, initval=1)
4444
rate = pm.math.switch(switchpoint >= years, early_rate, late_rate)
45-
with pytest.warns(ImputationWarning):
45+
with pytest.warns(ImputationWarning), pytest.warns(
46+
RuntimeWarning, match="invalid value encountered in cast"
47+
):
4648
disasters = pm.Poisson("disasters", rate, observed=disaster_data)
4749

4850
return disaster_model, years

0 commit comments

Comments
 (0)