
Hi Matthew, no - I have been comparing 0.6.0 and r5579, so everything I am saying henceforth may turn out to be irrelevant. At any rate, I attach a .mat file - for this file: In [24]: sp.__version__ Out[24]: '0.6.0' In [25]: mat_file = sio.loadmat('RMT110408.mat') In [26]: mat_file Out[26]: {'ROI': <scipy.io.mio5.mat_struct object at 0x1b2ef110>, '__globals__': [], '__header__': 'MATLAB 5.0 MAT-file, Platform: MAC, Created on: Wed Dec 3 18:45:42 2008', '__version__': '1.0'} In [31]: sp.__version__ Out[31]: '0.8.0.dev5579' In [32]: mat_file = sio.loadmat('RMT110408.mat') In [33]: mat_file Out[33]: {'ROI': array([[<scipy.io.matlab.mio5.mat_struct object at 0x1d277810>]], dtype=object), '__globals__': [], '__header__': 'MATLAB 5.0 MAT-file, Platform: MAC, Created on: Wed Dec 3 18:45:42 2008', '__version__': '1.0'}
From all that you have said, this is probably no surprise to you.
Cheers, Ariel On Fri, Feb 20, 2009 at 9:05 AM, Matthew Brett <matthew.brett@gmail.com>wrote:
Hi Ariel,
Here's a wave up the hill.
mat_file = sio.loadmat('file_name.mat') variable_values = mat_file['field_name'].variable
Has to now be written:
mat_file = sio.loadmat('file_name.mat') field_values = mat_file['field_name'][0][0].variable[0][0]
That's surprising. For a long time now, the reader has always returned at least 2D arrays from matlab, so the latter is what I was expecting.
Are you sure this is a difference between 0.7 and current SVN? Can you check and then send me an example mat file with different behavior for the two versions?
See you,
Matthew _______________________________________________ Scipy-dev mailing list Scipy-dev@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-dev