From 86e23cc5c15b15b06678b09410795d2b51a32e7f Mon Sep 17 00:00:00 2001 From: Jeff Reback Date: Wed, 9 May 2018 06:35:16 -0400 Subject: [PATCH 1/2] COMPAT: 32-bit indexing compat xref #19539 --- pandas/_libs/index.pyx | 6 +++--- pandas/_libs/index_class_helper.pxi.in | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pandas/_libs/index.pyx b/pandas/_libs/index.pyx index 9968d398e9040..afcd66c270ad4 100644 --- a/pandas/_libs/index.pyx +++ b/pandas/_libs/index.pyx @@ -8,7 +8,7 @@ from cpython.slice cimport PySlice_Check import numpy as np cimport numpy as cnp -from numpy cimport ndarray, float64_t, int32_t, int64_t, uint8_t, uint64_t +from numpy cimport ndarray, float64_t, int32_t, int64_t, uint8_t, uint64_t, intp_t cnp.import_array() cdef extern from "numpy/arrayobject.h": @@ -183,8 +183,8 @@ cdef class IndexEngine: cdef _maybe_get_bool_indexer(self, object val): cdef: - ndarray[cnp.uint8_t, ndim=1, cast=True] indexer - ndarray[int64_t, ndim=1] found + ndarray[uint8_t, ndim=1, cast=True] indexer + ndarray[intp_t, ndim=1] found int count indexer = self._get_index_values() == val diff --git a/pandas/_libs/index_class_helper.pxi.in b/pandas/_libs/index_class_helper.pxi.in index 6f726dd49f11e..4ea35da0626f3 100644 --- a/pandas/_libs/index_class_helper.pxi.in +++ b/pandas/_libs/index_class_helper.pxi.in @@ -55,8 +55,8 @@ cdef class {{name}}Engine(IndexEngine): cdef _maybe_get_bool_indexer(self, object val): cdef: - ndarray[cnp.uint8_t, ndim=1, cast=True] indexer - ndarray[int64_t, ndim=1] found + ndarray[uint8_t, ndim=1, cast=True] indexer + ndarray[intp_t, ndim=1] found ndarray[{{ctype}}] values int count = 0 From 5ce73e13d61f5c8c02014d4831103986594fed65 Mon Sep 17 00:00:00 2001 From: Jeff Reback Date: Thu, 10 May 2018 05:56:24 -0400 Subject: [PATCH 2/2] lint --- pandas/_libs/index.pyx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandas/_libs/index.pyx b/pandas/_libs/index.pyx index afcd66c270ad4..741e5553141f7 100644 --- a/pandas/_libs/index.pyx +++ b/pandas/_libs/index.pyx @@ -8,7 +8,8 @@ from cpython.slice cimport PySlice_Check import numpy as np cimport numpy as cnp -from numpy cimport ndarray, float64_t, int32_t, int64_t, uint8_t, uint64_t, intp_t +from numpy cimport (ndarray, float64_t, int32_t, + int64_t, uint8_t, uint64_t, intp_t) cnp.import_array() cdef extern from "numpy/arrayobject.h":