def __sub__(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.sub(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.x, self.variance+0) # Force copy else: return Measurement(self.x-other, None)
def __sub__(self, other): if isinstance(other, Uncertainty): return Uncertainty( *err1d.sub(self.x, self.variance, other.x, other.variance)) else: return Uncertainty(self.x - other, self.variance + 0) # Force copy
def __sub__(self, other): if isinstance(other,Measurement): return Measurement(*err1d.sub(self.x,self.variance,other.x,other.variance)) else: return Measurement(self.x-other, self.variance+0) # Force copy
def __sub__(self, other): if isinstance(other,Uncertainty): return Uncertainty(*err1d.sub(self.x,self.variance,other.x,other.variance)) else: return Uncertainty(self.x-other, self.variance+0) # Force copy
def __sub__(self, other): if isinstance(other, Measurement): return Measurement( *err1d.sub(self.x, self.variance, other.x, other.variance)) else: return Measurement(self.x - other, self.variance + 0) # Force copy