[Numpy-discussion] using FortranFile to read data from a binary Fortran file
Tue Nov 3 19:50:20 CST 2009
I'm using FortranFile on 32 bit XP.
The first record in the file has both 32 bit integer values and double
precision float values.
I've used readInts('i') to read the data into what I presume is a 32-bit
integer numpy array.
Items 0 and 1 of the array are the first double precision value.
What's the best way to convert/cast these to get the double precision
I assume I need to do some sort of dpval=ival.astype('float64')
More information about the NumPy-Discussion