SciPy Tutorial · SciPy Tutorial

SciPy Constants

Learn all about SciPy Constants in this comprehensive tutorial.

5 min read advanced
  • As SciPy is more focused on scientific implementations, it provides many built-in scientific constants.
  • A list of all units under the constants module can be seen using the dir() function.
  • The units are placed under these categories:
  • Return the specified unit in **meter **(e.
  • Return the specified unit in **bytes **(e.
  • Return the specified unit in **kg **(e.
  • Return the specified unit in **radians **(e.
  • Return the specified unit in **seconds **(e.
  • Return the specified unit in **meters **(e.
  • Return the specified unit in **pascals **(e.
  • Return the specified unit in **square meters**(e.
  • Return the specified unit in **cubic meters **(e.
  • Return the specified unit in **meters per second **(e.
  • Return the specified unit in **Kelvin **(e.
  • Return the specified unit in **joules **(e.
  • Return the specified unit in **watts **(e.
  • Return the specified unit in **newton **(e.

Constants in SciPy

As SciPy is more focused on scientific implementations, it provides many built-in scientific constants.

These constants can be helpful when you are working with Data Science.

Note: PI is an example of a scientific constant.
python

Constant Units

A list of all units under the constants module can be seen using the dir() function.

python

Unit Categories

The units are placed under these categories:

  • Metric
  • Binary
  • Mass
  • Angle
  • Time
  • Length
  • Pressure
  • Volume
  • Speed
  • Temperature
  • Energy
  • Power
  • Force

Metric (SI) Prefixes:

Return the specified unit in meter (e.g. centi returns 0.01)

python

Binary Prefixes:

Return the specified unit in bytes (e.g. kibi returns 1024)

python

Mass:

Return the specified unit in kg (e.g. gram returns 0.001)

python

Angle:

Return the specified unit in radians (e.g. degree returns 0.017453292519943295)

python

Time:

Return the specified unit in seconds (e.g. hour returns 3600.0)

python

Length:

Return the specified unit in meters (e.g. nautical_mile returns 1852.0)

python

Pressure:

Return the specified unit in pascals (e.g. psi returns 6894.757293168361)

python

Area:

Return the specified unit in square meters(e.g. hectare returns 10000.0)

python

Volume:

Return the specified unit in cubic meters (e.g. liter returns 0.001)

python

Speed:

Return the specified unit in meters per second (e.g. speed_of_sound returns 340.5)

python

Temperature:

Return the specified unit in Kelvin (e.g. zero_Celsius returns 273.15)

python

Energy:

Return the specified unit in joules (e.g. calorie returns 4.184)

python

Power:

Return the specified unit in watts (e.g. horsepower returns 745.6998715822701)

python

Force:

Return the specified unit in newton (e.g. kilogram_force returns 9.80665)

python

Module quiz

2 questions
1

Which of the following is true about SciPy Constants?

2

What is the most common pitfall when working with SciPy Constants?

Answer all questions to submit.