From 64aa15991262fbc51782a475035ddf6443bc95ae Mon Sep 17 00:00:00 2001 From: Chris Mutel Date: Mon, 19 Aug 2024 21:56:55 +0200 Subject: [PATCH] Update dependencies --- matrix_utils/mapped_matrix_dict.py | 4 ++-- pyproject.toml | 4 ++-- tests/mmd.py | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/matrix_utils/mapped_matrix_dict.py b/matrix_utils/mapped_matrix_dict.py index 1ada020..2fe7212 100644 --- a/matrix_utils/mapped_matrix_dict.py +++ b/matrix_utils/mapped_matrix_dict.py @@ -26,7 +26,7 @@ def __matmul__(self, other): return SparseMatrixDict( {unroll(a, b): c @ d.matrix for a, c in self.items() for b, d in other.items()} ) - elif sparse.base.issparse(other): + elif sparse.issparse(other): return SparseMatrixDict({a: b @ other for a, b in self.items()}) else: raise TypeError(f"Can't understand matrix multiplication for type {type(other)}") @@ -180,7 +180,7 @@ def __matmul__(self, other): Note that the mapped matrix dict must come first, i.e. `MappedMatrixDict @ other`. """ - if sparse.base.issparse(other): + if sparse.issparse(other): return SparseMatrixDict( [(key, value.matrix @ other) for key, value in self.matrices.items()] ) diff --git a/pyproject.toml b/pyproject.toml index f23b224..3284dde 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,9 +37,9 @@ dependencies = [ # dependencies as strings with quotes, e.g. "foo" # You can add version requirements like "foo>2.0" "numpy", - "scipy", + "scipy>=1.10", "pandas", - "bw_processing", + "bw_processing>=1.0", "stats_arrays", ] diff --git a/tests/mmd.py b/tests/mmd.py index 5a46e3e..33dc763 100644 --- a/tests/mmd.py +++ b/tests/mmd.py @@ -1,8 +1,7 @@ import bw_processing as bwp import numpy as np import pytest -from scipy.sparse import csr_matrix -from scipy.sparse.base import issparse +from scipy.sparse import csr_matrix, issparse from matrix_utils import ArrayMapper, MappedMatrix, MappedMatrixDict, SparseMatrixDict from matrix_utils.errors import AllArraysEmpty