title: Does numpy.dot behave different from matlab .*?
body: <p>I try to port matlab code to numpy, particularly a matrix multiplication:</p>
  
  <pre><code> % matlab multiplication of two 480x640 double, yields 480x640 double
   result = xgrid.*depth
  </code></pre>
  
  <p>In python I thought it should be something like</p>
  
  <pre><code> result = xgrid.dot(depth)
  </code></pre>
  
  <p>but I get a <code>ValueError: shapes (480,640) and (480,640) not aligned: 640 (dim 1) != 480 (dim 0)</code> Transposing does not help since it changes the shape of the output. </p>
  
  <p>How could I port the code correctly?</p>