This is a pre-release version (latest).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy latest / scipy / constants / _codata / find

function

scipy.constants._codata:find

source: build-install/usr/lib/python3.14/site-packages/scipy/constants/_codata.py:2207

Signature

def find(sub: str | None = None, disp: bool = False) → Any

Summary

Return list of physical_constant keys containing a given string.

Parameters

sub : str

Sub-string to search keys for. By default, return all keys.

disp : bool

If True, print the keys that are found and return None. Otherwise, return the list of keys without printing anything.

Returns

keys : list or None

If disp is False, the list of keys is returned. Otherwise, None is returned.

Notes

Array API Standard Support

find is not in-scope for support of Python Array API Standard compatible backends other than NumPy.

See dev-arrayapi for more information.

Examples

from scipy.constants import find, physical_constants
✓
Which keys in the ``physical_constants`` dictionary contain 'boltzmann'?
find('boltzmann')
✗
['Boltzmann constant', 'Boltzmann constant in Hz/K', 'Boltzmann constant in eV/K', 'Boltzmann constant in inverse meter per kelvin', 'Stefan-Boltzmann constant']
Get the constant called 'Boltzmann constant in Hz/K':
physical_constants['Boltzmann constant in Hz/K']
✗
(20836619123.327576, 'Hz K^-1', 0.0)
Find constants with 'radius' in the key:
find('radius')
physical_constants['classical electron radius']
✗
(2.8179403205e-15, 'm', 1.3e-24)

Aliases

  • scipy.constants.find

Referenced by