Skip to content

Commit e3d2ec1

Browse files
committed
nnz may not fit in uint8.
1 parent 457dd56 commit e3d2ec1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sparse/numba_backend/_coo/core.py

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

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

15521552

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

0 commit comments

Comments
 (0)