Example #1
0
 def __mul__(self, other):
     if isinstance(other,Measurement):
         if (not self.variance is None) and hasattr(other,'variance') and not other.variance is None:
             return Measurement(*err1d.mul(self.x,self.variance,other.x,other.variance))
         else:
             return Measurement(self.x*other.x,None)
     else:
         if (not self.variance is None) and hasattr(other,'variance') and not other.variance is None:
             return Measurement(self.x*other, self.variance*other**2)
         else:
             return Measurement(self.x*other, None)
Example #2
0
 def __mul__(self, other):
     if isinstance(other, Uncertainty):
         return Uncertainty(
             *err1d.mul(self.x, self.variance, other.x, other.variance))
     else:
         return Uncertainty(self.x * other, self.variance * other**2)
Example #3
0
 def __mul__(self, other):
     if isinstance(other,Measurement):
         return Measurement(*err1d.mul(self.x,self.variance,other.x,other.variance))
     else:
         return Measurement(self.x*other, self.variance*other**2)
Example #4
0
 def __mul__(self, other):
     if isinstance(other,Uncertainty):
         return Uncertainty(*err1d.mul(self.x,self.variance,other.x,other.variance))
     else:
         return Uncertainty(self.x*other, self.variance*other**2)
Example #5
0
 def __mul__(self, other):
     if isinstance(other, Measurement):
         return Measurement(
             *err1d.mul(self.x, self.variance, other.x, other.variance))
     else:
         return Measurement(self.x * other, self.variance * other**2)