Skip to content

Commit

Permalink
[py] ParameterCollections h5 serialization bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoStrand committed Oct 31, 2023
1 parent 3fe8fe6 commit a0c8b20
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/triqs_tprf/ParameterCollection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit a0c8b20

Please sign in to comment.