title: Read numpy array with double brackets
body: <p>My data file ('data.txt') is a direct copy-paste from a numpy array output like:</p>
  
  <blockquote>
    <p>[[ 1.62434536]\n [-0.61175641]\n [-0.52817175]\n [-1.07296862]\n [
    0.86540763]\n [-2.3015387 ]\n [ 1.74481176]\n [-0.7612069 ]\n [ 0.3190391 ]\n [-0.24937038]\n [ 1.46210794]\n ... ]]</p>
  </blockquote>
  
  <p>I would like to read it into a numpy array or panda Serie.
  I tried </p>
  
  <pre><code>np.loadtxt('data.txt', delimiter = '\n', unpack = True)
  </code></pre>
  
  <p>I got </p>
  
  <blockquote>
    <p>ValueError: could not convert string to float: [[ 1.62434536]</p>
  </blockquote>
  
  <p>Then I tried</p>
  
  <pre><code>f = open('data.txt', 'r')
  data_txt = f.read()
  data_txt = data_txt.replace('[', '')
  data_txt = data_txt.replace(']', '')
  np.loadtxt(StringIO.StringIO(data_txt), delimiter = '\n')
  </code></pre>
  
  <p>It works, but it feels ugly. I wonder if there are more elegant way to just read the numpy array as it is.</p>