@@ -436,7 +436,7 @@ def test_loc_to_fail(self):
436436 )
437437
438438 msg = (
439- rf"\"None of \[NumericIndex\(\[1, 2\], dtype='{ np .int_ ().dtype } '\)\] are "
439+ rf"\"None of \[NumericIndex\(\[1, 2\], dtype='{ np .intp ().dtype } '\)\] are "
440440 r"in the \[index\]\""
441441 )
442442 with pytest .raises (KeyError , match = msg ):
@@ -454,7 +454,7 @@ def test_loc_to_fail2(self):
454454 s .loc [- 1 ]
455455
456456 msg = (
457- rf"\"None of \[NumericIndex\(\[-1, -2\], dtype='{ np .int_ ().dtype } '\)\] are "
457+ rf"\"None of \[NumericIndex\(\[-1, -2\], dtype='{ np .intp ().dtype } '\)\] are "
458458 r"in the \[index\]\""
459459 )
460460 with pytest .raises (KeyError , match = msg ):
@@ -470,7 +470,7 @@ def test_loc_to_fail2(self):
470470
471471 s ["a" ] = 2
472472 msg = (
473- rf"\"None of \[NumericIndex\(\[-2\], dtype='{ np .int_ ().dtype } '\)\] are "
473+ rf"\"None of \[NumericIndex\(\[-2\], dtype='{ np .intp ().dtype } '\)\] are "
474474 r"in the \[index\]\""
475475 )
476476 with pytest .raises (KeyError , match = msg ):
@@ -487,7 +487,7 @@ def test_loc_to_fail3(self):
487487 df = DataFrame ([["a" ], ["b" ]], index = [1 , 2 ], columns = ["value" ])
488488
489489 msg = (
490- rf"\"None of \[NumericIndex\(\[3\], dtype='{ np .int_ ().dtype } '\)\] are "
490+ rf"\"None of \[NumericIndex\(\[3\], dtype='{ np .intp ().dtype } '\)\] are "
491491 r"in the \[index\]\""
492492 )
493493 with pytest .raises (KeyError , match = msg ):
@@ -505,7 +505,7 @@ def test_loc_getitem_list_with_fail(self):
505505 s .loc [[2 ]]
506506
507507 msg = (
508- f"\" None of [NumericIndex([3], dtype='{ np .int_ ().dtype } ')] "
508+ f"\" None of [NumericIndex([3], dtype='{ np .intp ().dtype } ')] "
509509 'are in the [index]"'
510510 )
511511 with pytest .raises (KeyError , match = re .escape (msg )):
@@ -1195,7 +1195,7 @@ def test_loc_setitem_empty_append_raises(self):
11951195 df = DataFrame (columns = ["x" , "y" ])
11961196 df .index = df .index .astype (np .int64 )
11971197 msg = (
1198- rf"None of \[NumericIndex\(\[0, 1\], dtype='{ np .int_ ().dtype } '\)\] "
1198+ rf"None of \[NumericIndex\(\[0, 1\], dtype='{ np .intp ().dtype } '\)\] "
11991199 r"are in the \[index\]"
12001200 )
12011201 with pytest .raises (KeyError , match = msg ):
0 commit comments