Skip to content

Commit 4062d4c

Browse files
committed
Only rechunk in non-core dims in test_count_call_alleles__chunked
1 parent a7ea830 commit 4062d4c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

sgkit/tests/test_aggregation.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,12 @@ def test_count_call_alleles__chunked():
265265
calls = rs.randint(0, 1, size=(50, 10, 2))
266266
ds = get_dataset(calls)
267267
ac1 = count_call_alleles(ds)
268-
# Coerce from numpy to multiple chunks in all dimensions
269-
ds["call_genotype"] = ds["call_genotype"].chunk(chunks=(5, 5, 1))
268+
# Coerce from numpy to multiple chunks in all non-core dimensions
269+
ds["call_genotype"] = ds["call_genotype"].chunk(
270+
chunks={"variants": 5, "samples": 5}
271+
)
270272
ac2 = count_call_alleles(ds)
271-
assert isinstance(ac2["call_allele_count"].data, da.Array)
273+
assert hasattr(ac2["call_allele_count"].data, "chunks")
272274
xr.testing.assert_equal(ac1, ac2)
273275

274276

0 commit comments

Comments
 (0)