[SciPy-dev] Segfault

Robert Kern robert.kern at gmail.com
Thu Apr 27 11:23:12 CDT 2006

Nils Wagner wrote:

> Reading finished
> Traceback (most recent call last):
>   File "matrixstructure.py", line 8, in ?
>     K = K.todense()
>   File "/usr/lib64/python2.4/site-packages/scipy/sparse/sparse.py", line
> 356, in todense
>     return asmatrix(self.toarray())
>   File "/usr/lib64/python2.4/site-packages/scipy/sparse/sparse.py", line
> 360, in toarray
>     return csc.toarray()
>   File "/usr/lib64/python2.4/site-packages/scipy/sparse/sparse.py", line
> 969, in toarray
>     return func(self.shape[0], self.data, self.rowind, self.indptr)
> MemoryError

Notabug. The array is simply too large to be represented as a dense array. You
need to either get more memory, or write a procedure to plot the sparsity
pattern without creating the dense version of the array. Good luck.

Robert Kern
robert.kern at gmail.com

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco

More information about the Scipy-dev mailing list