[Numpy-discussion] using FortranFile to read data from a binary Fortran file
brennan.williams at visualreservoir.com
Tue Nov 3 20:50:20 EST 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