title: Vectorized way of calculating row-wise dot product two matrices with Scipy
body: <p>I want to calculate the row-wise dot product of two matrices of the same dimension as fast as possible. This is the way I am doing it:</p>
  
  
  
  <pre><code>import numpy as np
  a = np.array([[1,2,3], [3,4,5]])
  b = np.array([[1,2,3], [1,2,3]])
  result = np.array([])
  for row1, row2 in a, b:
      result = np.append(result, np.dot(row1, row2))
  print result
  </code></pre>
  
  <p>and of course the output is:</p>
  
  <pre><code>[ 26.  14.]
  </code></pre>