mat = open(file_path, 'r')
next(mat)
length = int(mat.next().split()[-1])
next(mat)
next(mat)
ans = np.array([map(float, mat.next().split()) for i in range(length)])
mat.close()
return ans
Считайте матрицу Matlab в Python