简体   繁体   中英

Confused by loaded data of scipy.io.loadmat()

I'm trying to load a.mat eye-tracking database from this page . The link of the database is here

After loading using scipy.io.loadmat() function, I found it's hard to understand the loaded data. I don't understand how it corresponds to the original data.

First, the data contains nested numpy arrays, which is not useful because I can't even access the shape. Second, if opening the database by Matlab, I could see the fields I need. But when it was loaded in Python, I can't see how the nested arrays correspond to those fields.

Can someone share an advice on my issue? Thanks

The answer could be referred to the documentation of this function.

simplify_cells: False, optional. If True, return a simplified dict structure (which is useful if the mat file contains cell arrays). Note that this only affects the structure of the result and not its contents (which is identical for both output structures). If True, this automatically sets struct_as_record to False and squeeze_me to True, which is required to simplify cells.

So, simply pass simplify_cells = True , you would get a dict with clear information.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM