Skip to content

Commit 6a15833

Browse files
committed
fixed type error and locked versions
1 parent 7e73bac commit 6a15833

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

pyproject.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ classifiers = [
1616
"Programming Language :: Python :: 3",
1717
]
1818
dependencies = [
19-
"networkx",
20-
"numpy",
19+
"networkx==3.5",
20+
"numpy==2.3.3",
2121
"PySMT>=0.9.7.dev333",
22-
"scipy",
23-
"z3-solver",
22+
"scipy==1.16.2",
23+
"z3-solver==4.15.3.0",
2424
]
2525

2626
[project.urls]
@@ -32,8 +32,8 @@ docs = ["sphinx", "sphinx-rtd-theme", "sphinx-autodoc-typehints", "nbsphinx", "i
3232
test = ["pytest", "pytest-runner", "pytest-cov"]
3333
typing = [
3434
"mypy",
35-
"types-networkx; python_version>='3.10'",
36-
"scipy-stubs; python_version>='3.11'",
35+
"types-networkx==3.5.0.20250918; python_version>='3.10'",
36+
"scipy-stubs==1.16.2.0; python_version>='3.11'",
3737
]
3838
#nra = ["pysmt @ git+https://[email protected]/masinag/pysmt@nrat#egg=pysmt"]
3939

src/wmpy/integration/rejection.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@ def integrate(self, polytope: Polytope, integrand: Polynomial) -> float:
4242
for i in range(polytope.N):
4343
cost = np.array([1 if j == i else 0 for j in range(polytope.N)])
4444
res = linprog(cost, A_ub=A, b_ub=b, method="highs-ds", bounds=(None, None))
45-
lowerl.append(res.x[i])
45+
assert(res.x is not None)
46+
lowerl.append(res.x[i])
4647
res = linprog(-cost, A_ub=A, b_ub=b, method="highs-ds", bounds=(None, None))
48+
assert(res.x is not None)
4749
upperl.append(res.x[i])
4850

4951
lower, upper = np.array(lowerl), np.array(upperl)

0 commit comments

Comments
 (0)