예제 #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)
예제 #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)
예제 #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)
예제 #4
0
파일: timedeltas.py 프로젝트: xuvw/pandas
    def method(self, other):
        oth = other
        if isinstance(other, Index):
            oth = other._data

        result = meth(self, oth)
        return wrap_arithmetic_op(self, other, result)
예제 #5
0
 def __rsub__(self, other):
     result = self._data.__rsub__(other)
     return wrap_arithmetic_op(self, other, result)
예제 #6
0
 def __sub__(self, other):
     # dispatch to ExtensionArray implementation
     result = self._data.__sub__(other)
     return wrap_arithmetic_op(self, other, result)
예제 #7
0
파일: timedeltas.py 프로젝트: Itay4/pandas
 def method(self, other):
     result = meth(self._data, maybe_unwrap_index(other))
     return wrap_arithmetic_op(self, other, result)
예제 #8
0
파일: timedeltas.py 프로젝트: vesh/pandas
 def _evaluate_with_timedelta_like(self, other, op):
     result = TimedeltaArray._evaluate_with_timedelta_like(self, other, op)
     return wrap_arithmetic_op(self, other, result)
예제 #9
0
 def method(self, other):
     result = meth(self._data, maybe_unwrap_index(other))
     return wrap_arithmetic_op(self, other, result)
예제 #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)