adapted to Table.add being out-of-place
This commit is contained in:
parent
7cbc69a4ca
commit
4208c4e713
|
@ -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
|
path = (os.path.join(*([prop,name]+([cat] if cat else [])+([item] if item else []))) if split else path)+tag
|
||||||
if split:
|
if split:
|
||||||
try:
|
try:
|
||||||
tbl[inc].add(path,data)
|
tbl[inc] = tbl[inc].add(path,data)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
tbl[inc] = Table(data.reshape(self.N_materialpoints,-1),{path:data.shape[1:]})
|
tbl[inc] = Table(data.reshape(self.N_materialpoints,-1),{path:data.shape[1:]})
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
tbl.add(path,data)
|
tbl = tbl.add(path,data)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
tbl = Table(data.reshape(self.N_materialpoints,-1),{path:data.shape[1:]})
|
tbl = Table(data.reshape(self.N_materialpoints,-1),{path:data.shape[1:]})
|
||||||
|
|
||||||
|
|
|
@ -379,6 +379,7 @@ class Table:
|
||||||
-------
|
-------
|
||||||
table : Table
|
table : Table
|
||||||
Joined table.
|
Joined table.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
if set(self.shapes) & set(other.shapes) or self.data.shape[0] != other.data.shape[0]:
|
if set(self.shapes) & set(other.shapes) or self.data.shape[0] != other.data.shape[0]:
|
||||||
raise KeyError('Dublicated keys or row count mismatch')
|
raise KeyError('Dublicated keys or row count mismatch')
|
||||||
|
|
Loading…
Reference in New Issue