title: Multiply each element in numpy array by each element in another numpy array
body: <p>Suppose I have two arrays:</p>
  
  <pre><code>a = np.array([1,2,3,4,5])
  b = np.array([6,7,8])
  </code></pre>
  
  <p>where the a is generally a 1D array of length <code>m</code> and b is a 1D array of length <code>n</code> where <code>n!=m</code>. I'd like to multiply a and b together elementwise such that the end result is of shape <code>(n*m, 1)</code>:</p>
  
  <pre><code>result = np.array([6, 12, 18, 24, 30, 7, 14, 31, 28, 35, 8, 16, 24, 32, 40])
  </code></pre>