title: How to get pairwise distance for two lists of vectors in python
body: <p>Say I got two lists of vectors:</p>
  <pre class="lang-py prettyprint-override"><code>l1 = [v1, v2, v3]
  l2 = [v4, v5, v6]
  </code></pre>
  <p>I know that with scipy I can get pairwise distances within a list but how do I do it for two so that the results look like that:</p>
  <pre class="lang-py prettyprint-override"><code>[[d(v1, v4), d(v1, v5), d(v1,v6)],
   [d(v2, v4), d(v2, v5), d(v2, v6)],
   [d(v3, v4), d(v3, v4), d(v3, v4)]]
  </code></pre>
  <p>in the most efficient way possible? loops are best to be avoided.</p>