Matlab is one of the popular software used in academics and labs to solve problems in mathematics, engineering and research domain. But matlab being a commercial software it is often not within reach of most of the students and developers. There are some open source and free equivalent of matlab software like octave, scilab and scipy. Here in this article we’re going to learn about scipy. Scipy library is written for python programming language which internally depends on numpy. With scipy you can do equal computations that you used to do with matlb or mathematica.
Scipy Download
You can download scipy from it’s official download section. Depending on your operating system, you have to download both numpy and scipy package for your version of python. If you’re using old version of python then it’s better to upgrade your python version to recent supported scipy version. Please keep in mind that you need numpy package along with scipy on your operating system.
Using Scipy
In order to work with scipy library you need to import it as subpackage. e.g. take a look at code below.
import scipy as sp
Now you need to use the respective calls to scipy library to do your tasks related to maths or any other specific task like charting etc.
Help in Scipy
help() method is not useful because it is specific to the python distribution and not to sub packages of python. In order to use scipy help documentation you need to use scipy.info(). In order to get information about any specific math function you need to call it in info(). e.g. scipy.info(“pi”).
You can read more numpy methods here, these are equivalent of matlab/octave. Another source is to get recently updated documentation.
Help and Resources for Scipy
You can get more help on scipy on official documentation page. This page is regularly updated with changes in numpy/scipy. Another place to learn more about scipy is cookbook. You’ll find sample code and usage of scipy in cookbook section.