[SciPy-User] scipy.io.loadmat error when trying to read a .mat file

Dharhas Pothina Dharhas.Pothina@twdb.state.tx...
Tue Oct 12 15:00:22 CDT 2010

> Ah - no - so there are three separate problems in your example file:
> a) Duplicate variable names
> b) Strings that have declared length > 0, and allocated storage of 0.
> c) Structs with duplicate fieldnames.
> For a) you can do something about this in current scipy if you want
> the first (rather than the last) version of a particular variable, by
> doing the MatFileReader trick.  But that's your smallest problem
> because b) and c) crash the scipy reader.    So, you can probably pull
> out any variables not suffering from b) or c), but that's all - with
> current scipy.

>From my initial examination of the data files all of these issues occur with variables I am not planning to use in my script, so I *should* be ok.

Again thanks for the sleuthing and the fixes. I think the responses I get from this community are an order of magnitude more helpful than those I get for products we have commercial support contracts for.

- dharhas 

More information about the SciPy-User mailing list