[Numpy-discussion] example reading binary Fortran file
Sturla Molden
sturla@molden...
Fri Jan 30 10:31:57 CST 2009
On 1/30/2009 5:27 PM, Sturla Molden wrote:
> 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')
fu*k
ux = np.fromfile(file, count=nx*ny,
dtype=np.float32).reshape((nx,ny), order='F')
Sorry for the previous typos, it's Friday and soon weekend...
Sturla Molden
More information about the Numpy-discussion
mailing list