From 2c1f7b26ac12d5ef919a9a4d07ef9211e6428df7 Mon Sep 17 00:00:00 2001 From: Michal Klein <46717574+michalk8@users.noreply.github.com> Date: Tue, 3 Dec 2024 01:02:26 +0100 Subject: [PATCH] Fix rtol for sciPy iterative solver, bump version --- pyproject.toml | 2 +- src/cellrank/_utils/_linear_solver.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c53aadb8..1c19ff96 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ dependencies = [ "pygpcca>=1.0.4", "scanpy>=1.7.2", "scikit-learn>=0.24.0", - "scipy>=1.2.0", + "scipy>=1.12.0", "scvelo>=0.2.5", "seaborn>=0.10.0", "wrapt>=1.12.1", diff --git a/src/cellrank/_utils/_linear_solver.py b/src/cellrank/_utils/_linear_solver.py index a310a709..d97559ea 100644 --- a/src/cellrank/_utils/_linear_solver.py +++ b/src/cellrank/_utils/_linear_solver.py @@ -223,11 +223,9 @@ def _solve_many_sparse_problems( """ # initialise solution list and info list x_list, n_converged = [], 0 - kwargs = {} if solver is not sp.linalg.gmres else {"atol": "legacy"} # get rid of the warning - for b in mat_b: # actually call the solver for the current sub-problem - x, info = solver(mat_a, b.toarray().flatten(), tol=tol, x0=None, **kwargs) + x, info = solver(mat_a, b.toarray().flatten(), rtol=tol, x0=None) # append solution and info x_list.append(np.atleast_1d(x))