Quantcast

[SciPy-User] How to handle a scipy.io.loadmat - related bug: parts of the data inaccessible after loadmat

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[SciPy-User] How to handle a scipy.io.loadmat - related bug: parts of the data inaccessible after loadmat

Propadovic Nenad
Hello Gregor,

Anyhow, the field names are accessible by

y = scipy.io.loadmat("x.mat")
y['CanData'][0, 0]['msg'].dtype.names

('RPDO2',)

Oh. I missed both the above and the below. :(

or

y = scipy.io.loadmat("x.mat", squeeze_me=True)
y['CanData']['msg'].item().dtype.names


These are the access methods I was looking for all the time. I guess before I ask why .item() has to be used I guess I'll go rtfm some more :(
 
I would not consider this as a bug, more a documentation issue, which is resolved by this discussion. You might add a comment on stack overflow with your findings.

Gregor

Yes, I will.
Thank you!
 Nenad



_______________________________________________
SciPy-User mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/scipy-user
Loading...