Curriculum
Course: SCIPY
Login
Text lesson

Pressure:

Return the equivalent value of the specified unit in Pascals (e.g., “psi” returns 6894.757293168361).

Example

from scipy import constants

print(constants.atm)         #101325.0
print(constants.atmosphere)  #101325.0
print(constants.bar)         #100000.0
print(constants.torr)        #133.32236842105263
print(constants.mmHg)        #133.32236842105263
print(constants.psi)         #6894.757293168361

Area:

Return the corresponding value of the specified unit in square meters (e.g., “hectare” returns 10000.0).

Example

from scipy import constants

print(constants.hectare) #10000.0
print(constants.acre)    #4046.8564223999992

Volume:

Return the equivalent value of the specified unit in cubic meters (e.g., “liter” returns 0.001).

Example

from scipy import constants

print(constants.liter)            #0.001
print(constants.litre)            #0.001
print(constants.gallon)           #0.0037854117839999997
print(constants.gallon_US)        #0.0037854117839999997
print(constants.gallon_imp)       #0.00454609
print(constants.fluid_ounce)      #2.9573529562499998e-05
print(constants.fluid_ounce_US)   #2.9573529562499998e-05
print(constants.fluid_ounce_imp)  #2.84130625e-05
print(constants.barrel)           #0.15898729492799998
print(constants.bbl)              #0.15898729492799998

Speed:

Return the corresponding value of the specified unit in meters per second (e.g., “speed_of_sound” returns 340.5).

Example

from scipy import constants

print(constants.kmh)            #0.2777777777777778
print(constants.mph)            #0.44703999999999994
print(constants.mach)           #340.5
print(constants.speed_of_sound) #340.5
print(constants.knot)           #0.5144444444444445