@@ -3607,7 +3607,7 @@ def _get_indexer(
36073607 method : str_t | None = None ,
36083608 limit : int | None = None ,
36093609 tolerance = None ,
3610- ) -> np .ndarray :
3610+ ) -> npt . NDArray [ np .intp ] :
36113611 if tolerance is not None :
36123612 tolerance = self ._convert_tolerance (tolerance , target )
36133613
@@ -3686,7 +3686,7 @@ def _convert_tolerance(self, tolerance, target: np.ndarray | Index) -> np.ndarra
36863686 @final
36873687 def _get_fill_indexer (
36883688 self , target : Index , method : str_t , limit : int | None = None , tolerance = None
3689- ) -> np .ndarray :
3689+ ) -> npt . NDArray [ np .intp ] :
36903690
36913691 if self ._is_multi :
36923692 # TODO: get_indexer_with_fill docstring says values must be _sorted_
@@ -3713,7 +3713,7 @@ def _get_fill_indexer(
37133713 @final
37143714 def _get_fill_indexer_searchsorted (
37153715 self , target : Index , method : str_t , limit : int | None = None
3716- ) -> np .ndarray :
3716+ ) -> npt . NDArray [ np .intp ] :
37173717 """
37183718 Fallback pad/backfill get_indexer that works for monotonic decreasing
37193719 indexes and non-monotonic targets.
@@ -3747,7 +3747,7 @@ def _get_fill_indexer_searchsorted(
37473747 @final
37483748 def _get_nearest_indexer (
37493749 self , target : Index , limit : int | None , tolerance
3750- ) -> np .ndarray :
3750+ ) -> npt . NDArray [ np .intp ] :
37513751 """
37523752 Get the indexer for the nearest index labels; requires an index with
37533753 values that can be subtracted from each other (e.g., not strings or
@@ -3777,10 +3777,10 @@ def _get_nearest_indexer(
37773777 @final
37783778 def _filter_indexer_tolerance (
37793779 self ,
3780- target : Index | np .ndarray | ExtensionArray ,
3781- indexer : np .ndarray ,
3780+ target : np .ndarray ,
3781+ indexer : npt . NDArray [ np .intp ] ,
37823782 tolerance ,
3783- ) -> np .ndarray :
3783+ ) -> npt . NDArray [ np .intp ] :
37843784 own_values = self ._get_engine_target ()
37853785 distance = abs (own_values [indexer ] - target )
37863786 return np .where (distance <= tolerance , indexer , - 1 )
0 commit comments