@@ -2097,27 +2097,48 @@ class Series(IndexOpsMixin[S1], NDFrame):
2097
2097
def __sub__ (self , other : num | _ListLike | Series ) -> Series : ...
2098
2098
@overload
2099
2099
def __truediv__ (
2100
- self : Series [Never ], other : Scalar | _ListLike | Series
2100
+ self : Series [Never ], other : complex | _ListLike | Series
2101
2101
) -> Series : ...
2102
2102
@overload
2103
2103
def __truediv__ (self , other : Series [Never ]) -> Series : ...
2104
2104
@overload
2105
2105
def __truediv__ (
2106
- self : Series [int ],
2106
+ self : Series [bool ],
2107
2107
other : int | Sequence [int ] | np_ndarray_anyint | np_ndarray_float | Series [int ],
2108
2108
) -> Series [float ]: ...
2109
2109
@overload
2110
2110
def __truediv__ (
2111
- self : Series [int ], other : _T_COMPLEX | Sequence [_T_COMPLEX ] | Series [_T_COMPLEX ]
2111
+ self : Series [bool ],
2112
+ other : _T_COMPLEX | Sequence [_T_COMPLEX ] | Series [_T_COMPLEX ],
2112
2113
) -> Series [_T_COMPLEX ]: ...
2113
2114
@overload
2114
2115
def __truediv__ (
2115
- self : Series [int ], other : np_ndarray_complex
2116
- ) -> Series [complex ]: ...
2116
+ self : Series [int ],
2117
+ other : (
2118
+ _T_INT
2119
+ | Sequence [_T_INT ]
2120
+ | np_ndarray_bool
2121
+ | np_ndarray_anyint
2122
+ | np_ndarray_float
2123
+ | Series [_T_INT ]
2124
+ ),
2125
+ ) -> Series [float ]: ...
2126
+ @overload
2127
+ def __truediv__ (
2128
+ self : Series [int ],
2129
+ other : _T_COMPLEX | Sequence [_T_COMPLEX ] | Series [_T_COMPLEX ],
2130
+ ) -> Series [_T_COMPLEX ]: ...
2117
2131
@overload
2118
2132
def __truediv__ (
2119
2133
self : Series [float ],
2120
- other : int | Sequence [int ] | np_ndarray_anyint | np_ndarray_float | Series [int ],
2134
+ other : (
2135
+ _T_INT
2136
+ | Sequence [_T_INT ]
2137
+ | np_ndarray_bool
2138
+ | np_ndarray_anyint
2139
+ | np_ndarray_float
2140
+ | Series [_T_INT ]
2141
+ ),
2121
2142
) -> Series [float ]: ...
2122
2143
@overload
2123
2144
def __truediv__ (
@@ -2126,17 +2147,17 @@ class Series(IndexOpsMixin[S1], NDFrame):
2126
2147
) -> Series [_T_COMPLEX ]: ...
2127
2148
@overload
2128
2149
def __truediv__ (
2129
- self : Series [float ], other : np_ndarray_complex
2150
+ self : Series [_T_COMPLEX ], other : np_ndarray_complex
2130
2151
) -> Series [complex ]: ...
2131
2152
@overload
2132
2153
def __truediv__ (
2133
2154
self : Series [complex ],
2134
2155
other : (
2135
2156
_T_COMPLEX
2136
2157
| Sequence [_T_COMPLEX ]
2158
+ | np_ndarray_bool
2137
2159
| np_ndarray_anyint
2138
2160
| np_ndarray_float
2139
- | np_ndarray_complex
2140
2161
| Series [_T_COMPLEX ]
2141
2162
),
2142
2163
) -> Series [complex ]: ...
@@ -2145,7 +2166,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
2145
2166
@overload
2146
2167
def truediv (
2147
2168
self : Series [Never ],
2148
- other : Scalar | _ListLike | Series ,
2169
+ other : complex | _ListLike | Series ,
2149
2170
level : Level | None = None ,
2150
2171
fill_value : float | None = None ,
2151
2172
axis : AxisIndex = 0 ,
@@ -2160,15 +2181,15 @@ class Series(IndexOpsMixin[S1], NDFrame):
2160
2181
) -> Series : ...
2161
2182
@overload
2162
2183
def truediv (
2163
- self : Series [int ],
2184
+ self : Series [bool ],
2164
2185
other : int | Sequence [int ] | np_ndarray_anyint | np_ndarray_float | Series [int ],
2165
2186
level : Level | None = None ,
2166
2187
fill_value : float | None = None ,
2167
2188
axis : AxisIndex = 0 ,
2168
2189
) -> Series [float ]: ...
2169
2190
@overload
2170
2191
def truediv (
2171
- self : Series [int ],
2192
+ self : Series [bool ],
2172
2193
other : _T_COMPLEX | Sequence [_T_COMPLEX ] | Series [_T_COMPLEX ],
2173
2194
level : Level | None = None ,
2174
2195
fill_value : float | None = None ,
@@ -2177,11 +2198,26 @@ class Series(IndexOpsMixin[S1], NDFrame):
2177
2198
@overload
2178
2199
def truediv (
2179
2200
self : Series [int ],
2180
- other : np_ndarray_complex ,
2201
+ other : (
2202
+ _T_INT
2203
+ | Sequence [_T_INT ]
2204
+ | np_ndarray_bool
2205
+ | np_ndarray_anyint
2206
+ | np_ndarray_float
2207
+ | Series [_T_INT ]
2208
+ ),
2181
2209
level : Level | None = None ,
2182
2210
fill_value : float | None = None ,
2183
2211
axis : AxisIndex = 0 ,
2184
- ) -> Series [complex ]: ...
2212
+ ) -> Series [float ]: ...
2213
+ @overload
2214
+ def truediv (
2215
+ self : Series [int ],
2216
+ other : _T_COMPLEX | Sequence [_T_COMPLEX ] | Series [_T_COMPLEX ],
2217
+ level : Level | None = None ,
2218
+ fill_value : float | None = None ,
2219
+ axis : AxisIndex = 0 ,
2220
+ ) -> Series [_T_COMPLEX ]: ...
2185
2221
@overload
2186
2222
def truediv (
2187
2223
self : Series [float ],
@@ -2200,7 +2236,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
2200
2236
) -> Series [_T_COMPLEX ]: ...
2201
2237
@overload
2202
2238
def truediv (
2203
- self : Series [float ],
2239
+ self : Series [_T_COMPLEX ],
2204
2240
other : np_ndarray_complex ,
2205
2241
level : Level | None = None ,
2206
2242
fill_value : float | None = None ,
@@ -2212,9 +2248,9 @@ class Series(IndexOpsMixin[S1], NDFrame):
2212
2248
other : (
2213
2249
_T_COMPLEX
2214
2250
| Sequence [_T_COMPLEX ]
2251
+ | np_ndarray_bool
2215
2252
| np_ndarray_anyint
2216
2253
| np_ndarray_float
2217
- | np_ndarray_complex
2218
2254
| Series [_T_COMPLEX ]
2219
2255
),
2220
2256
level : Level | None = None ,
@@ -2231,20 +2267,31 @@ class Series(IndexOpsMixin[S1], NDFrame):
2231
2267
) -> Series : ...
2232
2268
div = truediv
2233
2269
@overload
2234
- def __rtruediv__ (self : Series [Never ], other : Scalar | _ListLike ) -> Series : ...
2270
+ def __rtruediv__ (self : Series [Never ], other : complex | _ListLike ) -> Series : ...
2235
2271
@overload
2236
2272
def __rtruediv__ (
2237
- self : Series [int ],
2238
- other : int | Sequence [int ] | np_ndarray_anyint | np_ndarray_float ,
2273
+ self : Series [bool ],
2274
+ other : _T_INT | Sequence [_T_INT ] | np_ndarray_anyint | np_ndarray_float ,
2239
2275
) -> Series [float ]: ...
2240
2276
@overload
2241
2277
def __rtruediv__ (
2242
- self : Series [int ], other : _T_COMPLEX | Sequence [_T_COMPLEX ]
2278
+ self : Series [bool ], other : _T_COMPLEX | Sequence [_T_COMPLEX ]
2243
2279
) -> Series [_T_COMPLEX ]: ...
2244
2280
@overload
2245
2281
def __rtruediv__ (
2246
- self : Series [int ], other : np_ndarray_complex
2247
- ) -> Series [complex ]: ...
2282
+ self : Series [int ],
2283
+ other : (
2284
+ _T_INT
2285
+ | Sequence [_T_INT ]
2286
+ | np_ndarray_bool
2287
+ | np_ndarray_anyint
2288
+ | np_ndarray_float
2289
+ ),
2290
+ ) -> Series [float ]: ...
2291
+ @overload
2292
+ def __rtruediv__ (
2293
+ self : Series [int ], other : _T_COMPLEX | Sequence [_T_COMPLEX ]
2294
+ ) -> Series [_T_COMPLEX ]: ...
2248
2295
@overload
2249
2296
def __rtruediv__ (
2250
2297
self : Series [float ],
@@ -2255,41 +2302,41 @@ class Series(IndexOpsMixin[S1], NDFrame):
2255
2302
self : Series [float ], other : _T_COMPLEX | Sequence [_T_COMPLEX ]
2256
2303
) -> Series [_T_COMPLEX ]: ...
2257
2304
@overload
2258
- def __rtruediv__ (
2259
- self : Series [float ], other : np_ndarray_complex
2260
- ) -> Series [complex ]: ...
2261
- @overload
2262
2305
def __rtruediv__ (
2263
2306
self : Series [complex ],
2264
2307
other : (
2265
2308
_T_COMPLEX
2266
2309
| Sequence [_T_COMPLEX ]
2310
+ | np_ndarray_bool
2267
2311
| np_ndarray_anyint
2268
2312
| np_ndarray_float
2269
- | np_ndarray_complex
2270
2313
),
2271
2314
) -> Series [complex ]: ...
2272
2315
@overload
2316
+ def __rtruediv__ (
2317
+ self : Series [_T_COMPLEX ], other : np_ndarray_complex
2318
+ ) -> Series [complex ]: ...
2319
+ @overload
2273
2320
def __rtruediv__ (self , other : Path ) -> Series : ...
2274
2321
@overload
2275
2322
def rtruediv (
2276
2323
self : Series [Never ],
2277
- other : Scalar | _ListLike | Series ,
2324
+ other : complex | _ListLike | Series ,
2278
2325
level : Level | None = None ,
2279
2326
fill_value : float | None = None ,
2280
2327
axis : AxisIndex = 0 ,
2281
2328
) -> Series : ...
2282
2329
@overload
2283
2330
def rtruediv (
2284
- self : Series [int ],
2331
+ self : Series [bool ],
2285
2332
other : int | Sequence [int ] | np_ndarray_anyint | np_ndarray_float | Series [int ],
2286
2333
level : Level | None = None ,
2287
2334
fill_value : float | None = None ,
2288
2335
axis : AxisIndex = 0 ,
2289
2336
) -> Series [float ]: ...
2290
2337
@overload
2291
2338
def rtruediv (
2292
- self : Series [int ],
2339
+ self : Series [bool ],
2293
2340
other : _T_COMPLEX | Sequence [_T_COMPLEX ] | Series [_T_COMPLEX ],
2294
2341
level : Level | None = None ,
2295
2342
fill_value : float | None = None ,
@@ -2298,51 +2345,66 @@ class Series(IndexOpsMixin[S1], NDFrame):
2298
2345
@overload
2299
2346
def rtruediv (
2300
2347
self : Series [int ],
2301
- other : np_ndarray_complex ,
2348
+ other : (
2349
+ _T_INT
2350
+ | Sequence [_T_INT ]
2351
+ | np_ndarray_bool
2352
+ | np_ndarray_anyint
2353
+ | np_ndarray_float
2354
+ | Series [_T_INT ]
2355
+ ),
2302
2356
level : Level | None = None ,
2303
2357
fill_value : float | None = None ,
2304
2358
axis : AxisIndex = 0 ,
2305
- ) -> Series [complex ]: ...
2359
+ ) -> Series [float ]: ...
2306
2360
@overload
2307
2361
def rtruediv (
2308
- self : Series [float ],
2309
- other : int | Sequence [int ] | np_ndarray_anyint | np_ndarray_float | Series [int ],
2362
+ self : Series [int ],
2363
+ other : _T_COMPLEX | Sequence [_T_COMPLEX ] | Series [_T_COMPLEX ],
2310
2364
level : Level | None = None ,
2311
2365
fill_value : float | None = None ,
2312
2366
axis : AxisIndex = 0 ,
2313
- ) -> Series [float ]: ...
2367
+ ) -> Series [_T_COMPLEX ]: ...
2314
2368
@overload
2315
2369
def rtruediv (
2316
2370
self : Series [float ],
2317
- other : _T_COMPLEX | Sequence [_T_COMPLEX ] | Series [_T_COMPLEX ],
2371
+ other : int | Sequence [int ] | np_ndarray_anyint | np_ndarray_float | Series [int ],
2318
2372
level : Level | None = None ,
2319
2373
fill_value : float | None = None ,
2320
2374
axis : AxisIndex = 0 ,
2321
- ) -> Series [_T_COMPLEX ]: ...
2375
+ ) -> Series [float ]: ...
2322
2376
@overload
2323
2377
def rtruediv (
2324
2378
self : Series [float ],
2325
- other : np_ndarray_complex ,
2379
+ other : _T_COMPLEX | Sequence [ _T_COMPLEX ] | Series [ _T_COMPLEX ] ,
2326
2380
level : Level | None = None ,
2327
2381
fill_value : float | None = None ,
2328
2382
axis : AxisIndex = 0 ,
2329
- ) -> Series [complex ]: ...
2383
+ ) -> Series [_T_COMPLEX ]: ...
2330
2384
@overload
2331
2385
def rtruediv (
2332
2386
self : Series [complex ],
2333
2387
other : (
2334
2388
_T_COMPLEX
2335
2389
| Sequence [_T_COMPLEX ]
2390
+ | np_ndarray_bool
2336
2391
| np_ndarray_anyint
2337
2392
| np_ndarray_float
2338
- | np_ndarray_complex
2339
2393
| Series [_T_COMPLEX ]
2340
2394
),
2341
2395
level : Level | None = None ,
2342
2396
fill_value : float | None = None ,
2343
2397
axis : AxisIndex = 0 ,
2344
2398
) -> Series [complex ]: ...
2345
2399
@overload
2400
+ def rtruediv (
2401
+ self : Series [_T_COMPLEX ],
2402
+ other : np_ndarray_complex ,
2403
+ level : Level | None = None ,
2404
+ fill_value : float | None = None ,
2405
+ axis : AxisIndex = 0 ,
2406
+ ) -> Series [complex ]: ...
2407
+ @overload
2346
2408
def rtruediv (
2347
2409
self ,
2348
2410
other : Path ,
0 commit comments