-
Notifications
You must be signed in to change notification settings - Fork 89
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
data like 1e-3 loaded from yaml is with type str #46
Comments
This is because of how PyYAML loads the file. Yacs only has visibility to the dictionary generated by PyYAML, at which point "1e-3" has already been decoded as a string. The way to fix your issue is to write "1.0e3" instead; then PyYAML will decode it as a float! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It seems the decode is not performed when the value is loaded from file (such as yaml), so that data like 1e-3 will be recognized as str instead of float.
The text was updated successfully, but these errors were encountered: