title: subtracting the mean of each row in numpy with broadcasting
body: <p>I try to subtract the mean of each row of a matrix in numpy using broadcasting but I get an error. Any idea why?</p>
  
  <p>Here is the code:</p>
  
  <pre><code>from numpy import *
  X = random.rand(5, 10)
  Y = X - X.mean(axis = 1)
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>ValueError: operands could not be broadcast together with shapes (5,10) (5,) 
  </code></pre>
  
  <p>Thanks!</p>