Removed similar code

master
Per A Brodtkorb 8 years ago
parent 721d688b55
commit afc11e9852

@ -1637,22 +1637,16 @@ class Cheb1d(object):
return self
def __add__(self, other):
new, other = self._copy(other)
other = Cheb1d(other)
new = Cheb1d(self)
new.coeffs = polyadd(self.coeffs, other.coeffs)
return new
def __radd__(self, other):
return self.__add__(other)
def _copy(self, other):
other = Cheb1d(other)
new = Cheb1d(self)
return new, other
def __sub__(self, other):
new, other = self._copy(other)
new.coeffs = polysub(self.coeffs, other.coeffs)
return new
return self.__add__(-other)
def __rsub__(self, other):
new = self.__sub__(other)

Loading…
Cancel
Save