Skip to content

Trailing zero #178

Answered by GraemeWatt
marrbnl asked this question in Q&A
Aug 25, 2021 · 2 comments · 8 replies
Discussion options

You must be logged in to vote

I looked at the provided example. The numpy.loadtxt function uses a float data-type by default. You can instead load the data as strings to preserve the original precision: data = np.loadtxt(fname, dtype=str). I checked that the YAML file written by the example script with this modification then preserves the trailing zeros of the original text file.

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
1 reply
@marrbnl
Comment options

Comment options

You must be logged in to vote
7 replies
@marrbnl
Comment options

@GraemeWatt
Comment options

@marrbnl
Comment options

@clelange
Comment options

@marrbnl
Comment options

Answer selected by clelange
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants