Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
Intron7 committed Dec 19, 2024
1 parent 5aace0d commit 580cc7a
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/dask/test_get.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,32 @@ def test_get_anndata(client, data_kind):

assert type(adata.X) is type(dask_adata.X._meta)

if data_kind == "sparse":
cp.testing.assert_array_equal(
adata.X.toarray(), dask_adata.X.compute().toarray()
)
else:
cp.testing.assert_array_equal(adata.X, dask_adata.X.compute())

rsc.get.anndata_to_CPU(dask_adata)
rsc.get.anndata_to_CPU(adata)

assert type(adata.X) is type(dask_adata.X._meta)

if data_kind == "sparse":
cp.testing.assert_array_equal(
adata.X.toarray(), dask_adata.X.compute().toarray()
)
else:
cp.testing.assert_array_equal(adata.X, dask_adata.X.compute())
rsc.get.anndata_to_GPU(dask_adata)
rsc.get.anndata_to_GPU(adata)

assert type(adata.X) is type(dask_adata.X._meta)

if data_kind == "sparse":
cp.testing.assert_array_equal(
adata.X.toarray(), dask_adata.X.compute().toarray()
)
else:
cp.testing.assert_array_equal(adata.X, dask_adata.X.compute())

0 comments on commit 580cc7a

Please sign in to comment.