title: How do I open and extract data from this .dat.gz file in Python?
body: <p>I am trying to extract data from this file:</p>
  <p><a href="https://slac.stanford.edu/%7Ebehroozi/BPlanck_Trees/tree_0_0_0.dat.gz" rel="nofollow noreferrer">https://slac.stanford.edu/~behroozi/BPlanck_Trees/tree_0_0_0.dat.gz</a></p>
  <p>It is a .dat.gz file. I downloaded it through my terminal and de-compressed it so that it is a .dat file. However when I run:</p>
  <pre class="lang-py prettyprint-override"><code>f = open('tree_0_0_0.dat', 'r')
  data = np.genfromtxt(f)
  </code></pre>
  <p>I get:</p>
  <pre class="lang-py prettyprint-override"><code>array([],dtype=float64)
  </code></pre>
  <p>Why is it an empty array. How do I extract the data in here? Did I maybe de-compress it incorrectly?</p>
  <p>Any help is much appreciated!</p>