@@ -226,9 +226,10 @@ _DTypeT = TypeVar("_DTypeT", bound=dtype)
226
226
_DTypeT_co = TypeVar ("_DTypeT_co" , bound = dtype , covariant = True )
227
227
_ArrayT = TypeVar ("_ArrayT" , bound = ndarray [Any , Any ])
228
228
_ScalarT = TypeVar ("_ScalarT" , bound = generic )
229
- _ScalarT_co = TypeVar ("_ScalarT_co" , bound = generic )
229
+ _ScalarT_co = TypeVar ("_ScalarT_co" , bound = generic , covariant = True )
230
230
# A subset of `MaskedArray` that can be parametrized w.r.t. `np.generic`
231
231
_MaskedArray : TypeAlias = MaskedArray [_Shape , dtype [_ScalarT ]]
232
+ _Array1D : TypeAlias = np .ndarray [tuple [int ], np .dtype [_ScalarT ]]
232
233
233
234
MaskType = bool_
234
235
nomask : bool_ [Literal [False ]]
@@ -1166,9 +1167,9 @@ def sort(
1166
1167
stable : Literal [False ] | None = False ,
1167
1168
) -> NDArray [Any ]: ...
1168
1169
@overload
1169
- def compressed (x : _ArrayLike [_ScalarT_co ]) -> ndarray [ tuple [ int ], dtype [ _ScalarT_co ] ]: ...
1170
+ def compressed (x : _ArrayLike [_ScalarT_co ]) -> _Array1D [ _ScalarT_co ]: ...
1170
1171
@overload
1171
- def compressed (x : ArrayLike ) -> ndarray [ tuple [ int ], dtype ]: ...
1172
+ def compressed (x : ArrayLike ) -> _Array1D [ Any ]: ...
1172
1173
def concatenate (arrays , axis = ...): ...
1173
1174
def diag (v , k = ...): ...
1174
1175
def left_shift (a , n ): ...
0 commit comments