title: Simple subtraction causes a broadcasting issue for different array shapes
body: <p>I tried solving my issue using this <a href="http://docs.scipy.org/doc/numpy/user/basics.broadcasting.html" rel="nofollow">link</a>, describing numpy broadcasting, but to no avail. How to subtract the following numpy arrays:</p>
  
  <pre><code>X = np.array([[[1,2,3,4],[1,2,3,4],[1,2,3,4]],
                [[4,3,2,1],[4,3,2,1],[4,3,2,1]]])
  X_mean = np.average(X_, axis=1)
  </code></pre>
  
  <p>When I do <code>X - X_mean</code> it states:</p>
  
  <pre><code>ValueError: operands could not be broadcast together with shapes (2,3,4) (2,4) 
  </code></pre>
  
  <p>But doing <code>X[0] - X_mean[0]</code> gives the correct output:</p>
  
  <pre><code>array([[ 0.,  0.,  0.,  0.],
         [ 0.,  0.,  0.,  0.],
         [ 0.,  0.,  0.,  0.]])
  </code></pre>