예제 #1
0
 def remake_constructor(self):
     if self.get_style('exponent') == 'radical':
         # Use a different constructor if using the 'radical' style.
         if self.exponent == frac(one, two):
             return 'sqrt'
         else:
             raise ValueError(
                 "Unkown radical type, exponentiating to the power "
                 "of %s" % str(self.exponent))
     return Function.remake_constructor(self)
예제 #2
0
 def remake_constructor(self):
     if (self.get_style('exponent', 'raised') == 'radical' and
             self.exponent == frac(one, two)):
         return 'sqrt'
     return Function.remake_constructor(self)