From 899c7d9a58c72b3b5d29d45ad2a2b7357ed6174a Mon Sep 17 00:00:00 2001 From: Tom White Date: Wed, 14 Aug 2024 14:23:18 +0100 Subject: [PATCH] Only rechunk in non-core dims in test_count_call_alleles__chunked --- sgkit/tests/test_aggregation.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sgkit/tests/test_aggregation.py b/sgkit/tests/test_aggregation.py index a5e68645e..34df9eddd 100644 --- a/sgkit/tests/test_aggregation.py +++ b/sgkit/tests/test_aggregation.py @@ -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)