Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 28, 2024
1 parent d60c3ab commit 232bee4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/anndata/_io/specs/methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,10 @@ def _iter_chunks_for_copy(elem, dest):
else:
itemsize = elem.dtype.itemsize
shape = elem.shape
entry_chunk_size = (100 * 1024 * 1024 // itemsize) # number of elements to write
n_rows = max(entry_chunk_size // shape[0], 1000) # Number of rows that works out to
entry_chunk_size = 100 * 1024 * 1024 // itemsize # number of elements to write
n_rows = max(
entry_chunk_size // shape[0], 1000
) # Number of rows that works out to
return zip(
(slice(i, min(i + n_rows, shape[0])) for i in range(0, shape[0], n_rows)),
(slice(None) for _ in range(0, shape[0], n_rows)),
Expand All @@ -430,7 +432,6 @@ def write_chunked_dense_array(
dest[chunk] = elem[chunk]



_REGISTRY.register_write(H5Group, CupyArray, IOSpec("array", "0.2.0"))(
_to_cpu_mem_wrapper(write_basic)
)
Expand Down

0 comments on commit 232bee4

Please sign in to comment.