Commit 4273ad0
BUG: Make Series flex methods (truediv, floordiv, etc.) raise NotImplementedError for bool dtypes
Apply _bool_arith_check in Series._binop() to ensure flex methods like
truediv(), floordiv(), pow() raise NotImplementedError for bool dtypes,
consistent with their dunder counterparts (__truediv__, __floordiv__, etc.).
The fix applies the check directly rather than routing through arithmetic_op()
to avoid affecting comparison operations (gt, lt, etc.) that also use _binop.
Closes #63250
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>1 parent 944c527 commit 4273ad0
2 files changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6718 | 6718 | | |
6719 | 6719 | | |
6720 | 6720 | | |
| 6721 | + | |
| 6722 | + | |
| 6723 | + | |
6721 | 6724 | | |
6722 | 6725 | | |
6723 | 6726 | | |
| |||
0 commit comments