SciPy Constants
Learn all about SciPy Constants in this comprehensive tutorial.
- •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.
Constant Units
A list of all units under the constants module can be seen using the dir() function.
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)
Binary Prefixes:
Return the specified unit in bytes (e.g. kibi returns 1024)
Mass:
Return the specified unit in kg (e.g. gram returns 0.001)
Angle:
Return the specified unit in radians (e.g. degree returns 0.017453292519943295)
Time:
Return the specified unit in seconds (e.g. hour returns 3600.0)
Length:
Return the specified unit in meters (e.g. nautical_mile returns 1852.0)
Pressure:
Return the specified unit in pascals (e.g. psi returns 6894.757293168361)
Area:
Return the specified unit in square meters(e.g. hectare returns 10000.0)
Volume:
Return the specified unit in cubic meters (e.g. liter returns 0.001)
Speed:
Return the specified unit in meters per second (e.g. speed_of_sound returns 340.5)
Temperature:
Return the specified unit in Kelvin (e.g. zero_Celsius returns 273.15)
Energy:
Return the specified unit in joules (e.g. calorie returns 4.184)
Power:
Return the specified unit in watts (e.g. horsepower returns 745.6998715822701)
Force:
Return the specified unit in newton (e.g. kilogram_force returns 9.80665)
Module quiz
2 questionsWhich of the following is true about SciPy Constants?
What is the most common pitfall when working with SciPy Constants?
Answer all questions to submit.