title: How to convert itertools.chain into numpy array?
body: <p>My code</p>
  
  <pre><code>import math
  import itertools
  
  with open('/home/milenko/OCCAM2DMT_V3.0/13042/ITER04.iter') as f:
      lines_after_19 = f.readlines()[19:]
      p = []
      for line in lines_after_19:
          line = line.split()         
          line = [float(i) for i in line]
          p.extend(line)    
  
  a1=p[1:81]
  for i in a1:
      b1=math.pow(10, i)   
  a2=p[83:163]
  for i in a2:
      b2=math.pow(10,i)
  a3=p[165:245]   
  for i in a3:
      b3=math.pow(10,i)
  a4=p[247:327]
  for i in a4:
      b4=math.pow(10,i)
  a5=p[329:409] 
  for i in a5:
      b5=math.pow(10,i)
  a6=p[411:491]
  for i in a6:
      b6=math.pow(10,i)
  
  c = itertools.chain(b1, b2, b3, b4, b5, b6) 
  print type(c)
  </code></pre>
  
  <p>I need to convert c to <code>numpy</code> array,for <code>reshape</code> and then further calculations.</p>