Esempio n. 1
0
 def __add__(self,other):
     """ Add  """
     try:
         newchebs = [ cheb.__add__(other) for cheb in self.chebfuns ]
     except NameError:
         newchebs = [ cheb._new_func(lambda x: cheb._eval(x) + other._eval(x),
                         rtol=min(self.rtol,other.rtol)) for cheb in self.chebfuns ]
     newguy = self._new_chebfuns(newchebs)
     return newguy
Esempio n. 2
0
 def _wrap_call(self,func):
     """ We were called by a wrapped func """
     newchebs = [ cheb._new_func(lambda x: func(cheb._eval(x))) for cheb in self.chebfuns ]
     newguy = self._new_chebfuns(newchebs)
     return newguy