-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
MAINT: constants: reorganize codata constants data #20055
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
base: main
Are you sure you want to change the base?
MAINT: constants: reorganize codata constants data #20055
Conversation
Could anyone give me a hint why the file |
Try adding it to the list in |
relevant CI error seems to be
|
For the parsing of the 2002 file I came up with the following parsing function but it contains loads of regular expressions:
I have to look at it again another time and perhaps it´s way to complicated. |
This sounds like a good idea. While we're at it - what do you think about saving the data into a single We're doing this already in |
I finally got the time to look into it again but the problem seems more complicated than I inititally thought: scipy/scipy/special/utils/makenpz.py Line 82 in 1687c1c
So if you want np.loadtxt to read a file with a header like
you have to consider various things: The first lines have to be skipped till you are at the data and you´ll need converters for the quantities and the unit as they are strings and you´ll need converters for the value and uncertainty as the scientific notation with the spaces are a mixture of characters and digits. Additionally, the formatting of the codata files changed over the years. So long story short: For the moment, it seems like a bad trade to put much more effort into it. Splitting out the "codata raw files" from the main file seems quite easy but creating npz files needs more work than just using |
I´ll try to break down my draft #17577 into smaller bits, starting by this pull request.
Reference issue
gh-17577
What does this implement/fix?
It slims down the
_codata.py
file by moving the constants data in their own file. This makes its editing easier.Additional information
This pull request should not break anything as the changes are only internal.