@@ -189,6 +189,7 @@ from pandas._typing import (
189
189
WriteBuffer ,
190
190
_T_co ,
191
191
np_1darray ,
192
+ np_ndarray ,
192
193
np_ndarray_anyint ,
193
194
np_ndarray_bool ,
194
195
np_ndarray_complex ,
@@ -2274,42 +2275,83 @@ class Series(IndexOpsMixin[S1], NDFrame):
2274
2275
def __floordiv__ (self , other : Index [Never ] | Series [Never ]) -> Series : ...
2275
2276
@overload
2276
2277
def __floordiv__ (
2277
- self : Series [bool ] | Series [int ] | Series [float ],
2278
+ self : Series [int ] | Series [float ],
2279
+ other : np_ndarray_bool | np_ndarray_complex | np_ndarray_dt | np_ndarray_td ,
2280
+ ) -> Never : ...
2281
+ @overload
2282
+ def __floordiv__ (
2283
+ self : Series [bool ] | Series [complex ], other : np_ndarray
2284
+ ) -> Never : ...
2285
+ @overload
2286
+ def __floordiv__ (
2287
+ self : Series [int ],
2278
2288
other : (
2279
- float
2280
- | Sequence [float ]
2281
- | np_ndarray_bool
2289
+ Just [int ]
2290
+ | Sequence [Just [int ]]
2291
+ | np_ndarray_anyint
2292
+ | Index [int ]
2293
+ | Series [int ]
2294
+ ),
2295
+ ) -> Series [int ]: ...
2296
+ @overload
2297
+ def __floordiv__ (
2298
+ self : Series [int ],
2299
+ other : (
2300
+ Just [float ]
2301
+ | Sequence [Just [float ]]
2302
+ | np_ndarray_float
2303
+ | Index [float ]
2304
+ | Series [float ]
2305
+ ),
2306
+ ) -> Series [float ]: ...
2307
+ @overload
2308
+ def __floordiv__ (
2309
+ self : Series [float ],
2310
+ other : (
2311
+ Just [int ]
2312
+ | Just [float ]
2313
+ | Sequence [Just [int ]]
2314
+ | Sequence [Just [float ]]
2282
2315
| np_ndarray_anyint
2283
2316
| np_ndarray_float
2284
- | Index [bool ]
2285
2317
| Index [int ]
2286
2318
| Index [float ]
2287
- | Series [bool ]
2288
2319
| Series [int ]
2289
2320
| Series [float ]
2290
2321
),
2291
- ) -> Series [int ]: ...
2322
+ ) -> Series [float ]: ...
2323
+ @overload
2324
+ def __floordiv__ (
2325
+ self : Series [Timedelta ],
2326
+ other : np_ndarray_bool | np_ndarray_complex | np_ndarray_dt ,
2327
+ ) -> Never : ...
2292
2328
@overload
2293
2329
def __floordiv__ (
2294
2330
self : Series [Timedelta ],
2295
2331
other : (
2296
- float
2297
- | Sequence [float ]
2298
- | np_ndarray_bool
2332
+ Just [int ]
2333
+ | Just [float ]
2334
+ | Sequence [Just [int ]]
2335
+ | Sequence [Just [float ]]
2299
2336
| np_ndarray_anyint
2300
2337
| np_ndarray_float
2301
- | Index [bool ]
2302
2338
| Index [int ]
2303
2339
| Index [float ]
2304
- | Series [bool ]
2305
2340
| Series [int ]
2306
2341
| Series [float ]
2307
2342
),
2308
2343
) -> Series [Timedelta ]: ...
2309
2344
@overload
2310
2345
def __floordiv__ (
2311
2346
self : Series [Timedelta ],
2312
- other : timedelta | Sequence [timedelta ] | np .timedelta64 | Series [Timedelta ],
2347
+ other : (
2348
+ timedelta
2349
+ | Sequence [timedelta ]
2350
+ | np .timedelta64
2351
+ | np_ndarray_td
2352
+ | TimedeltaIndex
2353
+ | Series [Timedelta ]
2354
+ ),
2313
2355
) -> Series [int ]: ...
2314
2356
@overload
2315
2357
def floordiv (
@@ -2321,37 +2363,63 @@ class Series(IndexOpsMixin[S1], NDFrame):
2321
2363
) -> Series : ...
2322
2364
@overload
2323
2365
def floordiv (
2324
- self : Series [bool ] | Series [ int ] | Series [ float ],
2366
+ self : Series [int ],
2325
2367
other : (
2326
- float
2327
- | Sequence [float ]
2328
- | np_ndarray_bool
2368
+ Just [int ]
2369
+ | Sequence [Just [int ]]
2370
+ | np_ndarray_anyint
2371
+ | Index [int ]
2372
+ | Series [int ]
2373
+ ),
2374
+ level : Level | None = ...,
2375
+ fill_value : float | None = None ,
2376
+ axis : AxisIndex | None = 0 ,
2377
+ ) -> Series [int ]: ...
2378
+ @overload
2379
+ def floordiv (
2380
+ self : Series [int ],
2381
+ other : (
2382
+ Just [float ]
2383
+ | Sequence [Just [float ]]
2384
+ | np_ndarray_float
2385
+ | Index [float ]
2386
+ | Series [float ]
2387
+ ),
2388
+ level : Level | None = ...,
2389
+ fill_value : float | None = None ,
2390
+ axis : AxisIndex | None = 0 ,
2391
+ ) -> Series [float ]: ...
2392
+ @overload
2393
+ def floordiv (
2394
+ self : Series [float ],
2395
+ other : (
2396
+ Just [int ]
2397
+ | Just [float ]
2398
+ | Sequence [Just [int ]]
2399
+ | Sequence [Just [float ]]
2329
2400
| np_ndarray_anyint
2330
2401
| np_ndarray_float
2331
- | Index [bool ]
2332
2402
| Index [int ]
2333
2403
| Index [float ]
2334
- | Series [bool ]
2335
2404
| Series [int ]
2336
2405
| Series [float ]
2337
2406
),
2338
2407
level : Level | None = ...,
2339
2408
fill_value : float | None = None ,
2340
2409
axis : AxisIndex | None = 0 ,
2341
- ) -> Series [int ]: ...
2410
+ ) -> Series [float ]: ...
2342
2411
@overload
2343
2412
def floordiv (
2344
2413
self : Series [Timedelta ],
2345
2414
other : (
2346
- float
2347
- | Sequence [float ]
2348
- | np_ndarray_bool
2415
+ Just [int ]
2416
+ | Just [float ]
2417
+ | Sequence [Just [int ]]
2418
+ | Sequence [Just [float ]]
2349
2419
| np_ndarray_anyint
2350
2420
| np_ndarray_float
2351
- | Index [bool ]
2352
2421
| Index [int ]
2353
2422
| Index [float ]
2354
- | Series [bool ]
2355
2423
| Series [int ]
2356
2424
| Series [float ]
2357
2425
),
@@ -2366,6 +2434,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
2366
2434
timedelta
2367
2435
| Sequence [timedelta ]
2368
2436
| np .timedelta64
2437
+ | np_ndarray_td
2369
2438
| TimedeltaIndex
2370
2439
| Series [Timedelta ]
2371
2440
),
@@ -2377,28 +2446,70 @@ class Series(IndexOpsMixin[S1], NDFrame):
2377
2446
def __rfloordiv__ (self , other : Index [Never ] | Series [Never ]) -> Series : ...
2378
2447
@overload
2379
2448
def __rfloordiv__ (
2380
- self : Series [bool ] | Series [int ] | Series [float ],
2449
+ self : Series [int ] | Series [float ],
2450
+ other : np_ndarray_bool | np_ndarray_complex | np_ndarray_dt | np_ndarray_td ,
2451
+ ) -> Never : ...
2452
+ @overload
2453
+ def __rfloordiv__ (
2454
+ self : Series [bool ] | Series [complex ], other : np_ndarray
2455
+ ) -> Never : ...
2456
+ @overload
2457
+ def __rfloordiv__ (
2458
+ self : Series [int ],
2381
2459
other : (
2382
- float
2383
- | Sequence [float ]
2384
- | np_ndarray_bool
2460
+ Just [int ]
2461
+ | Sequence [Just [int ]]
2462
+ | np_ndarray_anyint
2463
+ | Index [int ]
2464
+ | Series [int ]
2465
+ ),
2466
+ ) -> Series [int ]: ...
2467
+ @overload
2468
+ def __rfloordiv__ (
2469
+ self : Series [int ],
2470
+ other : (
2471
+ Just [float ]
2472
+ | Sequence [Just [float ]]
2473
+ | np_ndarray_float
2474
+ | Index [float ]
2475
+ | Series [float ]
2476
+ ),
2477
+ ) -> Series [float ]: ...
2478
+ @overload
2479
+ def __rfloordiv__ (
2480
+ self : Series [float ],
2481
+ other : (
2482
+ Just [int ]
2483
+ | Just [float ]
2484
+ | Sequence [Just [int ]]
2485
+ | Sequence [Just [float ]]
2385
2486
| np_ndarray_anyint
2386
2487
| np_ndarray_float
2387
- | Index [bool ]
2388
2488
| Index [int ]
2389
2489
| Index [float ]
2390
- | Series [bool ]
2391
2490
| Series [int ]
2392
2491
| Series [float ]
2393
2492
),
2394
- ) -> Series [int ]: ...
2493
+ ) -> Series [float ]: ...
2494
+ @overload
2495
+ def __rfloordiv__ (
2496
+ self : Series [Timedelta ],
2497
+ other : (
2498
+ np_ndarray_bool
2499
+ | np_ndarray_anyint
2500
+ | np_ndarray_float
2501
+ | np_ndarray_complex
2502
+ | np_ndarray_dt
2503
+ ),
2504
+ ) -> Never : ...
2395
2505
@overload
2396
2506
def __rfloordiv__ (
2397
2507
self : Series [Timedelta ],
2398
2508
other : (
2399
2509
timedelta
2400
2510
| Sequence [timedelta ]
2401
2511
| np .timedelta64
2512
+ | np_ndarray_td
2402
2513
| TimedeltaIndex
2403
2514
| Series [Timedelta ]
2404
2515
),
@@ -2413,30 +2524,59 @@ class Series(IndexOpsMixin[S1], NDFrame):
2413
2524
) -> Series : ...
2414
2525
@overload
2415
2526
def rfloordiv (
2416
- self : Series [bool ] | Series [ int ] | Series [ float ],
2527
+ self : Series [int ],
2417
2528
other : (
2418
- float
2419
- | Sequence [float ]
2420
- | np_ndarray_bool
2529
+ Just [int ]
2530
+ | Sequence [Just [int ]]
2531
+ | np_ndarray_anyint
2532
+ | Index [int ]
2533
+ | Series [int ]
2534
+ ),
2535
+ level : Level | None = ...,
2536
+ fill_value : float | None = None ,
2537
+ axis : AxisIndex = ...,
2538
+ ) -> Series [int ]: ...
2539
+ @overload
2540
+ def rfloordiv (
2541
+ self : Series [int ],
2542
+ other : (
2543
+ Just [float ]
2544
+ | Sequence [Just [float ]]
2545
+ | np_ndarray_float
2546
+ | Index [float ]
2547
+ | Series [float ]
2548
+ ),
2549
+ level : Level | None = ...,
2550
+ fill_value : float | None = None ,
2551
+ axis : AxisIndex = ...,
2552
+ ) -> Series [float ]: ...
2553
+ @overload
2554
+ def rfloordiv (
2555
+ self : Series [float ],
2556
+ other : (
2557
+ Just [int ]
2558
+ | Just [float ]
2559
+ | Sequence [Just [int ]]
2560
+ | Sequence [Just [float ]]
2421
2561
| np_ndarray_anyint
2422
2562
| np_ndarray_float
2423
- | Index [bool ]
2424
2563
| Index [int ]
2425
2564
| Index [float ]
2426
- | Series [bool ]
2565
+ | Series [int ]
2427
2566
| Series [float ]
2428
2567
),
2429
2568
level : Level | None = ...,
2430
2569
fill_value : float | None = None ,
2431
2570
axis : AxisIndex = ...,
2432
- ) -> Series [int ]: ...
2571
+ ) -> Series [float ]: ...
2433
2572
@overload
2434
2573
def rfloordiv (
2435
2574
self : Series [Timedelta ],
2436
2575
other : (
2437
2576
timedelta
2438
2577
| Sequence [timedelta ]
2439
2578
| np .timedelta64
2579
+ | np_ndarray_td
2440
2580
| TimedeltaIndex
2441
2581
| Series [Timedelta ]
2442
2582
),
0 commit comments