title: tuple index error while doing regression fit
body: <p>I'm writing a code to do linear single variate regression analysis of data using numpy. I know that fit() function in Python uses np.array() but the program is throwing me tuple index error and I'm at my wit's end now. Here is my code:</p>
  
  <pre><code>def linear_model_main(X_parameter, Y_parameter, prediction_value):
  regression = linear_model.LinearRegression()
  regression.fit(X_parameter, Y_parameter, prediction_value)
  prediction_outcome = regression.predict(prediction_value)
  predictions = {}
  predictions['intercept'] = regression.intercept_
  predictions['coefficient'] = regression.coef_
  predictions['predicted_value'] = prediction_outcome
  return predictions
  
  X, Y = get_data(filename)
  Xarr = np.array(X)
  Yarr = np.array(Y)
  predictionvalue = 70
  result = linear_model_main(Xarr, Yarr, predictionvalue)
  </code></pre>
  
  <p>Xarr and Yarr are np.arrays of separate columns of data taken from a csv file and are basically the X and Y coordinate values in the regression. When printed, they look this:</p>
  
  <pre><code>[  7.  73.  49. ...,  56.  56.  56.]
  [ 5863.  5860.  5860. ...,  5860.  5860.  5860.]
  </code></pre>
  
  <p>It is a huge dataset (about 130,000 rows and 35 columns).</p>