@@ -2839,6 +2839,16 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeT_co, _DTypeT_co]):
2839
2839
@overload
2840
2840
def __add__ (self :NDArray [datetime64 ],other :_ArrayLikeTD64_co ,/ )-> NDArray [datetime64 ]: ...
2841
2841
@overload
2842
+ def __add__ (self :NDArray [bytes_ ],other :_ArrayLikeBytes_co ,/ )-> NDArray [bytes_ ]: ...
2843
+ @overload
2844
+ def __add__ (self :NDArray [str_ ],other :_ArrayLikeStr_co ,/ )-> NDArray [str_ ]: ...
2845
+ @overload
2846
+ def __add__ (
2847
+ self :ndarray [Any ,dtypes .StringDType ],
2848
+ other :_ArrayLikeStr_co | _ArrayLikeString_co ,
2849
+ / ,
2850
+ )-> ndarray [tuple [Any , ...],dtypes .StringDType ]: ...
2851
+ @overload
2842
2852
def __add__ (self :NDArray [object_ ],other :Any ,/ )-> Any : ...
2843
2853
@overload
2844
2854
def __add__ (self :NDArray [Any ],other :_ArrayLikeObject_co ,/ )-> Any : ...
@@ -2876,6 +2886,16 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeT_co, _DTypeT_co]):
2876
2886
@overload
2877
2887
def __radd__ (self :NDArray [datetime64 ],other :_ArrayLikeTD64_co ,/ )-> NDArray [datetime64 ]: ...
2878
2888
@overload
2889
+ def __radd__ (self :NDArray [bytes_ ],other :_ArrayLikeBytes_co ,/ )-> NDArray [bytes_ ]: ...
2890
+ @overload
2891
+ def __radd__ (self :NDArray [str_ ],other :_ArrayLikeStr_co ,/ )-> NDArray [str_ ]: ...
2892
+ @overload
2893
+ def __radd__ (
2894
+ self :ndarray [Any ,dtypes .StringDType ],
2895
+ other :_ArrayLikeStr_co | _ArrayLikeString_co ,
2896
+ / ,
2897
+ )-> ndarray [tuple [Any , ...],dtypes .StringDType ]: ...
2898
+ @overload
2879
2899
def __radd__ (self :NDArray [object_ ],other :Any ,/ )-> Any : ...
2880
2900
@overload
2881
2901
def __radd__ (self :NDArray [Any ],other :_ArrayLikeObject_co ,/ )-> Any : ...
@@ -2985,6 +3005,12 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeT_co, _DTypeT_co]):
2985
3005
@overload
2986
3006
def __mul__ (self :_ArrayFloat_co ,other :_ArrayLike [timedelta64 ],/ )-> NDArray [timedelta64 ]: ...
2987
3007
@overload
3008
+ def __mul__ (
3009
+ self :ndarray [Any ,dtype [character ]| dtypes .StringDType ],
3010
+ other :_ArrayLikeInt ,
3011
+ / ,
3012
+ )-> ndarray [tuple [Any , ...],_DTypeT_co ]: ...
3013
+ @overload
2988
3014
def __mul__ (self :NDArray [object_ ],other :Any ,/ )-> Any : ...
2989
3015
@overload
2990
3016
def __mul__ (self :NDArray [Any ],other :_ArrayLikeObject_co ,/ )-> Any : ...
@@ -3020,6 +3046,12 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeT_co, _DTypeT_co]):
3020
3046
@overload
3021
3047
def __rmul__ (self :_ArrayFloat_co ,other :_ArrayLike [timedelta64 ],/ )-> NDArray [timedelta64 ]: ...
3022
3048
@overload
3049
+ def __rmul__ (
3050
+ self :ndarray [Any ,dtype [character ]| dtypes .StringDType ],
3051
+ other :_ArrayLikeInt ,
3052
+ / ,
3053
+ )-> ndarray [tuple [Any , ...],_DTypeT_co ]: ...
3054
+ @overload
3023
3055
def __rmul__ (self :NDArray [object_ ],other :Any ,/ )-> Any : ...
3024
3056
@overload
3025
3057
def __rmul__ (self :NDArray [Any ],other :_ArrayLikeObject_co ,/ )-> Any : ...
@@ -3341,6 +3373,14 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeT_co, _DTypeT_co]):
3341
3373
@overload
3342
3374
def __iadd__ (self :NDArray [timedelta64 | datetime64 ],other :_ArrayLikeTD64_co ,/ )-> ndarray [_ShapeT_co ,_DTypeT_co ]: ...
3343
3375
@overload
3376
+ def __iadd__ (self :NDArray [bytes_ ],other :_ArrayLikeBytes_co ,/ )-> ndarray [_ShapeT_co ,_DTypeT_co ]: ...
3377
+ @overload
3378
+ def __iadd__ (
3379
+ self :ndarray [Any ,dtype [str_ ]| dtypes .StringDType ],
3380
+ other :_ArrayLikeStr_co | _ArrayLikeString_co ,
3381
+ / ,
3382
+ )-> ndarray [_ShapeT_co ,_DTypeT_co ]: ...
3383
+ @overload
3344
3384
def __iadd__ (self :NDArray [object_ ],other :Any ,/ )-> ndarray [_ShapeT_co ,_DTypeT_co ]: ...
3345
3385
3346
3386
#
@@ -3371,7 +3411,11 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeT_co, _DTypeT_co]):
3371
3411
/ ,
3372
3412
)-> ndarray [_ShapeT_co ,_DTypeT_co ]: ...
3373
3413
@overload
3374
- def __imul__ (self :NDArray [signedinteger ],other :_ArrayLikeInt_co ,/ )-> ndarray [_ShapeT_co ,_DTypeT_co ]: ...
3414
+ def __imul__ (
3415
+ self :ndarray [Any ,dtype [signedinteger | character ]| dtypes .StringDType ],
3416
+ other :_ArrayLikeInt_co ,
3417
+ / ,
3418
+ )-> ndarray [_ShapeT_co ,_DTypeT_co ]: ...
3375
3419
@overload
3376
3420
def __imul__ (self :NDArray [floating | timedelta64 ],other :_ArrayLikeFloat_co ,/ )-> ndarray [_ShapeT_co ,_DTypeT_co ]: ...
3377
3421
@overload