Skip to content

Commit 49abe3f

Browse files
authored
Reducing the running time of tests (#3823)
Updating number of samples
1 parent 54c6d06 commit 49abe3f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pymc3/tests/test_distributions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -463,12 +463,12 @@ def check_logp(self, model, value, domain, paramdomains, logp_reference, decimal
463463
decimal = select_by_precision(float64=6, float32=3)
464464
assert_almost_equal(logp(pt), logp_reference(pt), decimal=decimal, err_msg=str(pt))
465465

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):
467467
domains = paramdomains.copy()
468468
domains['value'] = domain
469469
if decimal is None:
470470
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):
472472
params = dict(pt)
473473
scipy_cdf = scipy_logcdf(**params)
474474
value = params.pop('value')
@@ -656,7 +656,7 @@ def test_t(self):
656656
self.pymc3_matches_scipy(StudentT, R, {'nu': Rplus, 'mu': R, 'lam': Rplus},
657657
lambda value, nu, mu, lam: sp.t.logpdf(value, nu, mu, lam**-0.5))
658658
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)
660660

661661
def test_cauchy(self):
662662
self.pymc3_matches_scipy(Cauchy, R, {'alpha': R, 'beta': Rplusbig},

0 commit comments

Comments
 (0)