[Numpy-discussion] example reading binary Fortran file

Sturla Molden sturla at molden.no
Fri Jan 30 11:27:08 EST 2009


On 1/30/2009 5:23 PM, Sturla Molden wrote:

> ux = np.fromfile(nx*ny, dtype=np.float32).view((nx,ny), order='F')

oops.. this should be

ux = np.fromfile(file, count=nx*ny, dtype=np.float32).view((nx,ny),
           order='F')



S.M.



More information about the NumPy-Discussion mailing list