(self, other)
| 527 | return type(self)(other + np.array(self)) |
| 528 | |
| 529 | def __sub__(self, other): |
| 530 | if _contains_datetime_timedeltas(other): |
| 531 | return type(self)(np.array(self) - other) |
| 532 | if isinstance(other, pd.TimedeltaIndex): |
| 533 | return type(self)(np.array(self) - other.to_pytimedelta()) |
| 534 | if _contains_cftime_datetimes(np.array(other)): |
| 535 | try: |
| 536 | return pd.TimedeltaIndex(np.array(self) - np.array(other)) |
| 537 | except OUT_OF_BOUNDS_TIMEDELTA_ERRORS as err: |
| 538 | raise ValueError( |
| 539 | "The time difference exceeds the range of values " |
| 540 | "that can be expressed at the nanosecond resolution." |
| 541 | ) from err |
| 542 | return NotImplemented |
| 543 | |
| 544 | def __rsub__(self, other): |
| 545 | try: |
nothing calls this directly
no test coverage detected