title: Why the following operands could not be broadcasted together?
body: <p>The arrays are of following dimensions:
  <code>dists</code>: (500,5000)
  <code>train</code>: (5000,)
  <code>test</code>:(500,)</p>
  
  <p>Why does the first two statements throw an error whereas the third one works fine?</p>
  
  <ol>
  <li><code>dists += train + test</code></li>
  </ol>
  
  <p>Error: <code>ValueError: operands could not be broadcast together with shapes (5000,) (500,)</code> </p>
  
  <ol start="2">
  <li><code>dists += train.reshape(-1,1) + test.reshape(-1,1)</code></li>
  </ol>
  
  <p>Error: <code>ValueError: operands could not be broadcast together with shapes (5000,1) (500,1)</code></p>
  
  <ol start="3">
  <li><code>dists += train + test.reshape(-1,1)</code>
  This works fine!</li>
  </ol>
  
  <p>Why does this happen?</p>