SciPy Utilities

Learn about sparse matrix operations, linear and spline interpolation, and curve fitting in SciPy.

Sparse matrices

A sparse matrix is a matrix in which most of the elements are zero. By contrast, if most of the elements are nonzero, then the matrix is considered dense. The number of zero-valued elements divided by the total number of elements—for example, mnm*n for an m×nm × n matrix—is called the sparsity of the matrix.

Sparse matrices are incredibly useful in scientific computing, where they can provide significant computational and storage efficiencies. Many large-scale systems give rise to mathematical models that operate with sparse ...