title: append data in a numpy array
body: <p>I'm trying to pass a list within a numpy array in order to calculate its variance as explained <a href="https://docs.scipy.org/doc/numpy-1.12.0/reference/generated/numpy.var.html" rel="nofollow noreferrer">here</a></p>
  
  <p>The example I use is this:</p>
  
  <pre><code>import numpy as np
  A= np.array([])
  newrow = [1,2,3]
  A = np.concatenate((A,newrow))
  print(np.var(A))
  </code></pre>
  
  <p>The example above works however I can't apply it to my specific case (see below)</p>
  
  <pre><code>import csv
  import numpy as np
  
  f = open("training_stats.csv", 'r')
  customers = csv.reader(f)
  header = next(customers)
  
  #I've tried with and without the .astype
  A = np.array([]).astype(np.float)
  
  for row in customers: 
      birth_date = row[10].split("-")[0]
      print(birth_date)
      A = np.append(A,birth_date)
  print np.var(A)
  </code></pre>
  
  <p>Here is the error message returned</p>
  
  <pre><code>TypeError: cannot perform reduce with flexible type
  </code></pre>
  
  <p>Here is what my list looks like:</p>
  
  <pre><code>1963
  1975
  1957
  </code></pre>
  
  <p>I know I could compute variance this way:</p>
  
  <pre><code>var = mean(abs(x - x.mean())**2)
  </code></pre>
  
  <p>However I'd like to understand what's wrong with this <code>numpy.array</code> and the type of data I'm passing to it.</p>