Contents:
What is SciPy?
SciPy is an open source python library used for technical computing and scientific computing.
SciPy contains multiple modules for linear algebra, integration, optimization, interpolation, special functions, image and signal processing, FFT, ODE solvers and etc. in engineering and scientific usage.
The NumPy library is a part of SciPy so basically SciPy provides us with multidimensional array for SciPy Datastructure
NumPy functions do provide us with the functionality of linear algebra, Fourier transforms and random number generation but this cannot be compared with the efficiency and generality of that of SciPy
Matlab may provide us with a better general interfaces and GUI for development than SciPy but the simplicity of python and large community support along with availability of numerous libraries dwarfs any advantages that it may have provided over SciPy.
Creating and Running your first SciPy Application
To create this application we first need to have python installed properly
To Install Python follow the bellow steps:
Steps:
- Visit https://www.python.org/downloads/ and download one of the following versions
-
I recommend going with Python 3.6.x version because 3.6.4 is the latest version which will most likely remain stable while 2.7.x is just released to support legacy code.
- While installing python you need to select this option as it is very important and will help us further as we progress
After this click Install Now and let the software install itself
- Now launch IDLE (Python 3.6 32 bit) which will be installed in your PC if everything is installed properly.
Now go to your Command Prompt window and type
python -m pip install numpy
python -m pip install scipy
This will install the panda library along with all its dependencies including NumPy and others.
Writing the actual code is as simple as just importing the necessary libraries like given below: –
from scipy.constants import pi
from math import pi
print(“sciPy – pi = %.16f”%pi)
Output:
sciPy – pi = 3.1415926535897931
16f indicates to print values after decimal point till sixteen digits while scipy contains numerous modules and expressions with values which can be seen above
Syllabus of Data Science training in Mumbai