title: Convert distance pairs to distance matrix to use in hierarchical clustering
body: <p>I am trying to convert a dictionary to a distance matrix that I can then use as an input to hierarchical clustering: I have as an input:</p>
  
  <ul>
  <li>key: tuple of length 2 with the objects for which I have the distance</li>
  <li><p>value: the actual distance value</p>
  
  <pre><code>for k,v in obj_distances.items():
  print(k,v)
  </code></pre></li>
  </ul>
  
  <p>and the result is :</p>
  
  <pre><code>('obj1', 'obj2') 2.0 
  ('obj3', 'obj4') 1.58
  ('obj1','obj3') 1.95
  ('obj2', 'obj3') 1.80
  </code></pre>
  
  <p>My question is how can I convert this into a distance matrix that I can later user for clustering in scipy? </p>