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(