title: Numpy: Dot product with max instead of sum
body: <p>Is  there a way in numpy to do the following (or is there a general mathematical term for this):</p>
  
  <p>Assume normal dot product:</p>
  
  <pre><code>M3[i,k] = sum_j(M1[i,j] * M2[j,k])
  </code></pre>
  
  <p>Now I would like to replace the sum by sum other operation, say the maximum:</p>
  
  <pre><code>M3[i,k] = max_j(M1[i,j] * M2[j,k])
  </code></pre>
  
  <p>As you can see it is completely parallel to the above, just we take <code>max</code> over all <code>j</code> and not the sum.</p>
  
  <p>Other options could be <code>min</code>, <code>prod</code>, and whatever other operation that turns a sequence/set into a value.</p>