Skip to content

Commit

Permalink
Only rechunk in non-core dims in test_count_call_alleles__chunked
Browse files Browse the repository at this point in the history
  • Loading branch information
tomwhite committed Sep 6, 2024
1 parent 28f58a4 commit 899c7d9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions sgkit/tests/test_aggregation.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,12 @@ def test_count_call_alleles__chunked():
calls = rs.randint(0, 1, size=(50, 10, 2))
ds = get_dataset(calls)
ac1 = count_call_alleles(ds)
# Coerce from numpy to multiple chunks in all dimensions
ds["call_genotype"] = ds["call_genotype"].chunk(chunks=(5, 5, 1))
# Coerce from numpy to multiple chunks in all non-core dimensions
ds["call_genotype"] = ds["call_genotype"].chunk(
chunks={"variants": 5, "samples": 5}
)
ac2 = count_call_alleles(ds)
assert isinstance(ac2["call_allele_count"].data, da.Array)
assert hasattr(ac2["call_allele_count"].data, "chunks")
xr.testing.assert_equal(ac1, ac2)


Expand Down

0 comments on commit 899c7d9

Please sign in to comment.