title: read an ascii file into a numpy array
body: <p>I have an <code>ascii</code> file and I want to read it into a <code>numpy array</code>. But it was failing and for the first number in the file, it returns 'NaN' when I use <code>numpy.genfromtxt</code>. Then I tried to use the following way of reading the file into an array:</p>
  
  <pre><code>lines = file('myfile.asc').readlines()
  X     = []
  for line in lines:
      s = str.split(line)
      X.append([float(s[i]) for i in range(len(s))])
  
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 3, in &lt;module&gt;
  ValueError: could not convert string to float: 15.514
  </code></pre>
  
  <p>when I printed the first line of the file it looks like :</p>
  
  <pre><code>&gt;&gt;&gt; s
  ['\xef\xbb\xbf15.514', '15.433', '15.224', '14.998', '14.792', '15.564', '15.386', '15.293', '15.305', '15.132', '15.073', '15.005', '14.929', '14.823', '14.766', '14.768', '14.789']
  </code></pre>
  
  <p>how could I read such a file into a <code>numpy array</code> without problem and any presumption about the number of rows and columns?</p>