Skip to content

Commit ce453a5

Browse files
committed
⏪ revert the __abs__ changes after running into microsoft/pyright#9896 again
1 parent eb2a19e commit ce453a5

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/numpy-stubs/__init__.pyi

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2198,15 +2198,9 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeT_co, _DTypeT_co]):
21982198
# Unary ops
21992199

22002200
@overload
2201-
def __abs__(self: _RealArrayT, /) -> _RealArrayT: ...
2202-
@overload
2203-
def __abs__(self: ndarray[_ShapeT, dtype[complex64]], /) -> ndarray[_ShapeT, dtype[float32]]: ... # type: ignore[overload-overlap]
2204-
@overload
2205-
def __abs__(self: ndarray[_ShapeT, dtype[complex128]], /) -> ndarray[_ShapeT, dtype[float64]]: ...
2201+
def __abs__(self: ndarray[_ShapeT, dtype[complexfloating[_NBitT]]], /) -> ndarray[_ShapeT, dtype[floating[_NBitT]]]: ...
22062202
@overload
2207-
def __abs__(self: ndarray[_ShapeT, dtype[clongdouble]], /) -> ndarray[_ShapeT, dtype[longdouble]]: ...
2208-
@overload
2209-
def __abs__(self: ndarray[_ShapeT, dtype[inexact]], /) -> ndarray[_ShapeT, dtype[floating]]: ...
2203+
def __abs__(self: _RealArrayT, /) -> _RealArrayT: ...
22102204

22112205
#
22122206
def __invert__(self: _IntegralArrayT, /) -> _IntegralArrayT: ... # noqa: PYI019

0 commit comments

Comments
 (0)