def mutual_information_by_label(internal_values, by_labels_idx):
    """Compute information matrix for the joint distribution
    over the internal coefficient values and the presence of the label,
    for each label.
    """
    hists = internal_histograms_by_label(internal_values, by_label)
    joint_hists = [np.vstack([hists[i], _sum_all_but_i(hists, i)])
                   for i in range(len(hists))]
    return [mutual_information(1. * h.sum() / h) for h in joint_hists]
dataset/ETHPy150Open omangin/multimodal/samples/plot_info_matrix.py/mutual_information_by_label/swapped operands of `/`