From 09c1381748b48eba837300b126d8e96a179bff80 Mon Sep 17 00:00:00 2001 From: Jeff Reback Date: Tue, 8 May 2018 06:23:09 -0400 Subject: [PATCH] COMPAT: 32-bit indexing compat xref #20939 --- pandas/core/indexing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/indexing.py b/pandas/core/indexing.py index 858d08d73e603..2c40be17ce781 100755 --- a/pandas/core/indexing.py +++ b/pandas/core/indexing.py @@ -1318,7 +1318,7 @@ def _convert_to_indexer(self, obj, axis=None, is_setter=False): (indexer, missing) = labels.get_indexer_non_unique(objarr) # 'indexer' has dupes, create 'check' using 'missing' - check = np.zeros(len(objarr)) + check = np.zeros(len(objarr), dtype=np.intp) check[missing] = -1 mask = check == -1 @@ -2469,7 +2469,7 @@ def maybe_convert_indices(indices, n): if len(indices) == 0: # If list is empty, np.array will return float and cause indexing # errors. - return np.empty(0, dtype=np.int_) + return np.empty(0, dtype=np.intp) mask = indices < 0 if mask.any():