Skip to content

Commit 142263c

Browse files
Update lib.pyx
Revised to use intp_t for max_len in maybe_indices_to_slice. As per conversation with WillAyd revised patch as intp_t is the proper size for an indexer.
1 parent 7e53cdf commit 142263c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/_libs/lib.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,10 +494,10 @@ def has_only_ints_or_nan(const floating[:] arr) -> bool:
494494
return True
495495

496496

497-
def maybe_indices_to_slice(ndarray[intp_t, ndim=1] indices, uint64_t max_len):
497+
def maybe_indices_to_slice(ndarray[intp_t, ndim=1] indices, intp_t max_len):
498498
cdef:
499499
Py_ssize_t i, n = len(indices)
500-
uint64_t k, vstart, vlast, v
500+
intp_t k, vstart, vlast, v
501501

502502
if n == 0:
503503
return slice(0, 0)

0 commit comments

Comments
 (0)