Skip to content

Commit 86e23cc

Browse files
committed
COMPAT: 32-bit indexing compat
xref pandas-dev#19539
1 parent eff1faf commit 86e23cc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pandas/_libs/index.pyx

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ 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, int64_t, uint8_t, uint64_t, intp_t
1212
cnp.import_array()
1313

1414
cdef extern from "numpy/arrayobject.h":
@@ -183,8 +183,8 @@ cdef class IndexEngine:
183183

184184
cdef _maybe_get_bool_indexer(self, object val):
185185
cdef:
186-
ndarray[cnp.uint8_t, ndim=1, cast=True] indexer
187-
ndarray[int64_t, ndim=1] found
186+
ndarray[uint8_t, ndim=1, cast=True] indexer
187+
ndarray[intp_t, ndim=1] found
188188
int count
189189

190190
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)