accumulate comments

This commit is contained in:
Philip Eisenlohr 2022-05-17 16:12:00 -04:00
parent 12cd19554f
commit 8442f0cdd3
1 changed files with 2 additions and 2 deletions

View File

@ -468,13 +468,13 @@ class VTK:
_add_array(dup.vtk_data, _add_array(dup.vtk_data,
label, label,
np.where(data.mask,data.fill_value,data) if isinstance(data,np.ma.MaskedArray) else data) np.where(data.mask,data.fill_value,data) if isinstance(data,np.ma.MaskedArray) else data)
if info is not None: dup.comments = f'{label}: {info}' if info is not None: dup.comments += f'{label}: {info}'
else: else:
raise ValueError('no label defined for data') raise ValueError('no label defined for data')
elif isinstance(table,Table): elif isinstance(table,Table):
for l in table.labels: for l in table.labels:
_add_array(dup.vtk_data,l,table.get(l)) _add_array(dup.vtk_data,l,table.get(l))
if info is not None: dup.comments = f'{l}: {info}' if info is not None: dup.comments += f'{l}: {info}'
else: else:
raise TypeError raise TypeError