From 4208c4e713234424cc47bc9163c6e155f4da55de Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Mon, 8 Mar 2021 11:03:18 -0500 Subject: [PATCH] adapted to Table.add being out-of-place --- python/damask/_result.py | 4 ++-- python/damask/_table.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/python/damask/_result.py b/python/damask/_result.py index 50e2aa720..56924c533 100644 --- a/python/damask/_result.py +++ b/python/damask/_result.py @@ -391,12 +391,12 @@ class Result: path = (os.path.join(*([prop,name]+([cat] if cat else [])+([item] if item else []))) if split else path)+tag if split: try: - tbl[inc].add(path,data) + tbl[inc] = tbl[inc].add(path,data) except KeyError: tbl[inc] = Table(data.reshape(self.N_materialpoints,-1),{path:data.shape[1:]}) else: try: - tbl.add(path,data) + tbl = tbl.add(path,data) except AttributeError: tbl = Table(data.reshape(self.N_materialpoints,-1),{path:data.shape[1:]}) diff --git a/python/damask/_table.py b/python/damask/_table.py index 5203b0b61..ee64ba017 100644 --- a/python/damask/_table.py +++ b/python/damask/_table.py @@ -379,6 +379,7 @@ class Table: ------- table : Table Joined table. + """ if set(self.shapes) & set(other.shapes) or self.data.shape[0] != other.data.shape[0]: raise KeyError('Dublicated keys or row count mismatch')