Removed similar code

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

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

Loading…
Cancel
Save