[SciPy-user] Cannot handle sparse matrices, yet.

Nils Wagner nwagner at mecha.uni-stuttgart.de
Wed Oct 15 10:20:23 EDT 2003


Arnd Baecker schrieb:
> 
> Hi Nils,
> 
> > The matrix is complex. Is this a problem for loadmat ?
> 
> Looking at the source of  scipy.io.loadmat I'd _guess_
> that it does not support complex matrices.

Even, if I split the matrix into its real and imaginary part by

k0r = real(full(k00))
k0i = imag(full(k00))

and save them as two real matrices 

save -v4 -mat k0r
save -v4 -mat k0i

I obtain the same message as before


Traceback (most recent call last):
  File "matlab.py", line 4, in ?
    io.loadmat("k0r",appendmat=0)
  File "/usr/local/lib/python2.1/site-packages/scipy/io/mio.py", line
423, in loadmat
    raise ValueError, "Cannot handle sparse matrices, yet."
ValueError: Cannot handle sparse matrices, yet.

What is going on there ?

Nils

> Could you re-try with just the real part of the matrix?
> If that works you could (as work-around) store real and imaginary part
> separately and load them separately and combine them afterwards.
> 
> Good luck,
> 
> Arnd
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-user



More information about the SciPy-User mailing list