[Numpy-discussion] Matlab_NumPy_Array?

Karshi Hasanov karshi.hasanov at utoronto.ca
Sun Aug 19 14:17:36 EDT 2001

Hi all,

 I  don't understand how to conver arrays from Matlab to Numpy. Here what I 
did: 1) Converted Matlab A(i,j,k) to 'A.dat' binary file
      2) file_open=open('~/A.dat', 'rb')
      3) read_file=file_open.read()
      4) A_string=fromstring(read_file, 'f')
      5) A=reshape(A_string, (i,j,k))
where i,j,k are size of A[i,j,k]

I am not getting the right. 
What is the best/right way of convering arrays?

More information about the NumPy-Discussion mailing list