[SciPy-user] loadmat behaviour

Carlos Medrano ctmedra at unizar.es
Tue Oct 17 11:54:46 CDT 2006


 I'am using scipy and numpy on Kubuntu 6.0.6

>>> numpy.__version__
>>> scipy.__version__

I have got a problem when using loadmat

In matlab I had a matrix L1 that I saved to a file

>> L1
L1 =

>> save datafile  L1
I used v6 or v7 of MatLab, but this did not alter the problem I report below.

When I try to use io.loadmat it reads numbers as unsigned integers

>>> ret=io.loadmat('datafile.mat')
>>> ret['L1']
array([        10, 4294966944,      97346], dtype=uint32)

How can I do to read the original data type? 

I can try to do some dirty things afterwards but it would be nice if I just 
could read data in their original format.


Carlos Medrano

More information about the SciPy-user mailing list