[Numpy-discussion] example reading binary Fortran file

Sturla Molden sturla@molden...
Fri Jan 30 10:27:08 CST 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