Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit 29474cd

Browse files
authored
Merge pull request #53 from verlivkra/verlivkra-subdyn-input-file
It is now possible to write an empty subdyn Member Output List withou…
2 parents 56f4a44 + 717af47 commit 29474cd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pyFAST/input_output/fast_input_file.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -764,8 +764,10 @@ def mat_tostring(M,fmt='24.16e'):
764764
elif d['tabType']==TABTYPE_NUM_SUBDYNOUT:
765765
data = d['value']
766766
s+='{}\n'.format(' '.join(['{:15s}'.format(s) for s in d['tabColumnNames']]))
767-
s+='{}\n'.format(' '.join(['{:15s}'.format(s) for s in d['tabUnits']]))
768-
s+='\n'.join('\t'.join('{:15.0f}'.format(x) for x in y) for y in data)
767+
s+='{}'.format(' '.join(['{:15s}'.format(s) for s in d['tabUnits']]))
768+
if np.size(d['value'],0) > 0 :
769+
s+='\n'
770+
s+='\n'.join('\t'.join('{:15.0f}'.format(x) for x in y) for y in data)
769771
else:
770772
raise Exception('Unknown table type for variable {}'.format(d))
771773
if i<len(self.data)-1:

0 commit comments

Comments
 (0)