Commit 8fe2c06
authored
Fix mypy type: ignore codes in panel_regression.py (#853)
* fix: correct mypy type: ignore codes in panel_regression.py
* fix: use .item() in plot_unit_effects for non-0d xarray result
* fix: use squeeze before .item() in plot_unit_effects
Match the existing idiom at lines 852-858: explicitly collapse the
treated_units dim with .squeeze("treated_units", drop=True) before
calling .item().
* test: harden plot_unit_effects against ndim>0 scalar deprecation
Promote the numpy/xarray DeprecationWarning to an error so the
regression is caught on all Python versions, not just 3.14.1 parent 78ec91d commit 8fe2c06
2 files changed
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
557 | 557 | | |
558 | 558 | | |
559 | 559 | | |
560 | | - | |
| 560 | + | |
561 | 561 | | |
562 | 562 | | |
563 | 563 | | |
| |||
673 | 673 | | |
674 | 674 | | |
675 | 675 | | |
676 | | - | |
| 676 | + | |
677 | 677 | | |
678 | 678 | | |
679 | 679 | | |
680 | 680 | | |
681 | 681 | | |
682 | 682 | | |
683 | | - | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
684 | 687 | | |
685 | 688 | | |
686 | 689 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
293 | 296 | | |
294 | 297 | | |
295 | 298 | | |
| |||
0 commit comments