@@ -412,9 +412,9 @@ def test_get_loc_value(self):
412
412
assert idx .get_loc (0.5 ) == 0
413
413
assert idx .get_loc (1 ) == 0
414
414
tm .assert_numpy_array_equal (idx .get_loc (1.5 ),
415
- np .array ([0 , 1 ], dtype = 'int64 ' ))
415
+ np .array ([0 , 1 ], dtype = 'intp ' ))
416
416
tm .assert_numpy_array_equal (np .sort (idx .get_loc (2 )),
417
- np .array ([0 , 1 ], dtype = 'int64 ' ))
417
+ np .array ([0 , 1 ], dtype = 'intp ' ))
418
418
assert idx .get_loc (3 ) == 1
419
419
pytest .raises (KeyError , idx .get_loc , 3.5 )
420
420
@@ -537,12 +537,12 @@ def test_get_loc_datetimelike_overlapping(self, arrays):
537
537
538
538
value = index [0 ].mid + Timedelta ('12 hours' )
539
539
result = np .sort (index .get_loc (value ))
540
- expected = np .array ([0 , 1 ], dtype = 'int64 ' )
540
+ expected = np .array ([0 , 1 ], dtype = 'intp ' )
541
541
assert tm .assert_numpy_array_equal (result , expected )
542
542
543
543
interval = Interval (index [0 ].left , index [1 ].right )
544
544
result = np .sort (index .get_loc (interval ))
545
- expected = np .array ([0 , 1 , 2 ], dtype = 'int64 ' )
545
+ expected = np .array ([0 , 1 , 2 ], dtype = 'intp ' )
546
546
assert tm .assert_numpy_array_equal (result , expected )
547
547
548
548
# To be removed, replaced by test_interval_new.py (see #16316, #16386)
@@ -617,7 +617,7 @@ def test_get_reindexer_datetimelike(self, arrays):
617
617
target = IntervalIndex .from_tuples (tuples )
618
618
619
619
result = index ._get_reindexer (target )
620
- expected = np .array ([0 , 3 ], dtype = 'int64 ' )
620
+ expected = np .array ([0 , 3 ], dtype = 'intp ' )
621
621
tm .assert_numpy_array_equal (result , expected )
622
622
623
623
@pytest .mark .parametrize ('breaks' , [
0 commit comments