From b1cf3248e0688ed589fba7d5f376da8ae1de7e94 Mon Sep 17 00:00:00 2001 From: Tom White Date: Fri, 30 Aug 2024 11:27:44 +0100 Subject: [PATCH] Add test for flip in test_mem_utilization --- cubed/tests/test_mem_utilization.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cubed/tests/test_mem_utilization.py b/cubed/tests/test_mem_utilization.py index 2bee8c40..b193ef46 100644 --- a/cubed/tests/test_mem_utilization.py +++ b/cubed/tests/test_mem_utilization.py @@ -243,6 +243,16 @@ def test_concat(tmp_path, spec, executor): run_operation(tmp_path, executor, "concat", c) +@pytest.mark.slow +def test_flip(tmp_path, spec, executor): + # Note 'a' has one fewer element in axis=0 to force chunking to cross array boundaries + a = cubed.random.random( + (9999, 10000), chunks=(5000, 5000), spec=spec + ) # 200MB chunks + b = xp.flip(a, axis=0) + run_operation(tmp_path, executor, "flip", b) + + @pytest.mark.slow def test_reshape(tmp_path, spec, executor): a = cubed.random.random(