[SciPy-user] Sparse int and float performance

Dorian wizzard028wise at gmail.com
Thu Nov 20 14:23:51 EST 2008


Could you increase the font size of your post.
Cheers

2008/11/20 Dinesh B Vadhia <dineshbvadhia at hotmail.com>

>  A question for Nathan Bell:
>
> I use Scipy Sparse to solve y = Ax, where A is a MxN "binary" sparse matrix
> and x is a dense floating point vector, with M and N each >100,000
>
> I use the following to create the CSR matrix:
>
> row = numpy.empty(nnz, dtype='intc')
> column = numpy.empty(nnz, dtype='intc')
> <read i,j into row and column>
> data = numpy.ones(nnz, dtype='intc')
> A = sparse.csr_matrix((data, (row, column)), shape=(I,J))
>
> Now, suppose that we change data to the float datatype ie.
>
> data = numpy.ones(nnz, dtype=float)
>
> I know I can test this but from the perspective of the scipy code, how
> would this impact the performance of the calculation of y = Ax ie.
>
> - Same as data with dtype='intc'
> - Slower than data with dtype = 'intc'
> - Faster than data with dtype = 'intc'
>
> Thanks!
>
> Dinesh
>
>
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20081120/9d457c50/attachment.html>


More information about the SciPy-User mailing list