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
ENH: Add units to scipy.constants description #17571
Comments
Hi @bmoneke, thank you for reporting. Units are in the doc here https://docs.scipy.org/doc/scipy/reference/constants.html Is there something missing? (scroll down). Otherwise yes, everything is in SI and yes maybe we can add a note at the beginning to make it clear. Would you like to do it? |
Below are the constants with units, but the "base constants" are not labelled. I can do it. I'll add a general note at the beginning. What do you think about writing to every constant (in that list) the unit as well? Just as a reminder for the readers. |
Spelling out all constants, as done for the rest, is a good idea 👍 (If you are looking into making changes to this doc. There is a stalled PR that wanted to change the organisation etc #11682. If you are interested, it would be great to pick up 😃) Thanks! |
@bmoneke maybe hold on a bit here. As you can see in #11682 some work might start again. In any case, thank you for raising this as it helped move things! |
I saw that other point, when I searched for open/closed issues before opening my own one. Thanks for your fast responses. |
@bmoneke : Could you answer me two questions for clarification?
The base constants are included in the CODATA constants provided by scipy but the base constants are not emphasized explicitly. So you are right, they can be easily overlooked. |
@jakobjakobson13 , thanks for the question. I just want to know the units next to the name. They don't have to be emphasized. Here my problem: I imported the package and found I cannot use a constant without knowing, that the units fit. Maybe a (bold) remark, that these base constants are the numbers in the SI system might be enough and a small change. However, being explicit about the units is better, I think. I hope I succeeded in showing my problem. |
Congratulations, you picked a nice corner case here :) scipy/scipy/constants/__init__.py Line 325 in 5da8a3a
Among these constants is c or the speed of light in vacuum .scipy/scipy/constants/_constants.py Line 109 in 5da8a3a
The problem now is however that _cd only imports the value but not the unit.scipy/scipy/constants/_constants.py Line 15 in 5da8a3a
scipy/scipy/constants/_codata.py Line 1575 in 5da8a3a
If you had imported the constant via |
Thanks for your explanation. Maybe you can use my experience during your adjustments, in order to make it more understandable, how to use it. |
As noted in issue scipy#17571, while most constants have units indicated, the "Physical constants" at the top of the documentation do not. I copied the unit symbols from _codata.py. This should close the issue. [skip actions] [skip cirrus]
As noted in issue scipy#17571, while most constants have units indicated, the "Physical constants" at the top of the documentation do not. I copied the unit symbols from _codata.py. This should close the issue. [skip actions] [skip cirrus]
As noted in issue scipy#17571, while most constants have units indicated, the "Physical constants" at the top of the documentation do not. I copied the unit symbols from _codata.py. This should close the issue. [skip actions] [skip cirrus]
Is your feature request related to a problem? Please describe.
I could not find out, in which units the constants of
scipy.constants
are.I guess they are in SI notation, but I'd like to be sure, before I use these numbers.
Describe the solution you'd like.
Could you add either a general note, that all the constants are given in base units of the SI system, or add to every constant the relavant units (e.g. speed of light in vacuum in meters/second).
Describe alternatives you've considered.
No response
Additional context (e.g. screenshots, GIFs)
No response
The text was updated successfully, but these errors were encountered: