@@ -14,7 +14,7 @@ from typing_extensions import Never, TypeAliasType, TypeVar, Unpack
1414
1515import numpy as np
1616from numpy import _CastingKind , _OrderKACF # noqa: ICN003
17- from numpy ._typing import _NestedSequence
17+ from numpy ._typing import _DTypeLikeBool , _NestedSequence
1818
1919from ._array_like import ArrayLike , NDArray , _ArrayLikeBool_co , _ArrayLikeInt_co
2020from ._dtype_like import DTypeLike , _DTypeLike
@@ -178,6 +178,49 @@ class _Call11(Protocol):
178178 ** kwds : Unpack [_Kwargs2 ],
179179 ) -> Any : ...
180180
181+ @type_check_only
182+ class _Call11Bool (Protocol ):
183+ @overload # (scalar) -> bool
184+ def __call__ (
185+ self ,
186+ x : _ScalarLike_co ,
187+ / ,
188+ out : None = None ,
189+ * ,
190+ dtype : _DTypeLikeBool | None = None ,
191+ ** kwds : Unpack [_Kwargs2 ],
192+ ) -> np .bool : ...
193+ @overload # (array-like, out: T) -> T
194+ def __call__ (
195+ self ,
196+ x : ArrayLike ,
197+ / ,
198+ out : _Out1 [_ArrayT ],
199+ * ,
200+ dtype : _DTypeLikeBool | None = None ,
201+ ** kwds : Unpack [_Kwargs2 ],
202+ ) -> _ArrayT : ...
203+ @overload # (array) -> Array[bool] | bool
204+ def __call__ (
205+ self ,
206+ x : _AnyArray ,
207+ / ,
208+ out : _Out1 [_AnyArray ] | None = None ,
209+ * ,
210+ dtype : _DTypeLikeBool | None = None ,
211+ ** kwds : Unpack [_Kwargs2 ],
212+ ) -> NDArray [np .bool ]: ...
213+ @overload # (array-like) -> Array[bool] | bool
214+ def __call__ (
215+ self ,
216+ x : ArrayLike ,
217+ / ,
218+ out : _Out1 [_AnyArray ] | None = None ,
219+ * ,
220+ dtype : _DTypeLikeBool | None = None ,
221+ ** kwds : Unpack [_Kwargs2 ],
222+ ) -> NDArray [np .bool ] | np .bool : ...
223+
181224@type_check_only
182225class _Call12 (Protocol ):
183226 @overload
0 commit comments