title: Reading binary big endian files in python
body: <p>I'd like to use python read a large binary file in ieee big endian 64bit floating point format, but am having trouble getting the correct values.  I have a working method in matlab, as below: </p>
  
  <pre><code>fid=fopen(filename,'r','ieee-be');
  data=fread(fid,inf,'float64',0,'ieee-be');
  fclose(fid)
  </code></pre>
  
  <p>I've tried the following in python:</p>
  
  <pre><code>data = np.fromfile(filename, dtype='&gt;f', count=-1)
  </code></pre>
  
  <p>This  method doesn't throw any errors, but the values it reads are extremely large and incorrect.  Can anyone help with a way to read these files?  Thanks in advance.</p>