How to load and convert .mat file into numpy 2D array?

百般思念 提交于 2019-12-22 17:34:54

问题


I have a data in mat file (observations and features) and i want to load it into numpy 2D array. I dont want to convert it into csv first and then load csv into numpy.


回答1:


Use scipy's loadmat (API-docs).

The docs should be sufficient to get you going, but make sure to read the notes.

There is also the io-tutorial with some examples.



来源:https://stackoverflow.com/questions/43952620/how-to-load-and-convert-mat-file-into-numpy-2d-array

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!