@@ -646,7 +646,7 @@ _ShapeT_1nd = TypeVar("_ShapeT_1nd", bound=tuple[int, Unpack[tuple[int, ...]]])
646
646
_1NShapeT = TypeVar ("_1NShapeT" , bound = tuple [L [1 ], Unpack [tuple [L [1 ], ...]]]) # (1,) | (1, 1) | (1, 1, 1) | ...
647
647
648
648
_ScalarT = TypeVar ("_ScalarT" , bound = generic )
649
- _ScalarOutT = TypeVar ("_ScalarOutT " , bound = generic )
649
+ _SelfScalarT = TypeVar ("_SelfScalarT " , bound = generic )
650
650
_ScalarT_co = TypeVar ("_ScalarT_co" , bound = generic , default = Any , covariant = True )
651
651
_IntScalarT = TypeVar ("_IntScalarT" , bound = bool_ | integer | object_ )
652
652
_RealNumberT = TypeVar ("_RealNumberT" , bound = integer | floating )
@@ -2139,17 +2139,15 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeT_co, _DTypeT_co]):
2139
2139
@overload
2140
2140
def __add__ (self : NDArray [_ScalarT ], x : _nt .Casts [_ScalarT ], / ) -> NDArray [_ScalarT ]: ... # type: ignore[overload-overlap]
2141
2141
@overload
2142
- def __add__ (self : NDArray [_ScalarT ], x : _nt .CastsWith [_ScalarT , _ScalarOutT ], / ) -> NDArray [_ScalarOutT ]: ... # type: ignore[overload-overlap]
2142
+ def __add__ (self : NDArray [_SelfScalarT ], x : _nt .CastsWith [_SelfScalarT , _ScalarT ], / ) -> NDArray [_ScalarT ]: ... # type: ignore[overload-overlap]
2143
2143
@overload
2144
- def __add__ (self : _nt .CastsWithBuiltin [_T , _ScalarOutT ], x : _nt .SequenceND [_T ], / ) -> NDArray [_ScalarOutT ]: ...
2144
+ def __add__ (self : _nt .CastsWithBuiltin [_T , _ScalarT ], x : _nt .SequenceND [_T ], / ) -> NDArray [_ScalarT ]: ...
2145
2145
@overload
2146
- def __add__ (self : _nt .CastsWithInt [_ScalarOutT ], x : _nt .SequenceND [_nt .JustInt ], / ) -> NDArray [_ScalarOutT ]: ...
2146
+ def __add__ (self : _nt .CastsWithInt [_ScalarT ], x : _nt .SequenceND [_nt .JustInt ], / ) -> NDArray [_ScalarT ]: ...
2147
2147
@overload
2148
- def __add__ (self : _nt .CastsWithFloat [_ScalarOutT ], x : _nt .SequenceND [_nt .JustFloat ], / ) -> NDArray [_ScalarOutT ]: ...
2148
+ def __add__ (self : _nt .CastsWithFloat [_ScalarT ], x : _nt .SequenceND [_nt .JustFloat ], / ) -> NDArray [_ScalarT ]: ...
2149
2149
@overload
2150
- def __add__ (
2151
- self : _nt .CastsWithComplex [_ScalarOutT ], x : _nt .SequenceND [_nt .JustComplex ], /
2152
- ) -> NDArray [_ScalarOutT ]: ...
2150
+ def __add__ (self : _nt .CastsWithComplex [_ScalarT ], x : _nt .SequenceND [_nt .JustComplex ], / ) -> NDArray [_ScalarT ]: ...
2153
2151
@overload
2154
2152
def __add__ (self : NDArray [datetime64 ], x : _nt .CoTimeDelta_nd , / ) -> NDArray [datetime64 ]: ...
2155
2153
@overload
@@ -2165,19 +2163,15 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeT_co, _DTypeT_co]):
2165
2163
@overload
2166
2164
def __radd__ (self : NDArray [_ScalarT ], x : _nt .Casts [_ScalarT ], / ) -> NDArray [_ScalarT ]: ... # type: ignore[overload-overlap]
2167
2165
@overload
2168
- def __radd__ (self : NDArray [_ScalarT ], x : _nt .CastsWith [_ScalarT , _ScalarOutT ], / ) -> NDArray [_ScalarOutT ]: ... # type: ignore[overload-overlap]
2166
+ def __radd__ (self : NDArray [_SelfScalarT ], x : _nt .CastsWith [_SelfScalarT , _ScalarT ], / ) -> NDArray [_ScalarT ]: ... # type: ignore[overload-overlap]
2169
2167
@overload
2170
- def __radd__ (self : _nt .CastsWithBuiltin [_T , _ScalarOutT ], x : _nt .SequenceND [_T ], / ) -> NDArray [_ScalarOutT ]: ...
2168
+ def __radd__ (self : _nt .CastsWithBuiltin [_T , _ScalarT ], x : _nt .SequenceND [_T ], / ) -> NDArray [_ScalarT ]: ...
2171
2169
@overload
2172
- def __radd__ (self : _nt .CastsWithInt [_ScalarOutT ], x : _nt .SequenceND [_nt .JustInt ], / ) -> NDArray [_ScalarOutT ]: ...
2170
+ def __radd__ (self : _nt .CastsWithInt [_ScalarT ], x : _nt .SequenceND [_nt .JustInt ], / ) -> NDArray [_ScalarT ]: ...
2173
2171
@overload
2174
- def __radd__ (
2175
- self : _nt .CastsWithFloat [_ScalarOutT ], x : _nt .SequenceND [_nt .JustFloat ], /
2176
- ) -> NDArray [_ScalarOutT ]: ...
2172
+ def __radd__ (self : _nt .CastsWithFloat [_ScalarT ], x : _nt .SequenceND [_nt .JustFloat ], / ) -> NDArray [_ScalarT ]: ...
2177
2173
@overload
2178
- def __radd__ (
2179
- self : _nt .CastsWithComplex [_ScalarOutT ], x : _nt .SequenceND [_nt .JustComplex ], /
2180
- ) -> NDArray [_ScalarOutT ]: ...
2174
+ def __radd__ (self : _nt .CastsWithComplex [_ScalarT ], x : _nt .SequenceND [_nt .JustComplex ], / ) -> NDArray [_ScalarT ]: ...
2181
2175
@overload
2182
2176
def __radd__ (self : NDArray [datetime64 ], x : _nt .CoTimeDelta_nd , / ) -> NDArray [datetime64 ]: ...
2183
2177
@overload
0 commit comments