Skip to content

Commit 8d8a916

Browse files
committed
Fix: Avoid overflow when viewing large files
1 parent 6a0e2ee commit 8d8a916

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/usearch/io.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def load_matrix(
6363
return None
6464

6565
with open(filename, "rb") as f:
66-
rows, cols = np.fromfile(f, count=2, dtype=np.int32)
66+
rows, cols = np.fromfile(f, count=2, dtype=np.int32).astype(np.uint64)
6767
rows = (rows - start_row) if count_rows is None else count_rows
6868
row_offset = start_row * scalar_size * cols
6969

0 commit comments

Comments
 (0)