[Numpy-discussion] Tuning sparse stuff in NumPy

David Koch ogdude@googlemail....
Mon Mar 26 12:02:11 CDT 2007


Ok,

I did and the results are:
csc * csc: 372.601957083
csc * csc: 3.90811300278
csr * csc: 15.3202679157
csr * csr:  3.84498214722

Mhm, quite insightful. Note, that in an operation X.transpose() * X, where X
is csc_matrix, then X.tranpose() is automatically cast to csr_matrix. A
re-cast to csc make the whole operation faster. It's still about 1000 times
slower than Matlab but 4 times faster than before.


Note, that <sp_mat>.transpose already switches the matrix

On 3/26/07, Robert Cimrman <cimrman3@ntc.zcu.cz> wrote:
>
> David Koch wrote:
> > On 3/26/07, Robert Cimrman <cimrman3@ntc.zcu.cz> wrote:
> >>
> >> Could you be more specific on which type of the sparse matrix storage
> >> did you use?
> >
> >
> >
> > Hi Robert,
> >
> > I used csc_matrix.
>
> OK, good. Would you mind measuring csc * csr, csc * csc, csr * csc and
> csr * csr? I am curious how this will compare.
>
> r.
>
> ps: this thread might be more appropriate for scipy-user or scipy-dev...
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20070326/48f3b80d/attachment.html 


More information about the Numpy-discussion mailing list