1

I am using Python to read a complex data structure from a .mat file. I have a data structure called complexData. If I use :

print(str(complexData))

It shows

   array([[(array([[0, 0, 0, ..., 0, 0, 0],

   [0, 0, 0, ..., 0, 0, 0],

   [0, 0, 0, ..., 0, 0, 0],

   ...,

   [0, 0, 0, ..., 0, 0, 0],

   [0, 0, 0, ..., 0, 0, 0],

   [0, 0, 0, ..., 0, 0, 0]], dtype=uint8), array([[4]], dtype=int32), array([[0]], dtype=uint8))]],

  dtype=[('data', 'O'), ('ss', 'O'), ('class', 'O')])

.

.

.

This repeats several times.

I can see that each row is a structured data type including one 2D array, two 1D arrays, and the last one which I don't know what type.

Can someone tell me how to read each and every items of this data structure?

Jetman
  • 765
  • 4
  • 14
  • 30
djsg
  • 107
  • 1
  • 8

0 Answers0