title: Numpy Array Broadcasting with different dimensions
body: <p>I a little confused by the broadcasting rules of numpy. Suppose you want to perform an axis-wise scalar product of a higher dimension array to reduce the array dimension by one (basically to perform a weighted summation along one axis):</p>
  
  <pre><code>from numpy import *
  
  A = ones((3,3,2))
  v = array([1,2])
  
  B = zeros((3,3))
  
  # V01: this works
  B[0,0] = v.dot(A[0,0])
  
  # V02: this works
  B[:,:] = v[0]*A[:,:,0] + v[1]*A[:,:,1] 
  
  # V03: this doesn't
  B[:,:] = v.dot(A[:,:]) 
  </code></pre>
  
  <p>Why does V03 not work?</p>
  
  <p>Cheers</p>