@@ -224,45 +224,45 @@ class _Call11Bool(Protocol):
224
224
@type_check_only
225
225
class _Call11Logical (Protocol ):
226
226
@overload
227
- def __call__ ( # (scalar, dtype: np.object_) -> np. bool
227
+ def __call__ ( # (scalar, dtype: np.object_) -> bool
228
228
self ,
229
- x : _NumberLike_co ,
229
+ x : _ScalarLike_co ,
230
230
/ ,
231
231
dtype : _DTypeLike [np .object_ ],
232
232
out : None = None ,
233
233
** kwargs : Unpack [_Kwargs2 ],
234
- ) -> np . bool : ...
234
+ ) -> bool : ...
235
235
@overload
236
- def __call__ ( # (scalar) -> bool
236
+ def __call__ ( # (scalar) -> np. bool
237
237
self ,
238
238
x : _NumberLike_co ,
239
239
/ ,
240
240
out : None = None ,
241
- dtype : DTypeLike | None = None ,
241
+ dtype : _DTypeLikeBool | None = None ,
242
242
** kwargs : Unpack [_Kwargs2 ],
243
243
) -> np .bool : ...
244
244
@overload
245
245
def __call__ ( # (array-like, dtype: np.object_) -> np.object_
246
246
self ,
247
- x : _ArrayLikeNumber_co ,
247
+ x : _ArrayLikeNumber_co | _ArrayLikeObject_co ,
248
248
/ ,
249
249
dtype : _DTypeLike [np .object_ ],
250
250
out : None = None ,
251
251
** kwargs : Unpack [_Kwargs2 ],
252
- ) -> NDArray [np .object_ ] | np . bool : ...
252
+ ) -> NDArray [np .object_ ] | bool : ...
253
253
@overload
254
254
def __call__ ( # (array-like, out: T) -> T
255
255
self ,
256
256
x : _ArrayLikeNumber_co ,
257
257
/ ,
258
- out : _ArrayT | tuple [_ArrayT ],
258
+ out : _Out1 [_ArrayT ],
259
259
dtype : DTypeLike | None = None ,
260
260
** kwargs : Unpack [_Kwargs2 ],
261
261
) -> _ArrayT : ...
262
262
@overload # (array) -> Array[bool]
263
263
def __call__ (
264
264
self ,
265
- x : _AnyArray ,
265
+ x : NDArray [ np . bool | np . number ] | _NestedSequence [ np . bool | np . number ] ,
266
266
/ ,
267
267
out : _Out1 [_AnyArray ] | None = None ,
268
268
* ,
@@ -275,7 +275,7 @@ class _Call11Logical(Protocol):
275
275
x : _ArrayLikeNumber_co ,
276
276
/ ,
277
277
out : None = None ,
278
- dtype : DTypeLike | None = None ,
278
+ dtype : _DTypeLikeBool | None = None ,
279
279
** kwargs : Unpack [_Kwargs2 ],
280
280
) -> NDArray [np .bool ] | np .bool : ...
281
281
@overload
@@ -451,21 +451,21 @@ class _Call21Logical(Protocol):
451
451
@overload # (scalar, scalar, dtype: np.object_) -> np.object_
452
452
def __call__ (
453
453
self ,
454
- x1 : _NumberLike_co ,
455
- x2 : _NumberLike_co ,
454
+ x1 : _ScalarLike_co ,
455
+ x2 : _ScalarLike_co ,
456
456
/ ,
457
457
dtype : _DTypeLike [np .object_ ],
458
458
out : None = None ,
459
459
** kwds : Unpack [_Kwargs3 ],
460
- ) -> np . bool : ...
460
+ ) -> bool : ...
461
461
@overload # (scalar, scalar) -> bool
462
462
def __call__ (
463
463
self ,
464
464
x1 : _NumberLike_co ,
465
465
x2 : _NumberLike_co ,
466
466
/ ,
467
467
out : None = None ,
468
- dtype : DTypeLike | None = None ,
468
+ dtype : _DTypeLikeBool | None = None ,
469
469
** kwds : Unpack [_Kwargs3 ],
470
470
) -> np .bool : ...
471
471
@overload # (array-like, array, dtype: object_) -> Array[object_]
@@ -485,9 +485,9 @@ class _Call21Logical(Protocol):
485
485
x2 : NDArray [np .bool | np .number ],
486
486
/ ,
487
487
out : None = None ,
488
- dtype : DTypeLike | None = None ,
488
+ dtype : _DTypeLikeBool | None = None ,
489
489
** kwds : Unpack [_Kwargs3 ],
490
- ) -> NDArray [np .bool | np . object_ ]: ...
490
+ ) -> NDArray [np .bool ]: ...
491
491
@overload # (array, array-like, dtype: object_) -> Array[object_]
492
492
def __call__ (
493
493
self ,
@@ -501,7 +501,7 @@ class _Call21Logical(Protocol):
501
501
@overload # (array, array-like, dtype: dtype[T]) -> Array[T]
502
502
def __call__ (
503
503
self ,
504
- x1 : NDArray [np .bool | np .number ],
504
+ x1 : NDArray [np .bool | np .number ] | _NestedSequence [ np . bool | np . number ] ,
505
505
x2 : _ArrayLikeNumber_co ,
506
506
/ ,
507
507
out : None = None ,
@@ -525,27 +525,27 @@ class _Call21Logical(Protocol):
525
525
x1 : _ArrayLikeNumber_co ,
526
526
x2 : _AnyArray ,
527
527
/ ,
528
- out : _Out1 [_AnyArray ] | None = None ,
528
+ out : _Out1 [NDArray [ np . bool ] ] | None = None ,
529
529
* ,
530
530
dtype : DTypeLike | None = None ,
531
531
** kwds : Unpack [_Kwargs3 ],
532
- ) -> NDArray [np .bool | np . object_ ]: ...
532
+ ) -> NDArray [np .bool ]: ...
533
533
@overload # (array, array-like) -> Array[?]
534
534
def __call__ (
535
535
self ,
536
536
x1 : _AnyArray ,
537
537
x2 : _ArrayLikeNumber_co ,
538
538
/ ,
539
- out : _Out1 [_AnyArray ] | None = None ,
539
+ out : _Out1 [NDArray [ np . bool ] ] | None = None ,
540
540
* ,
541
541
dtype : DTypeLike | None = None ,
542
542
** kwds : Unpack [_Kwargs3 ],
543
543
) -> NDArray [np .bool ]: ...
544
544
@overload # (array-like, array-like) -> Array[?] | ?
545
545
def __call__ (
546
546
self ,
547
- x1 : _ArrayLikeNumber_co ,
548
- x2 : _ArrayLikeNumber_co ,
547
+ x1 : _ArrayLikeNumber_co | _ArrayLikeObject_co ,
548
+ x2 : _ArrayLikeNumber_co | _ArrayLikeObject_co ,
549
549
/ ,
550
550
out : _Out1 [_AnyArray ] | None = None ,
551
551
* ,
0 commit comments