コード例 #1
0
ファイル: uncertainty.py プロジェクト: scottwedge/dataflow
 def __pow__(self, other):
     if isinstance(other,Measurement):
         # Haven't calcuated variance in (a+/-da) ** (b+/-db)
         return NotImplemented
     else:
         if (not self.variance is None) and hasattr(other,'variance') and not other.variance is None:
             return Measurement(*err1d.pow(self.x,self.variance,other))
         else:
             return Measurement(pow(self.x,other),None)
コード例 #2
0
ファイル: uncertainty.py プロジェクト: pkienzle/sasview
 def __pow__(self, other):
     if isinstance(other, Uncertainty):
         # Haven't calcuated variance in (a+/-da) ** (b+/-db)
         return NotImplemented
     else:
         return Uncertainty(*err1d.pow(self.x, self.variance, other))
コード例 #3
0
ファイル: uncertainty.py プロジェクト: pkienzle/sasview
 def __rtruediv__(self, other):
     x, variance = err1d.pow(self.x, self.variance, -1)
     return Uncertainty(x * other, variance * other**2)
コード例 #4
0
ファイル: uncertainty.py プロジェクト: scottwedge/dataflow
 def __rtruediv__(self, other):
     if (not self.variance is None) and hasattr(other,'variance') and not other.variance is None:
         x,variance = err1d.pow(self.x,self.variance,-1)
         return Measurement(other/self.x,variance*other**2)
     else:
         return Measurement(other/self.x,None)
コード例 #5
0
ファイル: uncertainty.py プロジェクト: diffpy/srfit-sasview
 def __rtruediv__(self, other):
     x,variance = err1d.pow(self.x,self.variance,-1)
     return Uncertainty(x*other,variance*other**2)
コード例 #6
0
ファイル: uncertainty.py プロジェクト: diffpy/srfit-sasview
 def __pow__(self, other):
     if isinstance(other,Uncertainty):
         # Haven't calcuated variance in (a+/-da) ** (b+/-db)
         return NotImplemented
     else:
         return Uncertainty(*err1d.pow(self.x,self.variance,other))
コード例 #7
0
ファイル: uncertainty.py プロジェクト: liuhuiwisdom/WRed
 def __rtruediv__(self, other):
     x,variance = err1d.pow(self.x,self.variance,-1)
     return Measurement(x*other,variance*other**2)
コード例 #8
0
ファイル: uncertainty.py プロジェクト: ourobouros/WRed
 def __rtruediv__(self, other):
     x, variance = err1d.pow(self.x, self.variance, -1)
     return Measurement(x * other, variance * other**2)