@@ -3607,7 +3607,7 @@ def _get_indexer(
3607
3607
method : str_t | None = None ,
3608
3608
limit : int | None = None ,
3609
3609
tolerance = None ,
3610
- ) -> np .ndarray :
3610
+ ) -> npt . NDArray [ np .intp ] :
3611
3611
if tolerance is not None :
3612
3612
tolerance = self ._convert_tolerance (tolerance , target )
3613
3613
@@ -3686,7 +3686,7 @@ def _convert_tolerance(self, tolerance, target: np.ndarray | Index) -> np.ndarra
3686
3686
@final
3687
3687
def _get_fill_indexer (
3688
3688
self , target : Index , method : str_t , limit : int | None = None , tolerance = None
3689
- ) -> np .ndarray :
3689
+ ) -> npt . NDArray [ np .intp ] :
3690
3690
3691
3691
if self ._is_multi :
3692
3692
# TODO: get_indexer_with_fill docstring says values must be _sorted_
@@ -3713,7 +3713,7 @@ def _get_fill_indexer(
3713
3713
@final
3714
3714
def _get_fill_indexer_searchsorted (
3715
3715
self , target : Index , method : str_t , limit : int | None = None
3716
- ) -> np .ndarray :
3716
+ ) -> npt . NDArray [ np .intp ] :
3717
3717
"""
3718
3718
Fallback pad/backfill get_indexer that works for monotonic decreasing
3719
3719
indexes and non-monotonic targets.
@@ -3747,7 +3747,7 @@ def _get_fill_indexer_searchsorted(
3747
3747
@final
3748
3748
def _get_nearest_indexer (
3749
3749
self , target : Index , limit : int | None , tolerance
3750
- ) -> np .ndarray :
3750
+ ) -> npt . NDArray [ np .intp ] :
3751
3751
"""
3752
3752
Get the indexer for the nearest index labels; requires an index with
3753
3753
values that can be subtracted from each other (e.g., not strings or
@@ -3777,10 +3777,10 @@ def _get_nearest_indexer(
3777
3777
@final
3778
3778
def _filter_indexer_tolerance (
3779
3779
self ,
3780
- target : Index | np .ndarray | ExtensionArray ,
3781
- indexer : np .ndarray ,
3780
+ target : np .ndarray ,
3781
+ indexer : npt . NDArray [ np .intp ] ,
3782
3782
tolerance ,
3783
- ) -> np .ndarray :
3783
+ ) -> npt . NDArray [ np .intp ] :
3784
3784
own_values = self ._get_engine_target ()
3785
3785
distance = abs (own_values [indexer ] - target )
3786
3786
return np .where (distance <= tolerance , indexer , - 1 )
0 commit comments