@@ -225,45 +225,45 @@ class _Call11Bool(Protocol):
225
225
@type_check_only
226
226
class _Call11Logical (Protocol ):
227
227
@overload
228
- def __call__ ( # (scalar, dtype: np.object_) -> np. bool
228
+ def __call__ ( # (scalar, dtype: np.object_) -> bool
229
229
self ,
230
- x : _NumberLike_co ,
230
+ x : _ScalarLike_co ,
231
231
/ ,
232
232
dtype : _DTypeLike [np .object_ ],
233
233
out : None = None ,
234
234
** kwargs : Unpack [_Kwargs2 ],
235
- ) -> np . bool : ...
235
+ ) -> bool : ...
236
236
@overload
237
- def __call__ ( # (scalar) -> bool
237
+ def __call__ ( # (scalar) -> np. bool
238
238
self ,
239
239
x : _NumberLike_co ,
240
240
/ ,
241
241
out : None = None ,
242
- dtype : DTypeLike | None = None ,
242
+ dtype : _DTypeLikeBool | None = None ,
243
243
** kwargs : Unpack [_Kwargs2 ],
244
244
) -> np .bool : ...
245
245
@overload
246
246
def __call__ ( # (array-like, dtype: np.object_) -> np.object_
247
247
self ,
248
- x : _ArrayLikeNumber_co ,
248
+ x : _ArrayLikeNumber_co | _ArrayLikeObject_co ,
249
249
/ ,
250
250
dtype : _DTypeLike [np .object_ ],
251
251
out : None = None ,
252
252
** kwargs : Unpack [_Kwargs2 ],
253
- ) -> NDArray [np .object_ ] | np . bool : ...
253
+ ) -> NDArray [np .object_ ] | bool : ...
254
254
@overload
255
255
def __call__ ( # (array-like, out: T) -> T
256
256
self ,
257
257
x : _ArrayLikeNumber_co ,
258
258
/ ,
259
- out : _ArrayT | tuple [_ArrayT ],
259
+ out : _Out1 [_ArrayT ],
260
260
dtype : DTypeLike | None = None ,
261
261
** kwargs : Unpack [_Kwargs2 ],
262
262
) -> _ArrayT : ...
263
263
@overload # (array) -> Array[bool]
264
264
def __call__ (
265
265
self ,
266
- x : _AnyArray ,
266
+ x : NDArray [ np . bool | np . number ] | _NestedSequence [ np . bool | np . number ] ,
267
267
/ ,
268
268
out : _Out1 [_AnyArray ] | None = None ,
269
269
* ,
@@ -276,7 +276,7 @@ class _Call11Logical(Protocol):
276
276
x : _ArrayLikeNumber_co ,
277
277
/ ,
278
278
out : None = None ,
279
- dtype : DTypeLike | None = None ,
279
+ dtype : _DTypeLikeBool | None = None ,
280
280
** kwargs : Unpack [_Kwargs2 ],
281
281
) -> NDArray [np .bool ] | np .bool : ...
282
282
@overload
@@ -456,21 +456,21 @@ class _Call21Logical(Protocol):
456
456
@overload # (scalar, scalar, dtype: np.object_) -> np.object_
457
457
def __call__ (
458
458
self ,
459
- x1 : _NumberLike_co ,
460
- x2 : _NumberLike_co ,
459
+ x1 : _ScalarLike_co ,
460
+ x2 : _ScalarLike_co ,
461
461
/ ,
462
462
dtype : _DTypeLike [np .object_ ],
463
463
out : None = None ,
464
464
** kwds : Unpack [_Kwargs3 ],
465
- ) -> np . bool : ...
465
+ ) -> bool : ...
466
466
@overload # (scalar, scalar) -> bool
467
467
def __call__ (
468
468
self ,
469
469
x1 : _NumberLike_co ,
470
470
x2 : _NumberLike_co ,
471
471
/ ,
472
472
out : None = None ,
473
- dtype : DTypeLike | None = None ,
473
+ dtype : _DTypeLikeBool | None = None ,
474
474
** kwds : Unpack [_Kwargs3 ],
475
475
) -> np .bool : ...
476
476
@overload # (array-like, array, dtype: object_) -> Array[object_]
@@ -490,9 +490,9 @@ class _Call21Logical(Protocol):
490
490
x2 : NDArray [np .bool | np .number ],
491
491
/ ,
492
492
out : None = None ,
493
- dtype : DTypeLike | None = None ,
493
+ dtype : _DTypeLikeBool | None = None ,
494
494
** kwds : Unpack [_Kwargs3 ],
495
- ) -> NDArray [np .bool | np . object_ ]: ...
495
+ ) -> NDArray [np .bool ]: ...
496
496
@overload # (array, array-like, dtype: object_) -> Array[object_]
497
497
def __call__ (
498
498
self ,
@@ -506,7 +506,7 @@ class _Call21Logical(Protocol):
506
506
@overload # (array, array-like, dtype: dtype[T]) -> Array[T]
507
507
def __call__ (
508
508
self ,
509
- x1 : NDArray [np .bool | np .number ],
509
+ x1 : NDArray [np .bool | np .number ] | _NestedSequence [ np . bool | np . number ] ,
510
510
x2 : _ArrayLikeNumber_co ,
511
511
/ ,
512
512
out : None = None ,
@@ -530,27 +530,27 @@ class _Call21Logical(Protocol):
530
530
x1 : _ArrayLikeNumber_co ,
531
531
x2 : _AnyArray ,
532
532
/ ,
533
- out : _Out1 [_AnyArray ] | None = None ,
533
+ out : _Out1 [NDArray [ np . bool ] ] | None = None ,
534
534
* ,
535
535
dtype : DTypeLike | None = None ,
536
536
** kwds : Unpack [_Kwargs3 ],
537
- ) -> NDArray [np .bool | np . object_ ]: ...
537
+ ) -> NDArray [np .bool ]: ...
538
538
@overload # (array, array-like) -> Array[?]
539
539
def __call__ (
540
540
self ,
541
541
x1 : _AnyArray ,
542
542
x2 : _ArrayLikeNumber_co ,
543
543
/ ,
544
- out : _Out1 [_AnyArray ] | None = None ,
544
+ out : _Out1 [NDArray [ np . bool ] ] | None = None ,
545
545
* ,
546
546
dtype : DTypeLike | None = None ,
547
547
** kwds : Unpack [_Kwargs3 ],
548
548
) -> NDArray [np .bool ]: ...
549
549
@overload # (array-like, array-like) -> Array[?] | ?
550
550
def __call__ (
551
551
self ,
552
- x1 : _ArrayLikeNumber_co ,
553
- x2 : _ArrayLikeNumber_co ,
552
+ x1 : _ArrayLikeNumber_co | _ArrayLikeObject_co ,
553
+ x2 : _ArrayLikeNumber_co | _ArrayLikeObject_co ,
554
554
/ ,
555
555
out : _Out1 [_AnyArray ] | None = None ,
556
556
* ,
0 commit comments