Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 5
0
 def __rsub__(self, other):
     result = self._data.__rsub__(other)
     return wrap_arithmetic_op(self, other, result)
Exemplo n.º 6
0
 def __sub__(self, other):
     # dispatch to ExtensionArray implementation
     result = self._data.__sub__(other)
     return wrap_arithmetic_op(self, other, result)
Exemplo n.º 7
0
 def method(self, other):
     result = meth(self._data, maybe_unwrap_index(other))
     return wrap_arithmetic_op(self, other, result)
Exemplo n.º 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)
Exemplo n.º 9
0
 def method(self, other):
     result = meth(self._data, maybe_unwrap_index(other))
     return wrap_arithmetic_op(self, other, result)
Exemplo n.º 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)