Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In metadata, reformat params_str #178

Open
capelastegui opened this issue May 6, 2020 · 1 comment
Open

In metadata, reformat params_str #178

capelastegui opened this issue May 6, 2020 · 1 comment

Comments

@capelastegui
Copy link
Contributor

column params_str in the forecast metadata table currently has the following format:

[-4.3e+02 -2.4e-04  5.3e+02]

We could make it more useful by adding commas:

[-4.3e+02 -2.4e-04  5.3e+02]

, as this version is something that we can paste on python code to get a real list.

@capelastegui
Copy link
Contributor Author

We are using built-in numpy array formatting, which doesn't quite work as we want:

a_tmp = np.array([1.00000001,2,0.00000003])
print(a_tmp)
print(np.array_repr(a_tmp, precision=3))
print(np.array_str(a_tmp, precision=3))

output:

[1.00000001e+00 2.00000000e+00 3.00000000e-08]
array([1.e+00, 2.e+00, 3.e-08])
[1.e+00 2.e+00 3.e-08]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant