[SciPy-user] Sparse v. dense matrix, SVD and LSI-like analysis

Pearu Peterson pearu at scipy.org
Wed Nov 17 14:31:11 CST 2004

On Wed, 17 Nov 2004, Nick Arnett wrote:

> Travis Oliphant wrote:
>> So, while the SVD is not an eigenvector decomposition it is related to one.
> Right... but I still don't understand the statement, "In any case, all of the 
> linalg.* functions only operate on dense arrays, not sparse matrices."

The statement means that the current *implementation* of linalg 
functions cannot operate on sparse matrices. Mathematically there is no 
difference between sparse or dense matrices. Sparse or dense are notions 
of matrix representation.

> Why would linalg.svd not operate on a sparse matrix?  I was working from the 
> example (below) from your Scipy tutorial, in fact.  Would the results not be 
> meaningful if the matrix is sparse?


Of course they are. Just with the current implementation one must 
transform a sparse matrix to a full matrix (that may contain lots of 
zeros) before applying linalg functions.

I believe that in future linalg functions will support sparse matrices as 


More information about the SciPy-user mailing list