code: def fill_edge_matrix(nsrcs, match_dict):
      
      e_matrix = np.zeros((nsrcs, nsrcs))
      for k, v in match_dict.items():
          e_matrix[k[0], k[1]] = v
      return e_matrix
docs: Create and fill a matrix with the graph 'edges' between sources.
  
      Parameters
      ----------
      nsrcs  : int 
          number of sources (used to allocate the size of the matrix)
  
      match_dict :  dict((int,int):float)    
          Each entry gives a pair of source indices, and the
          corresponding measure (either distance or sigma)
  
      Returns
      -------
      e_matrix : `~numpy.ndarray`    
          numpy.ndarray((nsrcs,nsrcs)) filled with zeros except for the
          matches, which are filled with the edge measures (either
          distances or sigmas)