diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f9133d2d..0fa8356f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,7 @@ jobs: python: ['3.9', '3.10', '3.11', '3.12'] slepc: [noslepc] include: - - os: macos-14 + - os: macos-15 python: '3.10' slepc: noslepc - os: ubuntu-latest diff --git a/pyproject.toml b/pyproject.toml index c53aadb8..6a8ac9bd 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", @@ -239,7 +239,7 @@ legacy_tox_ini = """ # TODO(michalk8): upgrade to `tox>=4.0` once `tox-conda` supports it requires = tox-conda isolated_build = true -envlist = lint-code,py{3.9,3.10,3.11,3.12}-{slepc,noslepc} +envlist = lint-code,py{3.9,3.10,3.11,3.12,3.13}-{slepc,noslepc} skip_missing_interpreters = true [testenv] diff --git a/src/cellrank/__init__.py b/src/cellrank/__init__.py index 775792b9..17cf0fed 100644 --- a/src/cellrank/__init__.py +++ b/src/cellrank/__init__.py @@ -1,5 +1,7 @@ from importlib import metadata +import scipy.sparse as sp + from cellrank import datasets, estimators, kernels, logging, models, pl from cellrank._utils._lineage import Lineage from cellrank.settings import settings @@ -14,4 +16,7 @@ except ImportError: md = None -del metadata, md +# pygam uses `.A` +sp.spmatrix.A = property(lambda self: self.toarray()) + +del metadata, md, sp 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))