title: Multiplying across in a numpy array
body: <p>I'm trying to multiply each of the terms in a 2D array by the corresponding terms in a 1D array. This is very easy if I want to multiply every column by the 1D array, as shown in the <a href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.multiply.html">numpy.multiply</a> function. But I want to do the opposite, multiply each term in the row.
  In other words I want to multiply:</p>
  
  <pre><code>[1,2,3]   [0]
  [4,5,6] * [1]
  [7,8,9]   [2]
  </code></pre>
  
  <p>and get</p>
  
  <pre><code>[0,0,0]
  [4,5,6]
  [14,16,18]
  </code></pre>
  
  <p>but instead I get</p>
  
  <pre><code>[0,2,6]
  [0,5,12]
  [0,8,18]
  </code></pre>
  
  <p>Does anyone know if there's an elegant way to do that with numpy?
  Thanks a lot,
  Alex</p>