From aa4c037e397b7877c14f6a4e1673dbfc07f749e6 Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Sun, 17 Oct 2021 11:34:53 +0100 Subject: [PATCH] CObs.gamma_method() works now when real or imag is 0 --- pyerrors/pyerrors.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pyerrors/pyerrors.py b/pyerrors/pyerrors.py index a807871f..82bf7154 100644 --- a/pyerrors/pyerrors.py +++ b/pyerrors/pyerrors.py @@ -638,8 +638,10 @@ class CObs: self.imag = imag def gamma_method(self, **kwargs): - self.real.gamma_method(**kwargs) - self.imag.gamma_method(**kwargs) + if isinstance(self.real, Obs): + self.real.gamma_method(**kwargs) + if isinstance(self.imag, Obs): + self.imag.gamma_method(**kwargs) def __add__(self, other): if hasattr(other, 'real') and hasattr(other, 'imag'):