[SciPy-user] Feature request for sparse matrices

afraser afraser at lanl.gov
Mon Jun 26 15:47:39 CDT 2006


In my application there is a particular sparse matrix multiply that
often causes the sparse matrix package to "Resize" the storage for the
result.  However, I can make a very good estimate of the size required
on the basis of the two input matrices.  I have modified my local
version of the multiplication method matmat() to accept a key word
argument that specifies the size, ie:


    def matmat(self, other, nnzc=None):
        .
        .
        .
            if nnzc == None:
                nnzc = 2*max(ptra[-1], ptrb[-1])

The modification doubles the speed of my code.  How should I
request/suggest that change for scipy?

-- 
Andy Fraser



More information about the SciPy-user mailing list