Skip to content

Commit

Permalink
TYP: Annotate numpy.bool.__index__ and mark as deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
jorenham committed Nov 10, 2024
1 parent 4c11cc6 commit 38814d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion numpy/__init__.pyi
Original file line number Diff line number Diff line change
@@ -3292,7 +3292,8 @@ class bool(_RealMixin, generic):
def __init__(self, value: object = ..., /) -> None: ...
def item(self, args: L[0] | tuple[()] | tuple[L[0]] = ..., /) -> builtins.bool: ...
def tolist(self) -> builtins.bool: ...

@deprecated("In future, it will be an error for 'np.bool' scalars to be interpreted as an index")
def __index__(self, /) -> int: ...
def __abs__(self) -> Self: ...
__add__: _BoolOp[np.bool]
__radd__: _BoolOp[np.bool]

0 comments on commit 38814d9

Please sign in to comment.