Skip to content

Commit 60e0dae

Browse files
authored
Reduce number of test points in slow logcdf methods (#4459)
1 parent 3cd9eb3 commit 60e0dae

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pymc3/tests/test_distributions.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -948,6 +948,7 @@ def test_beta(self):
948948
Unit,
949949
{"alpha": Rplus, "beta": Rplus},
950950
lambda value, alpha, beta: sp.beta.logcdf(value, alpha, beta),
951+
n_samples=10,
951952
)
952953

953954
def test_kumaraswamy(self):
@@ -1052,17 +1053,20 @@ def scipy_mu_alpha_logcdf(value, mu, alpha):
10521053
Nat,
10531054
{"mu": Rplus, "alpha": Rplus},
10541055
scipy_mu_alpha_logcdf,
1056+
n_samples=5,
10551057
)
10561058
self.check_logcdf(
10571059
NegativeBinomial,
10581060
Nat,
10591061
{"p": Unit, "n": Rplus},
10601062
lambda value, p, n: sp.nbinom.logcdf(value, n, p),
1063+
n_samples=5,
10611064
)
10621065
self.check_selfconsistency_discrete_logcdf(
10631066
NegativeBinomial,
10641067
Nat,
10651068
{"mu": Rplus, "alpha": Rplus},
1069+
n_samples=10,
10661070
)
10671071

10681072
@pytest.mark.parametrize(
@@ -1282,11 +1286,13 @@ def test_binomial(self):
12821286
Nat,
12831287
{"n": NatSmall, "p": Unit},
12841288
lambda value, n, p: sp.binom.logcdf(value, n, p),
1289+
n_samples=10,
12851290
)
12861291
self.check_selfconsistency_discrete_logcdf(
12871292
Binomial,
12881293
Nat,
12891294
{"n": NatSmall, "p": Unit},
1295+
n_samples=10,
12901296
)
12911297

12921298
# Too lazy to propagate decimal parameter through the whole chain of deps
@@ -1423,6 +1429,7 @@ def test_zeroinflatednegativebinomial(self):
14231429
ZeroInflatedNegativeBinomial,
14241430
Nat,
14251431
{"mu": Rplusbig, "alpha": Rplusbig, "psi": Unit},
1432+
n_samples=10,
14261433
)
14271434

14281435
# Too lazy to propagate decimal parameter through the whole chain of deps
@@ -1437,6 +1444,7 @@ def test_zeroinflatedbinomial(self):
14371444
ZeroInflatedBinomial,
14381445
Nat,
14391446
{"n": NatSmall, "p": Unit, "psi": Unit},
1447+
n_samples=10,
14401448
)
14411449

14421450
@pytest.mark.parametrize("n", [1, 2, 3])

0 commit comments

Comments
 (0)