Curriculum
Course: SCIPY
Login
Text lesson

Temperature:

Return the equivalent value of the specified unit in Kelvin (e.g., “zero_Celsius” returns 273.15).

Example

from scipy import constants

print(constants.zero_Celsius)      #273.15
print(constants.degree_Fahrenheit) #0.5555555555555556

Energy:

Return the corresponding value of the specified unit in joules (e.g., “calorie” returns 4.184).

Example

from scipy import constants

print(constants.eV)            #1.6021766208e-19
print(constants.electron_volt) #1.6021766208e-19
print(constants.calorie)       #4.184
print(constants.calorie_th)    #4.184
print(constants.calorie_IT)    #4.1868
print(constants.erg)           #1e-07
print(constants.Btu)           #1055.05585262
print(constants.Btu_IT)        #1055.05585262
print(constants.Btu_th)        #1054.3502644888888
print(constants.ton_TNT)       #4184000000.0

Power:

Return the equivalent value of the specified unit in watts (e.g., “horsepower” returns 745.6998715822701).

Example

from scipy import constants

print(constants.hp)         #745.6998715822701
print(constants.horsepower) #745.6998715822701

Force:

Return the corresponding value of the specified unit in newtons (e.g., “kilogram_force” returns 9.80665).

Example

from scipy import constants

print(constants.dyn)             #1e-05
print(constants.dyne)            #1e-05
print(constants.lbf)             #4.4482216152605
print(constants.pound_force)     #4.4482216152605
print(constants.kgf)             #9.80665
print(constants.kilogram_force)  #9.80665