[Scipy-tickets] [SciPy] #858: faster sparse matrices

SciPy scipy-tickets@scipy....
Sat Jan 31 13:33:50 CST 2009

#858: faster sparse matrices
 Reporter:  sascha.baumanns          |        Owner:  wnbell  
     Type:  task                     |       Status:  assigned
 Priority:  normal                   |    Milestone:  0.8.0   
Component:  scipy.sparse             |      Version:  devel   
 Severity:  normal                   |   Resolution:          
 Keywords:  cython, sparse, speedup  |  
Comment (by sascha.baumanns):

 Hello wnbell.

 Thanks a lot for your quick help!

 The pure-Python implementation of the lil_matrix explain the slowness.

 Sorry, i mix addition with mulitplication.
 The addition is faster then in matlab, but the multiplication was slower.

 You are right the sparse.bmat() is not terribly slow.

 The Python-script for testing:

 from scipy.sparse import bmat

 def block(sp):
    B=bmat([[sp, None],[None, sp]], format='coo')
    return B

 The MATLAB-script for testing:

 function B=block(sp)
     B=[sp sparse(n,n);
        sparse(n,n) sp];

 In both cases: sp=diag([-1 2 -1])

 Thanks for your changes! I try it on Monday.


Ticket URL: <http://scipy.org/scipy/scipy/ticket/858#comment:5>
SciPy <http://www.scipy.org/>
SciPy is open-source software for mathematics, science, and engineering.

More information about the Scipy-tickets mailing list