Skip to content

Commit b5205bb

Browse files
Merge pull request #5450 from michaelosthege/v3-pin-scipy-upper-limit
Pin SciPy to `>=1.7.3,<1.8.0` and XFAIL a failing test on float32.
2 parents baec0c3 + d76fd4c commit b5205bb

8 files changed

+16
-5
lines changed

RELEASE-NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
+ `pm.Lognormal` is now available as an alias for `pm.Lognormal` (see [#5389](https://github.com/pymc-devs/pymc/pull/5389)).
99

1010
### Bugfixes
11+
+ The upper limit for the SciPy version is `<1.8.0` and will most probably remain for all future `3.x.x` releases. For compatibility with newer SciPy versions please update to `pymc>=4.0.0`. Also see [#5448](https://github.com/pymc-devs/pymc/pull/5448).
1112
+ A hotfix is applied on import to remain compatible with NumPy 1.22 (see [#5316](https://github.com/pymc-devs/pymc/pull/5316)).
1213

1314
## PyMC3 3.11.4 (20 August 2021)

conda-envs/environment-dev-py37.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,16 @@ dependencies:
88
- libblas=*=*mkl
99
- mkl-service
1010
- nbsphinx>=0.4
11-
- numpy=1.15
11+
- numpy>=1.15,<1.22.2
1212
- numpydoc<1.2
13-
- pandas=0.24
1413
- pip
1514
- pre-commit>=2.8.0
1615
- pytest-cov>=2.5
1716
- pytest>=3.0
1817
- python-graphviz
1918
- python=3.7
2019
- recommonmark>=0.4
21-
- scipy=1.2
20+
- scipy>=1.4.1,<1.8.0
2221
- sphinx-autobuild>=0.7
2322
- sphinx>=1.5
2423
- watermark

conda-envs/environment-dev-py38.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ dependencies:
88
- libblas=*=*mkl
99
- mkl-service
1010
- nbsphinx>=0.4
11+
- numpy>=1.15,<1.22.2
1112
- numpydoc<1.2
1213
- pip
1314
- pre-commit>=2.8.0
@@ -16,6 +17,7 @@ dependencies:
1617
- python-graphviz
1718
- python=3.8
1819
- recommonmark>=0.4
20+
- scipy>=1.4.1,<1.8.0
1921
- sphinx-autobuild>=0.7
2022
- sphinx>=1.5
2123
- watermark

conda-envs/environment-dev-py39.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ dependencies:
88
- libblas=*=*mkl
99
- mkl-service
1010
- nbsphinx>=0.4
11+
- numpy>=1.15,<1.22.2
1112
- numpydoc<1.2
1213
- pip
1314
- pre-commit>=2.8.0
@@ -16,6 +17,7 @@ dependencies:
1617
- python-graphviz
1718
- python=3.9
1819
- recommonmark>=0.4
20+
- scipy>=1.4.1,<1.8.0
1921
- sphinx-autobuild>=0.7
2022
- sphinx>=1.5
2123
- watermark

conda-envs/windows-environment-dev-py38.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@ dependencies:
1616
# Extra stuff for dev, testing and docs build
1717
- ipython>=7.16
1818
- nbsphinx>=0.4
19+
- numpy>=1.15,<1.22.2
1920
- numpydoc<1.2
2021
- pre-commit>=2.8.0
2122
- pytest-cov>=2.5
2223
- pytest>=3.0
2324
- recommonmark>=0.4
25+
- scipy>=1.4.1,<1.8.0
2426
- sphinx-autobuild>=0.7
2527
- sphinx>=1.5
2628
- watermark

pymc3/tests/test_distributions.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,6 +1082,10 @@ def modified_scipy_hypergeom_logcdf(value, N, k, n):
10821082
{"N": NatSmall, "k": NatSmall, "n": NatSmall},
10831083
)
10841084

1085+
@pytest.mark.xfail(
1086+
condition=(theano.config.floatX == "float32"),
1087+
reason="Fails on float32 due to a float casting problem in the logcdf",
1088+
)
10851089
def test_negative_binomial(self):
10861090
def scipy_mu_alpha_logpmf(value, mu, alpha):
10871091
return sp.nbinom.logpmf(value, alpha, 1 - mu / (mu + alpha))

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ deprecat
55
h5py>=2.7
66
ipython>=7.16
77
nbsphinx>=0.4
8+
numpy>=1.15,<1.22.2
89
numpydoc<1.2
910
pre-commit>=2.8.0
1011
pytest-cov>=2.5

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ cachetools>=4.2.1
33
deprecat
44
dill
55
fastprogress>=0.2.0
6-
numpy>=1.15.0
6+
numpy>=1.15.0,<1.22.2
77
pandas>=0.24.0
88
patsy>=0.5.1
9-
scipy>=1.2.0
9+
scipy>=1.7.3,<1.8.0
1010
semver>=2.13.0
1111
theano-pymc==1.1.2
1212
typing-extensions>=3.7.4

0 commit comments

Comments
 (0)