|
1 | 1 | from _typeshed import Incomplete
|
2 |
| -from collections.abc import Callable |
3 |
| -from typing import Any, ClassVar, Final, Generic, Literal as L, type_check_only |
| 2 | +from typing import Any, ClassVar, Final, Generic, Literal as L, SupportsIndex as CanIndex, TypeAlias, type_check_only |
4 | 3 | from typing_extensions import Never, Self, TypeVar, deprecated, overload
|
5 | 4 |
|
6 | 5 | import numpy as np
|
7 | 6 | from _numtype import Array, ToGeneric_0d, ToGeneric_1nd, ToGeneric_nd
|
8 | 7 | from numpy import _OrderACF, _OrderKACF, amax, amin, angle, bool_, clip, expand_dims, indices, squeeze # noqa: ICN003
|
| 8 | +from numpy._typing import _BoolCodes |
9 | 9 |
|
10 | 10 | __all__ = [
|
11 | 11 | "MAError",
|
@@ -194,6 +194,8 @@ _ShapeT_co = TypeVar("_ShapeT_co", bound=tuple[int, ...], default=tuple[int, ...
|
194 | 194 | _DTypeT = TypeVar("_DTypeT", bound=np.dtype[Any])
|
195 | 195 | _DTypeT_co = TypeVar("_DTypeT_co", bound=np.dtype[Any], default=np.dtype[Any], covariant=True)
|
196 | 196 |
|
| 197 | +_DTypeLikeBool: TypeAlias = type[bool | np.bool] | np.dtype[np.bool] | _BoolCodes |
| 198 | + |
197 | 199 | ###
|
198 | 200 |
|
199 | 201 | MaskType: Final[type[np.bool]] = ...
|
@@ -912,9 +914,9 @@ greater_equal: _MaskedBinaryOperation
|
912 | 914 | less: _MaskedBinaryOperation
|
913 | 915 | greater: _MaskedBinaryOperation
|
914 | 916 | logical_and: _MaskedBinaryOperation
|
915 |
| -alltrue: _MaskedBinaryOperation |
| 917 | +def alltrue(target: ToGeneric_nd, axis: CanIndex | None = 0, dtype: _DTypeLikeBool | None = None) -> Incomplete: ... |
916 | 918 | logical_or: _MaskedBinaryOperation
|
917 |
| -sometrue: Callable[..., Incomplete] |
| 919 | +def sometrue(target: ToGeneric_nd, axis: CanIndex | None = 0, dtype: _DTypeLikeBool | None = None) -> Incomplete: ... |
918 | 920 | logical_xor: _MaskedBinaryOperation
|
919 | 921 | bitwise_and: _MaskedBinaryOperation
|
920 | 922 | bitwise_or: _MaskedBinaryOperation
|
|
0 commit comments