File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 25
25
import scipy .stats as st
26
26
27
27
from numpy .testing import assert_almost_equal , assert_array_almost_equal
28
+ from packaging .version import parse
29
+ from scipy import __version__ as scipy_version
28
30
from scipy .special import expit
29
31
30
32
import pymc3 as pm
54
56
product ,
55
57
)
56
58
59
+ SCIPY_VERSION = parse (scipy_version )
60
+
57
61
58
62
def pymc3_random (
59
63
dist ,
@@ -886,13 +890,19 @@ def seeded_weibul_rng_fn(self):
886
890
]
887
891
888
892
893
+ @pytest .mark .skipif (
894
+ condition = (SCIPY_VERSION < parse ("1.4.0" )),
895
+ reason = "betabinom is new in Scipy 1.4.0" ,
896
+ )
889
897
class TestBetaBinomial (BaseTestDistribution ):
890
898
pymc_dist = pm .BetaBinomial
891
899
pymc_dist_params = {"alpha" : 2.0 , "beta" : 1.0 , "n" : 5 }
892
900
expected_rv_op_params = {"n" : 5 , "alpha" : 2.0 , "beta" : 1.0 }
893
901
reference_dist_params = {"n" : 5 , "a" : 2.0 , "b" : 1.0 }
902
+ reference_dist = seeded_scipy_distribution_builder ("betabinom" )
894
903
tests_to_run = [
895
904
"check_pymc_params_match_rv_op" ,
905
+ "check_pymc_draws_match_reference" ,
896
906
"check_rv_size" ,
897
907
]
898
908
You can’t perform that action at this time.
0 commit comments