Skip to content

Commit 6a4d0dc

Browse files
Merge pull request #49 from matthewfeickert/fix/revise-scipy-guard
fix: Restrict SciPy version warning to v1.16.0 - v1.16.2
2 parents 97072c5 + 03082de commit 6a4d0dc

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

smodels/base/runtime.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@ def checkForIncompatibleModuleVersions() -> bool:
2828
:returns: false if incompatible version found, else true
2929
"""
3030
from importlib.metadata import version
31-
if version("scipy")[:4] in [ "1.16", "1.17" ]:
32-
print ( f"SModelS warning: scipy v{version('scipy')} is installed, but it seems " \
33-
"this version does not work with pyhf 0.7.6. We recommend scipy 1.15.x " \
34-
"and pyhf 0.7.6. You have been warned." )
31+
if version("scipy")[:6] in ["1.16.0", "1.16.1", "1.16.2"]:
32+
print ( f"SModelS warning: scipy v{version('scipy')} is installed, but there is " \
33+
"a known optimizer issue in this scipy version that causes errors " \
34+
"for some pyhf models. " \
35+
"c.f. https://github.com/scikit-hep/pyhf/issues/2593. You have been warned." )
3536
return False
3637
return True
37-
38+
3839
checkForIncompatibleModuleVersions()
3940

4041
def returnGitCommitId():

smodels/share/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
docutils>=0.3
22
numpy>=1.20.0
3-
scipy>=1.0.0,<1.16.0
3+
scipy>=1.0.0,!=1.16.0,!=1.16.1,!=1.16.2
44
sympy>=1.0.0
55
unum>=4.0.0
66
requests>=2.0.0

0 commit comments

Comments
 (0)