When I load in a .mat file with scipy.io.loadmat, I get a data structure which is difficult to deal with because I have to guess at what level in the structure the data is contained. The numpy or scipy representation wraps everything in deep lists. Printing it doesn't usually help because it contains a lot of data. For example:
from scipy.io import loadmat
mat = loadmat("data.mat")
val = mat["someattribute"] # not what I want, the data I can iterate over is one layer deeper (len(val) == 1)
val = mat["someattribute"][0] # len(val) is some big value
Is there some easy way to access these things without having to worry about their representation? I recently switched from python 2.6.6 to 2.7.3 and noticed that the representation in the numpy/scipy libraries changed (and hence my code broke).