title: Filling missing values using numpy.genfromtxt
body: <p>Despite the advice from the previous questions:</p>
  
  <p><a href="https://stackoverflow.com/questions/12274709/9999-as-missing-value-with-numpy-genfromtxt">-9999 as missing value with numpy.genfromtxt()</a></p>
  
  <p><a href="https://stackoverflow.com/questions/3761103/using-genfromtxt-to-import-csv-data-with-missing-values-in-numpy">Using genfromtxt to import csv data with missing values in numpy</a></p>
  
  <p>I still am unable to process a text file that ends with a missing value, </p>
  
  <p><strong>a.txt:</strong></p>
  
  <pre><code>1 2 3
  4 5 6
  7 8
  </code></pre>
  
  <p>I've tried multiple arrangements of options of <code>missing_values</code>, <code>filling_values</code> and can not get this to work:</p>
  
  <pre><code>import numpy as np
  
  sol = np.genfromtxt("a.txt", 
                      dtype=float,
                      invalid_raise=False, 
                      missing_values=None,
                      usemask=True,
                      filling_values=0.0)
  print sol
  </code></pre>
  
  <p>What I would like to get is:</p>
  
  <pre><code>[[1.0 2.0 3.0]
   [4.0 5.0 6.0]
   [7.0 8.0 0.0]]
  </code></pre>
  
  <p>but instead I get:</p>
  
  <pre><code>/usr/local/lib/python2.7/dist-packages/numpy/lib/npyio.py:1641: ConversionWarning: Some errors were detected !
      Line #3 (got 2 columns instead of 3)
    warnings.warn(errmsg, ConversionWarning)
  [[1.0 2.0 3.0]
   [4.0 5.0 6.0]]
  </code></pre>