@@ -96,7 +96,7 @@ def tex(self,*args,**kwargs):
9696 m = self .split ()[0 ]
9797 m = m .split ("e" )
9898 if len (m ) > 1 :
99- m = m [0 ]+ "\cdot 10^{" + m [1 ]+ "}"
99+ m = m [0 ]+ r "\cdot 10^{"+ m [1 ]+ "}"
100100 else :
101101 m = m [0 ]
102102 return ("{0}" .format (m ))
@@ -111,14 +111,14 @@ def tex(self,*args,**kwargs):
111111 m = m .split ("e" )
112112 u = u .split ("e" )
113113 if len (m ) > 1 :
114- m = m [0 ]+ "\cdot 10^{" + m [1 ]+ "}"
114+ m = m [0 ]+ r "\cdot 10^{"+ m [1 ]+ "}"
115115 else :
116116 m = m [0 ]
117117 if len (u ) > 1 :
118- u = u [0 ]+ "\cdot 10^{" + u [1 ]+ "}"
118+ u = u [0 ]+ r "\cdot 10^{"+ u [1 ]+ "}"
119119 else :
120120 u = u [0 ]
121- return ("({0}\, \pm \,{1})" .format (m , u ))
121+ return (r "({0}\, \pm \,{1})" .format (m , u ))
122122
123123 def __str__ (self ):
124124 val = self .split ()
@@ -262,7 +262,7 @@ def __pow__(self, other):
262262
263263 def __rpow__ (self , other ):
264264 if isinstance (other , labfloat ):
265- raise labfloat (other .mean ** self .mean , sqrt ((self .mean * other .mean ** (self .mean - 1 ) * other .uncertainty ) ** 2 + (other .mean ** self .mean * log (abs (other .mean )) * self .uncertainty ) ** 2 ))
265+ return labfloat (other .mean ** self .mean , sqrt ((self .mean * other .mean ** (self .mean - 1 ) * other .uncertainty ) ** 2 + (other .mean ** self .mean * log (abs (other .mean )) * self .uncertainty ) ** 2 ))
266266 if isinstance (other , Number ):
267267 return labfloat (other ** self .mean , abs (other ** self .mean * log (abs (other )) * self .uncertainty ))
268268
0 commit comments