title: I'm getting a matmul: input operand 1 has a mismatch...error...full error in body
body: <p>The error:
  <code>ValueError: matmul: Input operand 1 has a mismatch in its core dimension 0, with gufunc signature (n?,k),(k,m?)-&gt;(n?,m?) (size 1 is different from 2)</code></p>
  <p>I'm doing linear regression with a csv dataframe. After reshaping and fitting the x and y values i run into this error, highlighting the model.predict part.</p>
  <p>My code:</p>
  <pre><code>import matplotlib.pyplot as plt
  import numpy as np
  import pandas as pd
  from sklearn.linear_model import LinearRegression
  import requests
  import io 
  import csv
  
  url = &quot;https://raw.githubusercontent.com/DairyProducts/misc/main/cadeath.csv&quot;
  download = requests.get(url).content
  
  df = pd.read_csv(io.StringIO(download.decode('utf-8')))
  
  x = df['x'].to_numpy()
  y = df['y'].to_numpy()
  
  model = LinearRegression()
  x = x.reshape(-1, 1)
  y = y.reshape(-1, 1)
  model.fit(x, y)
  r_sq = model.score(x, y)
  y_pred = model.intercept_ + np.sum(model.coef_ * x, axis=1)
  x_new = np.arange(10).reshape((-1, 2))
  y_new = model.predict(x_new)
  plt.plot(x_new, y_new)
  plt.show()
  </code></pre>