Member-only story
Hi everyone, welcome back. SciPy is a library for the Python programming language and is commonly used for data science or statistical purposes. SciPy is short for “Scientific Python” and it uses NumPy underneath to perform some of it’s functionality. More about NumPy can be read here. SciPy provides additional functionality on top of NumPy to perform tasks related to statistics and optimization.
Installation
In order to work with SciPy, we will need to have Python and PIP installed onto our machines. Python can be downloaded and installed here and PIP can be downloaded and installed here. Once we have both Python and PIP installed, we can then install SciPy through the command line. Open up a command prompt or terminal and enter:
pip install scipy
Alternatively, SciPy can be downloaded through a Python distribution such as Anaconda or Spyder.
Importing
Now we want to import SciPy into our project to use. We can do this the same way we handle other imports by adding this line in our Python file:
import scipy
We can also import individual modules of SciPy into our project, for example if we only want to import the constants module we can add this line into our Python file: