From the course: Python Functions for Data Science

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Linear algebra operations with SciPy

Linear algebra operations with SciPy - Python Tutorial

From the course: Python Functions for Data Science

Start my 1-month free trial

Linear algebra operations with SciPy

- The scipy library is foundational for scientific computing and it's an important toolbox for data scientists. The scipy library is composed of task-specific sub-modules built on top of the numpy library. A scipy sub-module that will come in handy when working with data is the one that supports linear algebra operations. To illustrate how to use the sub-module, I'll be walking through a couple of examples. First, I'll input the numpy library and give it the alias np like this. Then I'll input the linear algebra sub-module from the scipy library like this. Now I'll go ahead and create a numpy array that represents a 2 by 2 matrix and save it in a variable. To compute the determinate of this matrix, i can use the det function from scipy then your algebra module which takes in a square matrix and returns its determinant. Note that a square matrix is a matrix whose number of rows is equal to…

Contents