Skip to content

Commit 990ce3b

Browse files
committed
np.integer -> np.intp
1 parent 6439619 commit 990ce3b

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

pandas-stubs/core/indexes/base.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ from _typeshed import (
2828
_T_contra,
2929
)
3030
import numpy as np
31-
import numpy.typing as npt
3231
from pandas.core.arrays.boolean import BooleanArray
3332
from pandas.core.base import (
3433
ArrayIndexTimedeltaNoSeq,
@@ -567,7 +566,7 @@ class Index(IndexOpsMixin[S1], ElementOpsMixin[S1]):
567566
def get_slice_bound(self, label: Scalar, side: Literal["left", "right"]) -> int: ...
568567
def slice_locs(
569568
self, start: SliceType = None, end: SliceType = None, step: int | None = None
570-
) -> tuple[int | np.integer, int | np.integer]: ...
569+
) -> tuple[int | np.intp, int | np.intp]: ...
571570
def delete(
572571
self, loc: np.integer | int | AnyArrayLikeInt | Sequence[int]
573572
) -> Self: ...

tests/indexes/test_indexes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1650,5 +1650,5 @@ def test_index_get_slice_bound() -> None:
16501650
def test_index_slice_locs() -> None:
16511651
idx = pd.Index([1, 3])
16521652
res = idx.slice_locs(0, 1)
1653-
check(assert_type(res[0], np.integer | int), np.integer)
1654-
check(assert_type(res[1], np.integer | int), int)
1653+
check(assert_type(res[0], np.intp | int), np.integer)
1654+
check(assert_type(res[1], np.intp | int), int)

0 commit comments

Comments
 (0)