File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 66
77from squidpy .settings import settings
88
9-
109# Skip all tests in this module if GPU is not available
1110pytestmark = 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 )
You can’t perform that action at this time.
0 commit comments