Since SciPy is geared towards scientific applications, it offers numerous built-in scientific constants that can be useful when working in data science.
PI is an example of a mathematical constant. |
Display the value of the PI constant:
from scipy import constants print(constants.pi) |
You can view a list of all units in the constants module by using the dir() function.
Display all available constants:
from scipy import constants print(dir(constants)) |
The units are organized into the following categories: