[Scipy-tickets] [SciPy] #1703: Reading V4 Matlab Files

SciPy Trac scipy-tickets@scipy....
Wed Jul 18 19:17:53 CDT 2012

#1703: Reading V4 Matlab Files
 Reporter:  nhergert  |       Owner:  somebody   
     Type:  defect    |      Status:  new        
 Priority:  normal    |   Milestone:  Unscheduled
Component:  Other     |     Version:  0.10.0     
 Keywords:            |  
 Sorry for the arcane-ness of this bug, but for Matlab 'v4' .mat files,
 the [http://www.mathworks.com/help/pdf_doc/matlab/matfile_format.pdf
 official notes] (look at last few pages) say to expect zero on 'O' and
 reserve it for future use. Apparently this is used for specifying whether
 the matrix is transposed when written, as Matlab v2006 handles the change
 just fine. Allowing this would simplify the  process of writing out
 multiple time-series vectors in time-constrained situations.

 I propose this change to mio4.py around line 107 to allow this
 functionality (this fixed the problem for me):

 if O == 0:
     dims = (data['mrows'], data['ncols'])
 elif O == 1:
     dims = (data['ncols'], data['mrows'])
     raise ValueError('O in MOPT integer should be 0 or 1, wrong format?')

Ticket URL: <http://projects.scipy.org/scipy/ticket/1703>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.

More information about the Scipy-tickets mailing list