title: Python: Reading Fortran Binary file using numpy or scipy
body: <p>I am trying to read a fortran file with headers as integers and then the actual data as 32 bit floats. Using numpy's <code>fromfile('mydatafile', dtype=np.float32)</code> it reads in the whole file as float32 but I need the headers to be in int32 for my output file. Using scipy's FortranFile it reads the headers: </p>
  
  <pre><code>f = FortranFile('mydatafile', 'r')
  headers = f.read_ints(dtype=np.int32)
  </code></pre>
  
  <p>but when I do:</p>
  
  <pre><code>data = f.read_reals(dtype=np.float32)
  </code></pre>
  
  <p>it returns an empty array. I know it shouldn't be empty because using numpy's fromfile it reads all of the data. Oddly enough the scipy method worked for other files in my dataset, but not this one. Perhaps i'm not understanding the difference between each of the two read methods with numpy and scipy. Is there a way to isolate the headers (<code>dtype=np.int32</code>) and data (<code>dtype=np.float32</code>) when reading in the file with either method?</p>