title: Get an array back from an itertools.chain object
body: <p>Suppose I have <code>list_of_numbers = [[1, 2], [3], []]</code> and I want the much simpler object list object <code>x = [1, 2, 3]</code>.</p>
  
  <p>Following the logic of <a href="https://stackoverflow.com/a/406199/2232265">this related solution</a>, I do</p>
  
  <pre><code>list_of_numbers = [[1, 2], [3], []]
  import itertools
  chain = itertools.chain(*list_of_numbers)
  </code></pre>
  
  <p>Unfortunately, <code>chain</code> is not exactly what I want because (for instance) running <code>chain</code> at the console returns <code>&lt;itertools.chain object at 0x7fb535e17790&gt;</code>.  </p>
  
  <p>What is the function <code>f</code> such that if I do <code>x = f(chain)</code> and then type <code>x</code> at the console I get <code>[1, 2, 3]</code>?</p>
  
  <p><strong>Update:</strong>  Actually the result I ultimately need is <code>array([1, 2, 3])</code>.  I'm adding a line in a comment on the selected answer to address this.</p>