Wrap arithmetic method to operate inplace.
(self, other, op)
| 12310 | |
| 12311 | @final |
| 12312 | def _inplace_method(self, other, op) -> Self: |
| 12313 | """ |
| 12314 | Wrap arithmetic method to operate inplace. |
| 12315 | """ |
| 12316 | result = op(self, other) |
| 12317 | |
| 12318 | # this makes sure that we are aligned like the input |
| 12319 | # we are updating inplace |
| 12320 | self._update_inplace(result.reindex_like(self)) |
| 12321 | return self |
| 12322 | |
| 12323 | @final |
| 12324 | def __iadd__(self, other) -> Self: |
no test coverage detected