[SciPy-User] Help: Multiplying two sparse matrices

Pranava Swaroop Madhyastha pranava at lsi.upc.edu
Tue Dec 25 14:02:22 EST 2012


On Tue, Dec 25, 2012 at 7:47 PM, Sebastian Berg
<sebastian at sipsolutions.net> wrote:
> This is because the result has too many nonzero elements. Scipy seems to
> use 32bit integers to save positions, and if you have too many non-zero
> elements, 32bit integers can overflow easily... Maybe if you feel like
> it, you could do a PR against scipy to change the error message with
> something understandable. I don't know if there is a great reason to use
> 32bit integers, though I guess it saves quite a bit of RAM if it is
> large enough.

I will look into it.


>
> However, if your result has so many nonzero elements, it seems sounds
> like the sparsity is probably so low, you probably could just as well
> use dense matrix (for the result, if possible), for this example.

I am actually constrained by RAM. Is there any other way around
without converting it to dense matrix?

>
> Regards,
>
> Sebastian



More information about the SciPy-User mailing list