title: numpy error cannot perform reduce with flexible type when reading data from list and not array
body: <p>I am trying to do a simple regression analysis by reading cols from a csv file and using numpy and stats to do the regression analysis. The code works all the way to print x or y but it gives an error on the last line of code</p>
  
  <pre><code> line 62, in _mean
      ret = um.add.reduce(arr, axis=axis, dtype=dtype, out=out, keepdims=keepdims)
  TypeError: cannot perform reduce with flexible type
  </code></pre>
  
  <p>I believe the error lie in me putting a list within the asarray function. if i manually put in the data into the asarray function, the code works but i want to read directly from a csv file.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>from scipy import stats
  import numpy as np
  import pylab
  import csv
  import sys
  
  cr = csv.reader(open(sys.argv[1],"rU").readlines()[2:])
  off_signups=[]
  off_cost=[]
  
  for row in cr:
      off_signups.append(row[1])
      off_cost.append(row[2])
  
  x=np.asarray(off_signups)
  y=np.asarray(off_cost)
  
  print x
  print y
  
  slope, intercept, r_value, p_value, slope_std_error = stats.linregress(x, y)
  </code></pre>