def __adapt__(self,validator):
return validator(self.eval())
+original_sqrt=math.sqrt
original_cos=math.cos
original_sin=math.sin
original_ncos=Numeric.cos
class Unop(Formula):
opmap = { '-': lambda x: -x,
+ 'sqrt': lambda x: original_sqrt(x),
'sin': lambda x: original_sin(x),
'cos': lambda x: original_cos(x) ,
'ncos': lambda x: original_ncos(x),
def sin(f): return Unop('nsin', f)
Numeric.cos=cos
Numeric.sin=sin
+def sqrt(f): return Unop('sqrt', f)
def cos(f): return Unop('cos', f)
def sin(f): return Unop('sin', f)
math.cos=cos
math.sin=sin
+math.sqrt=sqrt