docs: def pdist(objects, dmeasure, diagval = numpy.inf):
      """
      Compute the pair-wise distances between arbitrary objects.
      
      Notes
      -----
      ``dmeasure`` is assumed to be *symmetry* i.e. between object *a* and object *b* the
      function will be called only ones.
      
      Parameters
      ----------
      objects : sequence
          A sequence of objects of length *n*.
      dmeasure : function
          A callable function that takes two objects as input at returns a number.
      diagval : number
          The diagonal values of the resulting array.
          
      Returns
      -------
      pdists : ndarray
          An *nxn* symmetric float array containing the pair-wise distances.
      """
      out = numpy.zeros([len(objects)] * 2, numpy.float)
      numpy.fill_diagonal(out, diagval)
      for idx1, idx2 in combinations(list(range(len(objects))), 2):
          out[idx1, idx2] = dmeasure(objects[idx1], objects[idx2])
      return out + out.T