8000 Unnecessary comprehension by DimitriPapadopoulos · Pull Request #1997 · zarr-developers/zarr-python · GitHub
[go: up one dir, main page]

Skip to content

Unnecessary comprehension #1997

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

Merged
merged 1 commit into from
Jun 27, 2024
Merged
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
12 changes: 3 additions & 9 deletions src/zarr/abc/codec.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,7 @@ async def decode_partial(
Iterable[NDBuffer | None]
"""
return await concurrent_map(
[
(byte_getter, selection, chunk_spec)
for byte_getter, selection, chunk_spec in batch_info
],
list(batch_info),
self._decode_partial_single,
config.get("async.concurrency"),
)
Expand Down Expand Up @@ -227,10 +224,7 @@ async def encode_partial(
The chunk spec contains information about the chunk.
"""
await concurrent_map(
[
(byte_setter, chunk_array, selection, chunk_spec)
for byte_setter, chunk_array, selection, chunk_spec in batch_info
],
list(batch_info),
self._encode_partial_single,
config.get("async.concurrency"),
)
Expand Down Expand Up @@ -402,7 +396,7 @@ async def batching_helper(
batch_info: Iterable[tuple[CodecInput | None, ArraySpec]],
) -> list[CodecOutput | None]:
return await concurrent_map(
[(chunk_array, chunk_spec) for chunk_array, chunk_spec in batch_info],
list(batch_info),
noop_for_none(func),
config.get("async.concurrency"),
)
Expand Down
0