question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BUG: Missing Constant in Documentation

See original GitHub issue

Describe your issue.

The table in the documentation that lists constants is missing the characteristic impedance of a vacuum. This is because the constant is not listed directly in the CODATA 2018 table (this occured in #10920); however, it has been maintained in scipy since January 2020 (see #11343). Because the code that handles the documentation of constants defines obsolete values as those not in the CODATA 2018 table, the constant isn’t included in the documentation. I’m a little out of my depth of expertise here, but I’m not sure that the characteristic impedance of a vacuum should be counted as an obsolete constant. I’m not really sure why it’s not included in the CODATA 2018 table, despite the fact that it is still listed on NIST’s website as a fundamental constant. Is it fair to say that this should not be included as an obsolete constant? I’d love to hear from anybody who knows more about this subject and its nuances, thanks!

Reproducing Code Example

>>> from scipy import constants
>>> constants.physical_constants['characteristic impedance of vacuum']
(376.73031366686166, 'ohm', 5.61366546036269e-08)
>>> 'characteristic impedance of vacuum' in constants._obsolete_constants
True

Error message

N/A

SciPy/NumPy/Python version information

1.7.3 1.21.5 sys.version_info(major=3, minor=7, micro=11, releaselevel=‘final’, serial=0)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jakobjakobson13commented, Apr 29, 2022

Given that the redefinition using the exact_values approach was added as a stopgap, should that now be removed as well?

You are right.

1reaction
jakobjakobson13commented, Apr 29, 2022

In the two articles (https://physics.nist.gov/cuu/pdf/JPCRD2018CODATA.pdf, https://physics.nist.gov/cuu/pdf/RevModPhys.93.025010.pdf) listed by NIST on the 2018 adjustment the characteristic impedance of a vacuum is listed as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

84675 – Add missing BASIC function and constant ...
Some Visual Basic-like functions and constants currently implemented in LibreOffice Basic are currently not documented in the LibreOffice ...
Read more >
[Libreoffice-bugs] [Bug 84675] Add missing BASIC function and ...
[Libreoffice-bugs] [Bug 84675] Add missing BASIC function and constant documentation. b***@bugs.documentfoundation.org. 7 years ago.
Read more >
SyntaxError: missing = in const declaration - JavaScript | MDN
A constant is a value that cannot be altered by the program during normal execution. It cannot change through re-assignment, and it can't...
Read more >
Bug #11860 :: missing constant in PHP_Archive_Exception ...
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of...
Read more >
golint seems unable to recognise constants which are typed ...
I've noticed that golint only reports the first error and does not report all of them in the documentation category. From https://blog.golang.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found