Skip to content

Commit

Permalink
(fix): no __len__ on new zarr arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
ilan-gold committed Dec 8, 2024
1 parent 5c2a8b3 commit 434d15c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/anndata/_core/sparse_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ def append(self, sparse_matrix: ss.csr_matrix | ss.csc_matrix | SpArray) -> None
)
[indptr_offset] = self.group["indices"].shape
if self.group["indptr"].dtype == np.int32:
new_nnz = indptr_offset + len(sparse_matrix.indices)
new_nnz = indptr_offset + sparse_matrix.indices.shape[0]
if new_nnz >= np.iinfo(np.int32).max:
raise OverflowError(
"This array was written with a 32 bit intptr, but is now large "
Expand Down

0 comments on commit 434d15c

Please sign in to comment.