From b8c4d0957e02756aae399eaecfc5279c3fdf4730 Mon Sep 17 00:00:00 2001 From: Tom White Date: Thu, 16 Jan 2025 16:00:22 +0000 Subject: [PATCH 1/2] Remove unused code --- cubed/core/ops.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/cubed/core/ops.py b/cubed/core/ops.py index d9154183..f7902c4e 100644 --- a/cubed/core/ops.py +++ b/cubed/core/ops.py @@ -713,24 +713,6 @@ def _assemble_index_chunk( return out -def _read_index_chunk( - x, - *arrays, - target_chunks=None, - selection=None, - block_id=None, -): - array = arrays[0].zarray - idx = block_id - # Note that since we only have a maximum of one integer array index - # we don't need to use Zarr orthogonal indexing, since it is - # "available directly on the array" according to - # https://zarr.readthedocs.io/en/stable/tutorial.html#orthogonal-indexing - out = array[_target_chunk_selection(target_chunks, idx, selection)] - out = numpy_array_to_backend_array(out) - return out - - def _target_chunk_selection(target_chunks, idx, selection): # integer, integer array, and slice indexes can be interspersed in selection # idx is the chunk index for the output (target_chunks) From 7067a150b4ea6e1cb31f70e6694cf45a3b316e9f Mon Sep 17 00:00:00 2001 From: Tom White Date: Thu, 16 Jan 2025 16:05:29 +0000 Subject: [PATCH 2/2] test_measure_reserved_mem does run on 'processes' executor --- cubed/tests/test_core.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cubed/tests/test_core.py b/cubed/tests/test_core.py index afab1ee4..14569003 100644 --- a/cubed/tests/test_core.py +++ b/cubed/tests/test_core.py @@ -599,9 +599,7 @@ def test_array_pickle(spec, executor): @pytest.mark.skipif(platform.system() == "Windows", reason="does not run on windows") def test_measure_reserved_mem(executor): - pytest.importorskip("lithops") - - if executor.name != "lithops": + if executor.name not in ("processes", "lithops"): pytest.skip(f"{executor.name} executor does not support measure_reserved_mem") reserved_memory = cubed.measure_reserved_mem(executor=executor)