title: Reading non-uniform data from file into array with NumPy
body: <p>Suppose I have a text file that looks like this:</p>
  
  <blockquote>
    <p>33 3<br>
     46 12<br>
    23 10 23 11 23 12 23 13 23 14 23 15 23 16 24 10 24 11 24 12 24 13 24 14 24 15 24 16 25 14 25   15 25 16 26 16 27 16 28 16 29 16<br>
    33 17 33 18 33 19 34 17 34 18 34 19 35 17 35 18 35 19 36 19<br>
    41 32 41 33 42 32 42 33</p>
  </blockquote>
  
  <p>I would like to read each line into a separate array of integers, as in (pseudo code):</p>
  
  <pre><code>for line in textfile:  
      currentArray = firstLine  
      do stuff with currentArray
  </code></pre>
  
  <p>where in the first iteration, currentArray would be</p>
  
  <blockquote>
    <p>array([33, 3])</p>
  </blockquote>
  
  <p>and in the second iteration, currentArray would be</p>
  
  <blockquote>
    <p>array([46, 12])</p>
  </blockquote>
  
  <p>until the last iteration, when currentArray would be</p>
  
  <blockquote>
    <p>array([41, 32, 41, 33, 42, 32, 42, 33])</p>
  </blockquote>
  
  <p>Basically, I would like to have the functionality of the numpy function loadtxt:</p>
  
  <blockquote>
    <p>currentArray = loadtxt('scienceVertices.txt', usecols=() )</p>
  </blockquote>
  
  <p>Except instead of usecols, being able to specify the row, e.g.,</p>
  
  <blockquote>
    <p>currentArray = loadtxt('scienceVertices.txt', userows=(line) )</p>
  </blockquote>