Skip to content

Commit d99cc94

Browse files
authored
COMPAT: 32-bit indexing compat (#20989)
xref #19539
1 parent eff1faf commit d99cc94

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

pandas/_libs/index.pyx

+4-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ from cpython.slice cimport PySlice_Check
88

99
import numpy as np
1010
cimport numpy as cnp
11-
from numpy cimport ndarray, float64_t, int32_t, int64_t, uint8_t, uint64_t
11+
from numpy cimport (ndarray, float64_t, int32_t,
12+
int64_t, uint8_t, uint64_t, intp_t)
1213
cnp.import_array()
1314

1415
cdef extern from "numpy/arrayobject.h":
@@ -183,8 +184,8 @@ cdef class IndexEngine:
183184

184185
cdef _maybe_get_bool_indexer(self, object val):
185186
cdef:
186-
ndarray[cnp.uint8_t, ndim=1, cast=True] indexer
187-
ndarray[int64_t, ndim=1] found
187+
ndarray[uint8_t, ndim=1, cast=True] indexer
188+
ndarray[intp_t, ndim=1] found
188189
int count
189190

190191
indexer = self._get_index_values() == val

pandas/_libs/index_class_helper.pxi.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ cdef class {{name}}Engine(IndexEngine):
5555

5656
cdef _maybe_get_bool_indexer(self, object val):
5757
cdef:
58-
ndarray[cnp.uint8_t, ndim=1, cast=True] indexer
59-
ndarray[int64_t, ndim=1] found
58+
ndarray[uint8_t, ndim=1, cast=True] indexer
59+
ndarray[intp_t, ndim=1] found
6060
ndarray[{{ctype}}] values
6161
int count = 0
6262

0 commit comments

Comments
 (0)