title: Numpy, cannot perform reduce with flexible type
body: <p>I am testing a naive Bayes Classifier with Sci-Kit learn and using Numpy for storing the data in arrays. My data is coming from a .csv file and contains a header row, four columns that contain strings and one column that contains numeric values. Here is what the structure of the csv file looks like:</p>
  
  <pre><code>columnOne    columnTwo    columnThree    columnFour    columnFive
  string       string       string         numeric       string
  </code></pre>
  
  <p>and here is my code:</p>
  
  <pre><code>from sklearn import metrics
  from sklearn.naive_bayes import GaussianNB
  import numpy as np
  import csv
  with open('data.csv', 'rU') as csvfile: 
      location_reader = csv.reader(csvfile, delimiter =',', 
      quotechar ='"') 
      # Header contains feature names 
      row = location_reader.next() 
      feature_names = np.array(row) 
      # Load dataset, and target classes 
      location_X, location_y = [], [] 
      for row in location_reader: 
          location_X.append(row) 
          location_y.append(row[4]) # The target value is column five 
      location_X = np.array(location_X)
      location_y = np.array(location_y)
  model = GaussianNB()
  model.fit(location_X, location_y)
  print(model)
  # make predictions
  expected = location_y
  predicted = model.predict(location_X)
  # summarize the fit of the model
  print(metrics.classification_report(expected, predicted))
  print(metrics.confusion_matrix(expected, predicted))
  </code></pre>
  
  <p>Can anyone provide some input on why I might be getting this error and how I can fix it?</p>