Skip to content

Commit 0dfa265

Browse files
committed
nnz may not fit in uint8.
1 parent 199d878 commit 0dfa265

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sparse/numba_backend/_coo/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1540,15 +1540,15 @@ def __binsparse__(self) -> tuple[dict, list[np.ndarray]]:
15401540
"shape": list(self.shape),
15411541
"number_of_stored_values": self.nnz,
15421542
"data_types": {
1543-
"pointers_to_1": "uint8",
1543+
"pointers_to_1": "uint64",
15441544
"indices_1": str(self.coords.dtype),
15451545
"values": data_dt,
15461546
},
15471547
},
15481548
"original_source": f"`sparse`, version {__version__}",
15491549
}
15501550

1551-
return descriptor, [np.array([0, self.nnz], dtype=np.uint8), self.coords, self.data]
1551+
return descriptor, [np.array([0, self.nnz], dtype=np.uint64), self.coords, self.data]
15521552

15531553

15541554
def as_coo(x, shape=None, fill_value=None, idx_dtype=None):

0 commit comments

Comments
 (0)