[SciPy-dev] Please stress-test SVN version pf matlab reader

Eric Firing efiring@hawaii....
Sat Jan 9 13:49:21 CST 2010

Matthew Brett wrote:
> Hi
>> further - if I set both squeeze_me and struct_as_record to True (does that
>> make sense?), I get into some rather nasty situations, where I can't use the
>> variables in the matfile:
> Sorry - I think I missed your first email, and can't see the
> attachment - can you send by private mail?
> I've fixed your first error I think - thanks for the report - please
> let me know if current SVN does work for mat_struct problem...
> See you,
> Matthew


I updated from svn, built, and installed, and I am having a similar 
problem.  A sample file is 

Here is what happens:

In [16]:from scipy.io import loadmat

In [17]:a = loadmat('002.mat', struct_as_record=True, squeeze_me=True)

In [18]:a['p']['lon']
Out[18]:array(array(30.355230445182066), dtype=object)

n [20]:scipy.version.version

I think this is the same problem that Ariel noted.  If I don't use 
squeeze_me but explicitly de-reference each of the two levels of arrays 
of shape (1,1), then I can get at the underlying variables.


> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev

More information about the SciPy-Dev mailing list