title: Python Numpy : operands could not be broadcast together with shapes
body: <p>I am getting this error "operands could not be broadcast together with shapes"  for this code</p>
  
  <pre><code>import numpy as np
  from sklearn.datasets import load_boston
  from sklearn.linear_model import LinearRegression
  beantown = load_boston()
  x=beantown.data
  y=beantown.target
  model = LinearRegression()
  model = model.fit(x,y)
  
  def mse(truth, predictions): 
      return ((truth - predictions) ** 2).mean(None)
  print model.score(x,y)
  print mse(x,y)
  </code></pre>
  
  <p>The error is on the line  print mse(x,y)</p>
  
  <p>Error is ValueError: </p>
  
  <pre><code>operands could not be broadcast together with shapes (506,13) (506,)
  </code></pre>