@@ -961,18 +961,16 @@ def test_discrete_unif(self):
961
961
assert logpt (invalid_dist , 0.5 ).eval () == - np .inf
962
962
assert logcdf (invalid_dist , 2 ).eval () == - np .inf
963
963
964
- @pytest .mark .xfail (reason = "Distribution not refactored yet" )
965
964
def test_flat (self ):
966
965
self .check_logp (Flat , Runif , {}, lambda value : 0 )
967
966
with Model ():
968
967
x = Flat ("a" )
969
968
assert_allclose (x .tag .test_value , 0 )
970
969
self .check_logcdf (Flat , R , {}, lambda value : np .log (0.5 ))
971
970
# Check infinite cases individually.
972
- assert 0.0 == logcdf (Flat .dist (), np .inf ).tag . test_value
973
- assert - np .inf == logcdf (Flat .dist (), - np .inf ).tag . test_value
971
+ assert 0.0 == logcdf (Flat .dist (), np .inf ).eval ()
972
+ assert - np .inf == logcdf (Flat .dist (), - np .inf ).eval ()
974
973
975
- @pytest .mark .xfail (reason = "Distribution not refactored yet" )
976
974
def test_half_flat (self ):
977
975
self .check_logp (HalfFlat , Rplus , {}, lambda value : 0 )
978
976
with Model ():
@@ -981,8 +979,8 @@ def test_half_flat(self):
981
979
assert x .tag .test_value .shape == (2 ,)
982
980
self .check_logcdf (HalfFlat , Rplus , {}, lambda value : - np .inf )
983
981
# Check infinite cases individually.
984
- assert 0.0 == logcdf (HalfFlat .dist (), np .inf ).tag . test_value
985
- assert - np .inf == logcdf (HalfFlat .dist (), - np .inf ).tag . test_value
982
+ assert 0.0 == logcdf (HalfFlat .dist (), np .inf ).eval ()
983
+ assert - np .inf == logcdf (HalfFlat .dist (), - np .inf ).eval ()
986
984
987
985
def test_normal (self ):
988
986
self .check_logp (
@@ -2499,17 +2497,19 @@ def test_vonmises(self):
2499
2497
lambda value , mu , kappa : floatX (sp .vonmises .logpdf (value , kappa , loc = mu )),
2500
2498
)
2501
2499
2502
- @pytest .mark .xfail (reason = "Distribution not refactored yet" )
2503
2500
def test_gumbel (self ):
2504
- def gumbel (value , mu , beta ):
2505
- return floatX (sp .gumbel_r .logpdf (value , loc = mu , scale = beta ))
2506
-
2507
- self .check_logp (Gumbel , R , {"mu" : R , "beta" : Rplusbig }, gumbel )
2508
-
2509
- def gumbellcdf (value , mu , beta ):
2510
- return floatX (sp .gumbel_r .logcdf (value , loc = mu , scale = beta ))
2511
-
2512
- self .check_logcdf (Gumbel , R , {"mu" : R , "beta" : Rplusbig }, gumbellcdf )
2501
+ self .check_logp (
2502
+ Gumbel ,
2503
+ R ,
2504
+ {"mu" : R , "beta" : Rplusbig },
2505
+ lambda value , mu , beta : sp .gumbel_r .logpdf (value , loc = mu , scale = beta ),
2506
+ )
2507
+ self .check_logcdf (
2508
+ Gumbel ,
2509
+ R ,
2510
+ {"mu" : R , "beta" : Rplusbig },
2511
+ lambda value , mu , beta : sp .gumbel_r .logcdf (value , loc = mu , scale = beta ),
2512
+ )
2513
2513
2514
2514
def test_logistic (self ):
2515
2515
self .check_logp (
@@ -2538,11 +2538,6 @@ def test_logitnormal(self):
2538
2538
decimal = select_by_precision (float64 = 6 , float32 = 1 ),
2539
2539
)
2540
2540
2541
- @pytest .mark .xfail (reason = "Distribution not refactored yet" )
2542
- def test_multidimensional_beta_construction (self ):
2543
- with Model ():
2544
- Beta ("beta" , alpha = 1.0 , beta = 1.0 , size = (10 , 20 ))
2545
-
2546
2541
@pytest .mark .xfail (
2547
2542
condition = (aesara .config .floatX == "float32" ),
2548
2543
reason = "Some combinations underflow to -inf in float32 in pymc version" ,
0 commit comments