From b72e616a58bb7ba4b19f1f5bdc6387849633c72e Mon Sep 17 00:00:00 2001 From: ilan-gold Date: Tue, 27 Feb 2024 15:04:56 +0100 Subject: [PATCH] (fix) `lop1p` tests working --- scanpy/tests/test_preprocessing_distributed.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scanpy/tests/test_preprocessing_distributed.py b/scanpy/tests/test_preprocessing_distributed.py index d746713c47..4f6c734427 100644 --- a/scanpy/tests/test_preprocessing_distributed.py +++ b/scanpy/tests/test_preprocessing_distributed.py @@ -88,7 +88,9 @@ def test_log1p(adata: AnnData, adata_dist: AnnData): result = materialize_as_ndarray(adata_dist.X) log1p(adata) assert result.shape == adata.shape - npt.assert_allclose(result, adata.X) + npt.assert_allclose( + result.toarray() if isinstance(result, sp.spmatrix) else result, adata.X + ) def test_normalize_per_cell(