Skip to content

Commit 20e5f89

Browse files
committed
Update scipy dependency to >= 1.4.1
1 parent e54729f commit 20e5f89

File tree

4 files changed

+3
-24
lines changed

4 files changed

+3
-24
lines changed

RELEASE-NOTES.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## PyMC3 vNext (4.0.0)
44
### Breaking Changes
55
- ⚠ Theano-PyMC has been replaced with Aesara, so all external references to `theano`, `tt`, and `pymc3.theanof` need to be replaced with `aesara`, `at`, and `pymc3.aesaraf` (see [4471](https://github.com/pymc-devs/pymc3/pull/4471)).
6+
- ⚠ PyMC3 now requires Scipy version `>= 1.4.1` (see [4736](https://github.com/pymc-devs/pymc3/pull/4736)).
67
- ArviZ `plots` and `stats` *wrappers* were removed. The functions are now just available by their original names (see [#4549](https://github.com/pymc-devs/pymc3/pull/4471) and `3.11.2` release notes).
78
- The GLM submodule has been removed, please use [Bambi](https://bambinos.github.io/bambi/) instead.
89
- The `Distribution` keyword argument `testval` has been deprecated in favor of `initval`.

pymc3/tests/test_distributions.py

+1-15
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929
from aesara.tensor.var import TensorVariable
3030
from numpy import array, inf, log
3131
from numpy.testing import assert_allclose, assert_almost_equal, assert_equal
32-
from packaging.version import parse
33-
from scipy import __version__ as scipy_version
3432
from scipy import integrate
3533
from scipy.special import erf, logit
3634

@@ -110,8 +108,6 @@
110108
from pymc3.tests.helpers import select_by_precision
111109
from pymc3.vartypes import continuous_types
112110

113-
SCIPY_VERSION = parse(scipy_version)
114-
115111

116112
def get_lkj_cases():
117113
"""
@@ -1570,29 +1566,19 @@ def test_beta_binomial_distribution(self):
15701566
{"alpha": Rplus, "beta": Rplus, "n": NatSmall},
15711567
)
15721568

1573-
@pytest.mark.skipif(
1574-
condition=(SCIPY_VERSION < parse("1.4.0")), reason="betabinom is new in Scipy 1.4.0"
1575-
)
1576-
def test_beta_binomial_logp(self):
1569+
def test_beta_binomial(self):
15771570
self.check_logp(
15781571
BetaBinomial,
15791572
Nat,
15801573
{"alpha": Rplus, "beta": Rplus, "n": NatSmall},
15811574
lambda value, alpha, beta, n: sp.betabinom.logpmf(value, a=alpha, b=beta, n=n),
15821575
)
1583-
1584-
@pytest.mark.skipif(
1585-
condition=(SCIPY_VERSION < parse("1.4.0")), reason="betabinom is new in Scipy 1.4.0"
1586-
)
1587-
def test_beta_binomial_logcdf(self):
15881576
self.check_logcdf(
15891577
BetaBinomial,
15901578
Nat,
15911579
{"alpha": Rplus, "beta": Rplus, "n": NatSmall},
15921580
lambda value, alpha, beta, n: sp.betabinom.logcdf(value, a=alpha, b=beta, n=n),
15931581
)
1594-
1595-
def test_beta_binomial_selfconsistency(self):
15961582
self.check_selfconsistency_discrete_logcdf(
15971583
BetaBinomial,
15981584
Nat,

pymc3/tests/test_distributions_random.py

-8
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
import scipy.stats as st
2525

2626
from numpy.testing import assert_almost_equal, assert_array_almost_equal
27-
from packaging.version import parse
28-
from scipy import __version__ as scipy_version
2927
from scipy.special import expit
3028

3129
import pymc3 as pm
@@ -47,8 +45,6 @@
4745
product,
4846
)
4947

50-
SCIPY_VERSION = parse(scipy_version)
51-
5248

5349
def pymc3_random(
5450
dist,
@@ -1317,10 +1313,6 @@ def seeded_weibul_rng_fn(self):
13171313
]
13181314

13191315

1320-
@pytest.mark.skipif(
1321-
condition=(SCIPY_VERSION < parse("1.4.0")),
1322-
reason="betabinom is new in Scipy 1.4.0",
1323-
)
13241316
class TestBetaBinomial(BaseTestDistribution):
13251317
pymc_dist = pm.BetaBinomial
13261318
pymc_dist_params = {"alpha": 2.0, "beta": 1.0, "n": 5}

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ fastprogress>=0.2.0
66
numpy>=1.15.0
77
pandas>=0.24.0
88
patsy>=0.5.1
9-
scipy>=1.2.0
9+
scipy>=1.4.1
1010
typing-extensions>=3.7.4

0 commit comments

Comments
 (0)