[SciPy-user] loadmat behaviour

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


Hi

 I'am using scipy and numpy on Kubuntu 6.0.6

>>> numpy.__version__
'1.0b5'
>>> scipy.__version__
'0.5.2.dev2197'
>>>      

I have got a problem when using loadmat

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

MATLAB CODE
--------------
>> L1
L1 =
          10
        -352
       97346

>> 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.

Thanks

Carlos Medrano




More information about the SciPy-user mailing list