From a0c8b20c6959be5cf12d2a717945fdbd9c4624de Mon Sep 17 00:00:00 2001 From: "Hugo U. R. Strand" Date: Tue, 31 Oct 2023 08:49:38 +0100 Subject: [PATCH] [py] ParameterCollections h5 serialization bugfix --- python/triqs_tprf/ParameterCollection.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/triqs_tprf/ParameterCollection.py b/python/triqs_tprf/ParameterCollection.py index e75085feb..5969b7a84 100644 --- a/python/triqs_tprf/ParameterCollection.py +++ b/python/triqs_tprf/ParameterCollection.py @@ -221,6 +221,8 @@ def getattr_from_objects(self, attr): return np.array([getattr(o, attr, None) for o in self.objects ]) def __getattr__(self, attr): + if attr not in self.objects[0].keys(): + raise AttributeError return self.getattr_from_objects(attr) def __reduce_to_dict__(self):