title: Reading a binary file into 2D array python
body: <p>I am having trouble reading a binary file in python and plotting it. It is supposedly an unformatted binary file representing a 1000x1000 array of integers. I have used:</p>
  
  <pre><code>image = open("file.dat", "r")
  a = np.fromfile(image, dtype=np.uint32)
  </code></pre>
  
  <p>Printing the length returns 500000. I cannot figure out how to create a 2D array out of it.</p>