From 02da9d4cada87dc416792646c0f9a004a63a7b0b Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Wed, 29 Sep 2021 15:07:35 +0100 Subject: [PATCH] CHANGELOG updated, style improvements --- CHANGELOG.md | 7 +++++++ pyerrors/input/input.py | 2 +- pyerrors/pyerrors.py | 18 +++++++++--------- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b1c17ea..06a291a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. +## [1.1.0] - 2021-09-29 +### Added +- Corr class added +- roots module added which can find the roots of a function that depends on Monte Carlo data via pyerrors Obs +- input/hadrons module added which can read hdf5 files written by [Hadrons](https://github.com/aportelli/Hadrons) +- read_rwms can now read reweighting factors in the format used by openQCD-2.0 + ## [1.0.1] - 2020-11-03 ### Fixed - Bug in pyerrors.covariance fixed that appeared when working with several diff --git a/pyerrors/input/input.py b/pyerrors/input/input.py index 6b1d3e43..98d57175 100644 --- a/pyerrors/input/input.py +++ b/pyerrors/input/input.py @@ -125,7 +125,7 @@ def read_sfcf_c(path, prefix, name, quarks='.*', noffset=0, wf=0, wf2=0, **kwarg b2b -- if True, read a time-dependent boundary-to-boundary correlation function names -- Alternative labeling for replicas/ensembles. Has to have the appropriate length """ - + if kwargs.get('im'): im = 1 part = 'imaginary' diff --git a/pyerrors/pyerrors.py b/pyerrors/pyerrors.py index 2a1cbf67..2cc7faed 100644 --- a/pyerrors/pyerrors.py +++ b/pyerrors/pyerrors.py @@ -501,8 +501,8 @@ class Obs: else: if isinstance(y, np.ndarray): return np.array([self + o for o in y]) - elif(y.__class__.__name__=="Corr"): - return NotImplemented + elif y.__class__.__name__ == 'Corr': + return NotImplemented else: return derived_observable(lambda x, **kwargs: x[0] + y, [self], man_grad=[1]) def __radd__(self, y): @@ -515,9 +515,9 @@ class Obs: else: if isinstance(y, np.ndarray): return np.array([self * o for o in y]) - elif(y.__class__.__name__=="Corr"): - return NotImplemented - + elif y.__class__.__name__ == 'Corr': + return NotImplemented + else: return derived_observable(lambda x, **kwargs: x[0] * y, [self], man_grad=[y]) @@ -531,9 +531,9 @@ class Obs: else: if isinstance(y, np.ndarray): return np.array([self - o for o in y]) - - elif(y.__class__.__name__=="Corr"): - return NotImplemented + + elif y.__class__.__name__ == 'Corr': + return NotImplemented else: return derived_observable(lambda x, **kwargs: x[0] - y, [self], man_grad=[1]) @@ -554,7 +554,7 @@ class Obs: if isinstance(y, np.ndarray): return np.array([self / o for o in y]) - elif(y.__class__.__name__=="Corr"): + elif y.__class__.__name__ == 'Corr': return NotImplemented else: