@@ -463,12 +463,12 @@ def check_logp(self, model, value, domain, paramdomains, logp_reference, decimal
463
463
decimal = select_by_precision (float64 = 6 , float32 = 3 )
464
464
assert_almost_equal (logp (pt ), logp_reference (pt ), decimal = decimal , err_msg = str (pt ))
465
465
466
- def check_logcdf (self , pymc3_dist , domain , paramdomains , scipy_logcdf , decimal = None ):
466
+ def check_logcdf (self , pymc3_dist , domain , paramdomains , scipy_logcdf , decimal = None , n_samples = 100 ):
467
467
domains = paramdomains .copy ()
468
468
domains ['value' ] = domain
469
469
if decimal is None :
470
470
decimal = select_by_precision (float64 = 6 , float32 = 3 )
471
- for pt in product (domains , n_samples = 100 ):
471
+ for pt in product (domains , n_samples = n_samples ):
472
472
params = dict (pt )
473
473
scipy_cdf = scipy_logcdf (** params )
474
474
value = params .pop ('value' )
@@ -656,7 +656,7 @@ def test_t(self):
656
656
self .pymc3_matches_scipy (StudentT , R , {'nu' : Rplus , 'mu' : R , 'lam' : Rplus },
657
657
lambda value , nu , mu , lam : sp .t .logpdf (value , nu , mu , lam ** - 0.5 ))
658
658
self .check_logcdf (StudentT , R , {'nu' : Rplus , 'mu' : R , 'lam' : Rplus },
659
- lambda value , nu , mu , lam : sp .t .logcdf (value , nu , mu , lam ** - 0.5 ))
659
+ lambda value , nu , mu , lam : sp .t .logcdf (value , nu , mu , lam ** - 0.5 ), n_samples = 10 )
660
660
661
661
def test_cauchy (self ):
662
662
self .pymc3_matches_scipy (Cauchy , R , {'alpha' : R , 'beta' : Rplusbig },
0 commit comments