@@ -226,9 +226,10 @@ _DTypeT = TypeVar("_DTypeT", bound=dtype)
226226_DTypeT_co = TypeVar ("_DTypeT_co" , bound = dtype , covariant = True )
227227_ArrayT = TypeVar ("_ArrayT" , bound = ndarray [Any , Any ])
228228_ScalarT = TypeVar ("_ScalarT" , bound = generic )
229- _ScalarT_co = TypeVar ("_ScalarT_co" , bound = generic )
229+ _ScalarT_co = TypeVar ("_ScalarT_co" , bound = generic , covariant = True )
230230# A subset of `MaskedArray` that can be parametrized w.r.t. `np.generic`
231231_MaskedArray : TypeAlias = MaskedArray [_Shape , dtype [_ScalarT ]]
232+ _Array1D : TypeAlias = np .ndarray [tuple [int ], np .dtype [_ScalarT ]]
232233
233234MaskType = bool_
234235nomask : bool_ [Literal [False ]]
@@ -1166,9 +1167,9 @@ def sort(
11661167 stable : Literal [False ] | None = False ,
11671168) -> NDArray [Any ]: ...
11681169@overload
1169- def compressed (x : _ArrayLike [_ScalarT_co ]) -> ndarray [ tuple [ int ], dtype [ _ScalarT_co ] ]: ...
1170+ def compressed (x : _ArrayLike [_ScalarT_co ]) -> _Array1D [ _ScalarT_co ]: ...
11701171@overload
1171- def compressed (x : ArrayLike ) -> ndarray [ tuple [ int ], dtype ]: ...
1172+ def compressed (x : ArrayLike ) -> _Array1D [ Any ]: ...
11721173def concatenate (arrays , axis = ...): ...
11731174def diag (v , k = ...): ...
11741175def left_shift (a , n ): ...
0 commit comments