diff --git a/docs/pyerrors.html b/docs/pyerrors.html index 47a45e1e..de0d06d7 100644 --- a/docs/pyerrors.html +++ b/docs/pyerrors.html @@ -3,7 +3,7 @@ - + pyerrors API documentation diff --git a/docs/pyerrors/correlators.html b/docs/pyerrors/correlators.html index 1fb49e34..5f2ae92d 100644 --- a/docs/pyerrors/correlators.html +++ b/docs/pyerrors/correlators.html @@ -3,7 +3,7 @@ - + pyerrors.correlators API documentation diff --git a/docs/pyerrors/covobs.html b/docs/pyerrors/covobs.html index 9485ded4..e84a4731 100644 --- a/docs/pyerrors/covobs.html +++ b/docs/pyerrors/covobs.html @@ -3,7 +3,7 @@ - + pyerrors.covobs API documentation diff --git a/docs/pyerrors/dirac.html b/docs/pyerrors/dirac.html index d615dc6c..a9e048e2 100644 --- a/docs/pyerrors/dirac.html +++ b/docs/pyerrors/dirac.html @@ -3,7 +3,7 @@ - + pyerrors.dirac API documentation diff --git a/docs/pyerrors/fits.html b/docs/pyerrors/fits.html index 1a98b1e6..3c3a92eb 100644 --- a/docs/pyerrors/fits.html +++ b/docs/pyerrors/fits.html @@ -3,7 +3,7 @@ - + pyerrors.fits API documentation diff --git a/docs/pyerrors/input.html b/docs/pyerrors/input.html index f1e050c6..33c3e953 100644 --- a/docs/pyerrors/input.html +++ b/docs/pyerrors/input.html @@ -3,7 +3,7 @@ - + pyerrors.input API documentation diff --git a/docs/pyerrors/input/bdio.html b/docs/pyerrors/input/bdio.html index a959c89b..b7873d9f 100644 --- a/docs/pyerrors/input/bdio.html +++ b/docs/pyerrors/input/bdio.html @@ -3,7 +3,7 @@ - + pyerrors.input.bdio API documentation diff --git a/docs/pyerrors/input/hadrons.html b/docs/pyerrors/input/hadrons.html index 2f1a69df..85eea644 100644 --- a/docs/pyerrors/input/hadrons.html +++ b/docs/pyerrors/input/hadrons.html @@ -3,7 +3,7 @@ - + pyerrors.input.hadrons API documentation diff --git a/docs/pyerrors/input/json.html b/docs/pyerrors/input/json.html index 2b3cbbb9..cd81cecd 100644 --- a/docs/pyerrors/input/json.html +++ b/docs/pyerrors/input/json.html @@ -3,7 +3,7 @@ - + pyerrors.input.json API documentation diff --git a/docs/pyerrors/input/misc.html b/docs/pyerrors/input/misc.html index 4959ea11..2594fac9 100644 --- a/docs/pyerrors/input/misc.html +++ b/docs/pyerrors/input/misc.html @@ -3,7 +3,7 @@ - + pyerrors.input.misc API documentation diff --git a/docs/pyerrors/input/openQCD.html b/docs/pyerrors/input/openQCD.html index 3aa692dd..88838ece 100644 --- a/docs/pyerrors/input/openQCD.html +++ b/docs/pyerrors/input/openQCD.html @@ -3,7 +3,7 @@ - + pyerrors.input.openQCD API documentation diff --git a/docs/pyerrors/input/sfcf.html b/docs/pyerrors/input/sfcf.html index 40f19de8..bb80fc6c 100644 --- a/docs/pyerrors/input/sfcf.html +++ b/docs/pyerrors/input/sfcf.html @@ -3,7 +3,7 @@ - + pyerrors.input.sfcf API documentation diff --git a/docs/pyerrors/input/utils.html b/docs/pyerrors/input/utils.html index 7ae86319..ac3965c7 100644 --- a/docs/pyerrors/input/utils.html +++ b/docs/pyerrors/input/utils.html @@ -3,7 +3,7 @@ - + pyerrors.input.utils API documentation diff --git a/docs/pyerrors/linalg.html b/docs/pyerrors/linalg.html index 58c8b822..18efa537 100644 --- a/docs/pyerrors/linalg.html +++ b/docs/pyerrors/linalg.html @@ -3,7 +3,7 @@ - + pyerrors.linalg API documentation diff --git a/docs/pyerrors/misc.html b/docs/pyerrors/misc.html index 60b5da6e..cfcddf50 100644 --- a/docs/pyerrors/misc.html +++ b/docs/pyerrors/misc.html @@ -3,7 +3,7 @@ - + pyerrors.misc API documentation diff --git a/docs/pyerrors/mpm.html b/docs/pyerrors/mpm.html index b4847ba8..cde55b24 100644 --- a/docs/pyerrors/mpm.html +++ b/docs/pyerrors/mpm.html @@ -3,7 +3,7 @@ - + pyerrors.mpm API documentation diff --git a/docs/pyerrors/obs.html b/docs/pyerrors/obs.html index a71809e4..2c3935db 100644 --- a/docs/pyerrors/obs.html +++ b/docs/pyerrors/obs.html @@ -3,7 +3,7 @@ - + pyerrors.obs API documentation @@ -893,7 +893,7 @@ ensemble to the error and returns a dictionary containing the fractions.""" if not hasattr(self, 'e_dvalue'): raise Exception('Run the gamma method first.') - if self._dvalue == 0.0: + if np.isclose(0.0, self._dvalue, atol=1e-15): raise Exception('Error is 0.0') labels = self.e_names sizes = [self.e_dvalue[name] ** 2 for name in labels] / self._dvalue ** 2 @@ -1040,6 +1040,9 @@ def __rsub__(self, y): return -1 * (self - y) + def __pos__(self): + return self + def __neg__(self): return -1 * self @@ -1222,8 +1225,11 @@ def __abs__(self): return np.sqrt(self.real**2 + self.imag**2) - def __neg__(other): - return -1 * other + def __pos__(self): + return self + + def __neg__(self): + return -1 * self def __eq__(self, other): return self.real == other.real and self.imag == other.imag @@ -2460,7 +2466,7 @@ ensemble to the error and returns a dictionary containing the fractions.""" if not hasattr(self, 'e_dvalue'): raise Exception('Run the gamma method first.') - if self._dvalue == 0.0: + if np.isclose(0.0, self._dvalue, atol=1e-15): raise Exception('Error is 0.0') labels = self.e_names sizes = [self.e_dvalue[name] ** 2 for name in labels] / self._dvalue ** 2 @@ -2607,6 +2613,9 @@ def __rsub__(self, y): return -1 * (self - y) + def __pos__(self): + return self + def __neg__(self): return -1 * self @@ -3655,7 +3664,7 @@ show expanded history for irregular Monte Carlo chains (default: True). ensemble to the error and returns a dictionary containing the fractions.""" if not hasattr(self, 'e_dvalue'): raise Exception('Run the gamma method first.') - if self._dvalue == 0.0: + if np.isclose(0.0, self._dvalue, atol=1e-15): raise Exception('Error is 0.0') labels = self.e_names sizes = [self.e_dvalue[name] ** 2 for name in labels] / self._dvalue ** 2 @@ -4323,8 +4332,11 @@ should agree with samples from a full jackknife analysis up to O(1/N). def __abs__(self): return np.sqrt(self.real**2 + self.imag**2) - def __neg__(other): - return -1 * other + def __pos__(self): + return self + + def __neg__(self): + return -1 * self def __eq__(self, other): return self.real == other.real and self.imag == other.imag diff --git a/docs/pyerrors/roots.html b/docs/pyerrors/roots.html index b8e71602..922638a1 100644 --- a/docs/pyerrors/roots.html +++ b/docs/pyerrors/roots.html @@ -3,7 +3,7 @@ - + pyerrors.roots API documentation diff --git a/docs/pyerrors/version.html b/docs/pyerrors/version.html index 013ab0c3..7f07b7eb 100644 --- a/docs/pyerrors/version.html +++ b/docs/pyerrors/version.html @@ -3,7 +3,7 @@ - + pyerrors.version API documentation