(self)
| 1455 | |
| 1456 | @final |
| 1457 | def __neg__(self) -> Self: |
| 1458 | def blk_func(values: ArrayLike): |
| 1459 | if is_bool_dtype(values.dtype): |
| 1460 | # error: Argument 1 to "inv" has incompatible type "Union |
| 1461 | # [ExtensionArray, ndarray[Any, Any]]"; expected |
| 1462 | # "_SupportsInversion[ndarray[Any, dtype[bool_]]]" |
| 1463 | return operator.inv(values) # type: ignore[arg-type] |
| 1464 | else: |
| 1465 | # error: Argument 1 to "neg" has incompatible type "Union |
| 1466 | # [ExtensionArray, ndarray[Any, Any]]"; expected |
| 1467 | # "_SupportsNeg[ndarray[Any, dtype[Any]]]" |
| 1468 | return operator.neg(values) # type: ignore[arg-type] |
| 1469 | |
| 1470 | new_data = self._mgr.apply(blk_func) |
| 1471 | res = self._constructor_from_mgr(new_data, axes=new_data.axes) |
| 1472 | return res.__finalize__(self, method="__neg__") |
| 1473 | |
| 1474 | @final |
| 1475 | def __pos__(self) -> Self: |
nothing calls this directly
no test coverage detected