Skip to content

Commit 5c67afd

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent fa33967 commit 5c67afd

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tests/test_gpu.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
from squidpy.settings import settings
88

9-
109
# Skip all tests in this module if GPU is not available
1110
pytestmark = pytest.mark.skipif(
1211
not settings.gpu_available(),
@@ -28,7 +27,7 @@ def test_co_occurrence_gpu(self, adata):
2827
copy=True,
2928
device="gpu",
3029
)
31-
30+
3231
assert result is not None
3332
arr, interval = result
3433
assert arr.ndim == 3
@@ -47,18 +46,18 @@ def test_co_occurrence_gpu_vs_cpu(self, adata):
4746
copy=True,
4847
device="cpu",
4948
)
50-
49+
5150
# Run on GPU
5251
gpu_result = sq.gr.co_occurrence(
5352
adata,
5453
cluster_key="leiden",
5554
copy=True,
5655
device="gpu",
5756
)
58-
57+
5958
cpu_arr, cpu_interval = cpu_result
6059
gpu_arr, gpu_interval = gpu_result
61-
60+
6261
# Results should be close (allow for floating point differences)
6362
np.testing.assert_allclose(cpu_interval, gpu_interval, rtol=1e-5)
6463
np.testing.assert_allclose(cpu_arr, gpu_arr, rtol=1e-5)

0 commit comments

Comments
 (0)