-
Notifications
You must be signed in to change notification settings - Fork 41
Closed
Description
Hi,
I'm facing an issue with writting dataset58 double precision, real, uneven spaced:
The current implentation lead to an error when rem_vals > 0
if rem_vals > 0:
fmt = ['%13.5e', '%20.11e', '%13.5e', '%20.11e']
fh.write((''.join(fmt[rem_vals]) + '\n') % tuple(data[4 * n4_blocks:]))
It is failing since in fmt[rem_vals] is getting only the nth value in the format list, while it should be a slice until the nth value. I think the implementation should be (tested on my side)
if rem_vals > 0:
fmt = ['%13.5e', '%20.11e', '%13.5e', '%20.11e']
fh.write((''.join(fmt[:rem_vals]) + '\n') % tuple(data[4 * n4_blocks:]))
best regards,
Cédric
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels