@@ -413,24 +413,24 @@ def test_get_loc_interval(self):
413413
414414 def test_get_indexer (self ):
415415 actual = self .index .get_indexer ([- 1 , 0 , 0.5 , 1 , 1.5 , 2 , 3 ])
416- expected = np .array ([- 1 , - 1 , 0 , 0 , 1 , 1 , - 1 ], dtype = 'int64 ' )
416+ expected = np .array ([- 1 , - 1 , 0 , 0 , 1 , 1 , - 1 ], dtype = 'intp ' )
417417 self .assert_numpy_array_equal (actual , expected )
418418
419419 actual = self .index .get_indexer (self .index )
420- expected = np .array ([0 , 1 ], dtype = 'int64 ' )
420+ expected = np .array ([0 , 1 ], dtype = 'intp ' )
421421 self .assert_numpy_array_equal (actual , expected )
422422
423423 index = IntervalIndex .from_breaks ([0 , 1 , 2 ], closed = 'left' )
424424 actual = index .get_indexer ([- 1 , 0 , 0.5 , 1 , 1.5 , 2 , 3 ])
425- expected = np .array ([- 1 , 0 , 0 , 1 , 1 , - 1 , - 1 ], dtype = 'int64 ' )
425+ expected = np .array ([- 1 , 0 , 0 , 1 , 1 , - 1 , - 1 ], dtype = 'intp ' )
426426 self .assert_numpy_array_equal (actual , expected )
427427
428428 actual = self .index .get_indexer (index [:1 ])
429- expected = np .array ([0 ], dtype = 'int64 ' )
429+ expected = np .array ([0 ], dtype = 'intp ' )
430430 self .assert_numpy_array_equal (actual , expected )
431431
432432 actual = self .index .get_indexer (index )
433- expected = np .array ([- 1 , 1 ], dtype = 'int64 ' )
433+ expected = np .array ([- 1 , 1 ], dtype = 'intp ' )
434434 self .assert_numpy_array_equal (actual , expected )
435435
436436 def test_get_indexer_subintervals (self ):
@@ -439,21 +439,21 @@ def test_get_indexer_subintervals(self):
439439 # return indexers for wholly contained subintervals
440440 target = IntervalIndex .from_breaks (np .linspace (0 , 2 , 5 ))
441441 actual = self .index .get_indexer (target )
442- expected = np .array ([0 , 0 , 1 , 1 ], dtype = 'int64 ' )
442+ expected = np .array ([0 , 0 , 1 , 1 ], dtype = 'p ' )
443443 self .assert_numpy_array_equal (actual , expected )
444444
445445 target = IntervalIndex .from_breaks ([0 , 0.67 , 1.33 , 2 ])
446446 actual = self .index .get_indexer (target )
447- expected = np .array ([0 , 0 , 1 , 1 ], dtype = 'int64 ' )
447+ expected = np .array ([0 , 0 , 1 , 1 ], dtype = 'intp ' )
448448 self .assert_numpy_array_equal (actual , expected )
449449
450450 actual = self .index .get_indexer (target [[0 , - 1 ]])
451- expected = np .array ([0 , 1 ], dtype = 'int64 ' )
451+ expected = np .array ([0 , 1 ], dtype = 'intp ' )
452452 self .assert_numpy_array_equal (actual , expected )
453453
454454 target = IntervalIndex .from_breaks ([0 , 0.33 , 0.67 , 1 ], closed = 'left' )
455455 actual = self .index .get_indexer (target )
456- expected = np .array ([0 , 0 , 0 ], dtype = 'int64 ' )
456+ expected = np .array ([0 , 0 , 0 ], dtype = 'intp ' )
457457 self .assert_numpy_array_equal (actual , expected )
458458
459459 def test_contains (self ):
@@ -505,7 +505,7 @@ def test_non_contiguous(self):
505505 index = IntervalIndex .from_tuples ([(0 , 1 ), (2 , 3 )])
506506 target = [0.5 , 1.5 , 2.5 ]
507507 actual = index .get_indexer (target )
508- expected = np .array ([0 , - 1 , 1 ], dtype = 'int64 ' )
508+ expected = np .array ([0 , - 1 , 1 ], dtype = 'intp ' )
509509 self .assert_numpy_array_equal (actual , expected )
510510
511511 self .assertNotIn (1.5 , index )
@@ -655,7 +655,7 @@ def test_datetime(self):
655655
656656 target = pd .date_range ('1999-12-31T12:00' , periods = 7 , freq = '12H' )
657657 actual = idx .get_indexer (target )
658- expected = np .array ([- 1 , - 1 , 0 , 0 , 1 , 1 , - 1 ], dtype = 'int64 ' )
658+ expected = np .array ([- 1 , - 1 , 0 , 0 , 1 , 1 , - 1 ], dtype = 'intp ' )
659659 self .assert_numpy_array_equal (actual , expected )
660660
661661 def test_append (self ):
@@ -779,9 +779,9 @@ def test_get_loc_closed(self):
779779 np .array ([0 ], dtype = 'int64' ))
780780
781781 def test_get_indexer_closed (self ):
782- x = np .arange (1000 , dtype = 'int64 ' )
782+ x = np .arange (1000 , dtype = 'intp ' )
783783 found = x
784- not_found = (- 1 * np .ones (1000 )).astype ('int64 ' )
784+ not_found = (- 1 * np .ones (1000 )).astype ('intp ' )
785785 for leaf_size in [1 , 10 , 100 , 10000 ]:
786786 for closed in ['left' , 'right' , 'both' , 'neither' ]:
787787 tree = IntervalTree (x , x + 0.5 , closed = closed ,
0 commit comments