@@ -436,7 +436,7 @@ def test_loc_to_fail(self):
436
436
)
437
437
438
438
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 "
440
440
r"in the \[index\]\""
441
441
)
442
442
with pytest .raises (KeyError , match = msg ):
@@ -454,7 +454,7 @@ def test_loc_to_fail2(self):
454
454
s .loc [- 1 ]
455
455
456
456
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 "
458
458
r"in the \[index\]\""
459
459
)
460
460
with pytest .raises (KeyError , match = msg ):
@@ -470,7 +470,7 @@ def test_loc_to_fail2(self):
470
470
471
471
s ["a" ] = 2
472
472
msg = (
473
- rf"\"None of \[NumericIndex\(\[-2\], dtype='{ np .int_ ().dtype } '\)\] are "
473
+ rf"\"None of \[NumericIndex\(\[-2\], dtype='{ np .intp ().dtype } '\)\] are "
474
474
r"in the \[index\]\""
475
475
)
476
476
with pytest .raises (KeyError , match = msg ):
@@ -487,7 +487,7 @@ def test_loc_to_fail3(self):
487
487
df = DataFrame ([["a" ], ["b" ]], index = [1 , 2 ], columns = ["value" ])
488
488
489
489
msg = (
490
- rf"\"None of \[NumericIndex\(\[3\], dtype='{ np .int_ ().dtype } '\)\] are "
490
+ rf"\"None of \[NumericIndex\(\[3\], dtype='{ np .intp ().dtype } '\)\] are "
491
491
r"in the \[index\]\""
492
492
)
493
493
with pytest .raises (KeyError , match = msg ):
@@ -505,7 +505,7 @@ def test_loc_getitem_list_with_fail(self):
505
505
s .loc [[2 ]]
506
506
507
507
msg = (
508
- f"\" None of [NumericIndex([3], dtype='{ np .int_ ().dtype } ')] "
508
+ f"\" None of [NumericIndex([3], dtype='{ np .intp ().dtype } ')] "
509
509
'are in the [index]"'
510
510
)
511
511
with pytest .raises (KeyError , match = re .escape (msg )):
@@ -1195,7 +1195,7 @@ def test_loc_setitem_empty_append_raises(self):
1195
1195
df = DataFrame (columns = ["x" , "y" ])
1196
1196
df .index = df .index .astype (np .int64 )
1197
1197
msg = (
1198
- rf"None of \[NumericIndex\(\[0, 1\], dtype='{ np .int_ ().dtype } '\)\] "
1198
+ rf"None of \[NumericIndex\(\[0, 1\], dtype='{ np .intp ().dtype } '\)\] "
1199
1199
r"are in the \[index\]"
1200
1200
)
1201
1201
with pytest .raises (KeyError , match = msg ):
0 commit comments