Skip to content

Commit 9abfb4a

Browse files
committed
TST: more take int32 compat
1 parent 53b3236 commit 9abfb4a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pandas/core/index.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -321,11 +321,12 @@ def append(self, other):
321321

322322
return Index(np.concatenate(to_concat), name=name)
323323

324-
def take(self, *args, **kwargs):
324+
def take(self, indexer, axis=0):
325325
"""
326326
Analogous to ndarray.take
327327
"""
328-
taken = self.view(np.ndarray).take(*args, **kwargs)
328+
indexer = com._ensure_platform_int(indexer)
329+
taken = self.view(np.ndarray).take(indexer)
329330
return self._constructor(taken, name=self.name)
330331

331332
def format(self, name=False):
@@ -1500,6 +1501,7 @@ def take(self, indexer, axis=None):
15001501
"""
15011502
Analogous to ndarray.take
15021503
"""
1504+
indexer = com._ensure_platform_int(indexer)
15031505
new_labels = [lab.take(indexer) for lab in self.labels]
15041506
return MultiIndex(levels=self.levels, labels=new_labels,
15051507
names=self.names)

0 commit comments

Comments
 (0)