Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/scipy/constants/constants.py: 70%

10 statements  

« prev     ^ index     » next       coverage.py v7.3.2, created at 2023-12-12 06:31 +0000

1# This file is not meant for public use and will be removed in SciPy v2.0.0. 

2# Use the `scipy.constants` namespace for importing the functions 

3# included below. 

4 

5import warnings 

6from . import _constants 

7 

8 

9__all__ = [ # noqa: F822 

10 'Avogadro', 'Boltzmann', 'Btu', 'Btu_IT', 'Btu_th', 'G', 

11 'Julian_year', 'N_A', 'Planck', 'R', 'Rydberg', 

12 'Stefan_Boltzmann', 'Wien', 'acre', 'alpha', 

13 'angstrom', 'arcmin', 'arcminute', 'arcsec', 

14 'arcsecond', 'astronomical_unit', 'atm', 

15 'atmosphere', 'atomic_mass', 'atto', 'au', 'bar', 

16 'barrel', 'bbl', 'blob', 'c', 'calorie', 

17 'calorie_IT', 'calorie_th', 'carat', 'centi', 

18 'convert_temperature', 'day', 'deci', 'degree', 

19 'degree_Fahrenheit', 'deka', 'dyn', 'dyne', 'e', 

20 'eV', 'electron_mass', 'electron_volt', 

21 'elementary_charge', 'epsilon_0', 'erg', 

22 'exa', 'exbi', 'femto', 'fermi', 'fine_structure', 

23 'fluid_ounce', 'fluid_ounce_US', 'fluid_ounce_imp', 

24 'foot', 'g', 'gallon', 'gallon_US', 'gallon_imp', 

25 'gas_constant', 'gibi', 'giga', 'golden', 'golden_ratio', 

26 'grain', 'gram', 'gravitational_constant', 'h', 'hbar', 

27 'hectare', 'hecto', 'horsepower', 'hour', 'hp', 

28 'inch', 'k', 'kgf', 'kibi', 'kilo', 'kilogram_force', 

29 'kmh', 'knot', 'lambda2nu', 'lb', 'lbf', 

30 'light_year', 'liter', 'litre', 'long_ton', 'm_e', 

31 'm_n', 'm_p', 'm_u', 'mach', 'mebi', 'mega', 

32 'metric_ton', 'micro', 'micron', 'mil', 'mile', 

33 'milli', 'minute', 'mmHg', 'mph', 'mu_0', 'nano', 

34 'nautical_mile', 'neutron_mass', 'nu2lambda', 

35 'ounce', 'oz', 'parsec', 'pebi', 'peta', 

36 'pi', 'pico', 'point', 'pound', 'pound_force', 

37 'proton_mass', 'psi', 'pt', 'short_ton', 

38 'sigma', 'slinch', 'slug', 'speed_of_light', 

39 'speed_of_sound', 'stone', 'survey_foot', 

40 'survey_mile', 'tebi', 'tera', 'ton_TNT', 

41 'torr', 'troy_ounce', 'troy_pound', 'u', 

42 'week', 'yard', 'year', 'yobi', 'yocto', 

43 'yotta', 'zebi', 'zepto', 'zero_Celsius', 'zetta' 

44] 

45 

46 

47def __dir__(): 

48 return __all__ 

49 

50 

51def __getattr__(name): 

52 if name not in __all__: 

53 raise AttributeError( 

54 "scipy.constants.constants is deprecated and has no attribute " 

55 f"{name}. Try looking in scipy.constants instead.") 

56 

57 warnings.warn(f"Please use `{name}` from the `scipy.constants` namespace, " 

58 "the `scipy.constants.constants` namespace is deprecated.", 

59 category=DeprecationWarning, stacklevel=2) 

60 

61 return getattr(_constants, name)