[SciPy-User] scipy sparse limits

Pauli Virtanen pav@iki...
Mon Mar 12 12:28:53 CDT 2012

12.03.2012 17:48, Eric kirjoitti:
> n=10**5, x=sp.rand(n,n,.001) gets 
> "ValueError: Trying to generate a random sparse matrix such 
> as the product of dimensions is greater than 
> 2147483647 - this is not supported on this machine"
> Does anyone know why limit is there and if I can avoid it? 

The limit seems to be only in the rand() routine --- you can create
larger random matrices otherwise.

The limit probably shouldn't be there --- this is probably a bug. As a
workaround, you can copy and paste the rand() routine to your own code
and remove the size check:


More information about the SciPy-User mailing list