Example #1
0
    def method(self, other):
        oth = other
        if isinstance(other, Index):
            oth = other._data

        result = meth(self, oth)
        return wrap_arithmetic_op(self, other, result)
Example #2
0
 def __rtruediv__(self, other):
     oth = other
     if isinstance(other, Index):
         # TimedeltaArray defers, so we need to unwrap
         oth = other._values
     result = TimedeltaArray.__rtruediv__(self, oth)
     return wrap_arithmetic_op(self, other, result)
Example #3
0
 def __rtruediv__(self, other):
     oth = other
     if isinstance(other, Index):
         # TimedeltaArray defers, so we need to unwrap
         oth = other._values
     result = TimedeltaArray.__rtruediv__(self, oth)
     return wrap_arithmetic_op(self, other, result)
Example #4
0
    def method(self, other):
        oth = other
        if isinstance(other, Index):
            oth = other._data

        result = meth(self, oth)
        return wrap_arithmetic_op(self, other, result)
Example #5
0
 def __rsub__(self, other):
     result = self._data.__rsub__(other)
     return wrap_arithmetic_op(self, other, result)
Example #6
0
 def __sub__(self, other):
     # dispatch to ExtensionArray implementation
     result = self._data.__sub__(other)
     return wrap_arithmetic_op(self, other, result)
Example #7
0
 def method(self, other):
     result = meth(self._data, maybe_unwrap_index(other))
     return wrap_arithmetic_op(self, other, result)
Example #8
0
 def _evaluate_with_timedelta_like(self, other, op):
     result = TimedeltaArray._evaluate_with_timedelta_like(self, other, op)
     return wrap_arithmetic_op(self, other, result)
Example #9
0
 def method(self, other):
     result = meth(self._data, maybe_unwrap_index(other))
     return wrap_arithmetic_op(self, other, result)
Example #10
0
 def _evaluate_with_timedelta_like(self, other, op):
     result = TimedeltaArrayMixin._evaluate_with_timedelta_like(self, other,
                                                                op)
     return wrap_arithmetic_op(self, other, result)