Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coverage improvements #674

Merged
merged 2 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions cubed/core/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 1 addition & 3 deletions cubed/tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading