Skip to content

Commit 488b162

Browse files
committed
Add test for rechunk output
1 parent 3c973bb commit 488b162

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

cubed/tests/test_rechunk.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import cubed
44
import cubed as xp
5+
from cubed._testing import assert_array_equal
6+
from cubed.backend_array_api import namespace as nxp
57
from cubed.core.ops import _store_array
68
from cubed.core.rechunk import (
79
calculate_regular_stage_chunks,
@@ -140,6 +142,10 @@ def test_rechunk_hypothesis_generated_bug():
140142
for copy_chunks, target_chunks in rechunk_plan:
141143
verify_chunk_compatibility(shape, copy_chunks, target_chunks)
142144

145+
b = a.rechunk((5, 146))
146+
147+
assert_array_equal(b.compute(), nxp.ones(shape))
148+
143149

144150
@pytest.mark.parametrize(
145151
("start", "stop", "num", "expected"),

0 commit comments

Comments
 (0)