title: Tensordot for vectors in numpy
body: <p>I'm currently trying to create a tensordot using numpy for vectors. For example, let's say I have the following variables:</p>
  
  <pre><code>a = [np.array([1, 2]), np.array([3,4])] 
  b = [np.array([5,6]), np.array([7,8])]
  </code></pre>
  
  <p>and I want to compute the "tensor product of the vectors", i.e. [a[0]*b[0], a[0]*b[1], a[1]*b[0], a[1]*b[1]] which would give in our example:</p>
  
  <pre><code>a x b = [[5,12], [7,16], [15, 24], [21, 32]]
  </code></pre>
  
  <p>I've tried many combinations using tensordot along different axes, but it never gives me the results I want :((</p>
  
  <p>For example, I tried the followings:</p>
  
  <pre><code>np.tensordot(a,b)
  </code></pre>
  
  <p>which gives me <code>array(70)</code></p>
  
  <p>or <code>np.tensordot(a,b, axes = 0)</code>
  which gives me</p>
  
  <pre><code>array([[[[ 5,  6],
       [ 7,  8]],
  
      [[10, 12],
       [14, 16]]],
  
  
     [[[15, 18],
       [21, 24]],
  
      [[20, 24],
       [28, 32]]]])
  </code></pre>
  
  <p>I also tried using different axes such as <code>np.tensordot(a,b, axes = ([0], [1]))</code> with no success...</p>
  
  <p>Can someone please help me? :)
  I'm sure it's pretty trivial but I seem to miss something</p>
  
  <p>Thanks. </p>