We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 25286eb commit 23eb6c2Copy full SHA for 23eb6c2
pandas/core/arrays/datetimelike.py
@@ -1501,11 +1501,10 @@ def __rsub__(self, other):
1501
try:
1502
return -(datetime_result)
1503
except TypeError as e:
1504
- if isinstance(datetime_result, DatetimeArray):
1505
- raise TypeError(
1506
- "Unsupported operand type(s) for -: "
1507
- f"'{type(self).__name__}' and '{type(other).__name__}'"
1508
- ) from e
+ raise TypeError(
+ "Unsupported operand type(s) for -: "
+ f"'{type(self).__name__}' and '{type(other).__name__}'"
+ ) from e
1509
1510
def __iadd__(self, other) -> Self:
1511
result = self + other
0 commit comments