title: Sklearn linear regression X and Y input format
body: <p>I have a few questions about the inputs for the sklearn linear_model.LinearRegression(module).</p>
  
  <pre><code>ages_train = [[20, 10000], [22, 12000], [22, 14000], [25, 17000], [30, 29000]]
  net_worths_train = [10000, 12000, 14000, 17000, 29000]
  
  reg = linear_model.LinearRegression()
  reg.fit(ages_train, net_worths_train)
  </code></pre>
  
  <p>The above works but it makes it difficult to plot. For example, doing this won't work: </p>
  
  <pre><code>plt.scatter(ages_train, net_worths_train, color = "b", label = "train data")
  </code></pre>
  
  <p>And so what I would like to do is input this:</p>
  
  <pre><code>ages_train = np.array([20, 22, 25, 27, 30, 31, 31, 34, 42, 50])
  net_worths_train = np.array([10000, 12000, 16000, 20000, 30000, 33000, 34000, 38000, 49000, 60000])
  </code></pre>
  
  <p>But this data format doesn't work with the .fit() function of linear_model.LinearRegression. What is the proper way to input data and make it easy to plot as well? And is it preferable to use numpy arrays?</p>