Abdullah Danyal
Abdullah Danyal

Reputation: 1146

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

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.

Upvotes: 5

Views: 20807

Answers (1)

sascha
sascha

Reputation: 33542

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.

Upvotes: 6

Related Questions