(combos, pairwise, distance_matrix)
return new_scores
Obtains scores from the distance_matrix for each pairwise combination
        held in the combos array

        Parameters
        ----------
        combos : numpy.ndarray
        pairwise : numpy.ndarray
        distance_matrix : numpy.ndarray
Obtains scores from the distance_matrix for each pairwise combination
        held in the combos array
Obtains scores from the distance_matrix for each pairwise combination held in the combos array
def mappable(combos, pairwise, distance_matrix):
        '''
        Obtains scores from the distance_matrix for each pairwise combination
        held in the combos array

        Parameters
        ----------
        combos : numpy.ndarray
        pairwise : numpy.ndarray
        distance_matrix : numpy.ndarray
        '''
        combos = np.array(combos)
        # Create a list of all pairwise combination for each combo in combos
        combo_list = combos[:, pairwise[:, ]]

        addresses = (combo_list[:, :, 1], combo_list[:, :, 0])

        all_distances = distance_matrix[addresses]
        new_scores = np.sqrt(
            np.einsum('ij,ij->i', all_distances, all_distances))
        return new_scores
def mappable ( combos , pairwise , distance_matrix ) : combos = np . array ( combos ) # Create a list of all pairwise combination for each combo in combos combo_list = combos [ : , pairwise [ : , ] ] addresses = ( combo_list [ : , : , 1 ] , combo_list [ : , : , 0 ] ) all_distances = distance_matrix [ addresses ] new_scores = np . sqrt ( np . einsum ( 'ij,ij->i' , all_distances , all_distances ) ) return new_scores