if num_matched_labels[ok] == 0:
            f1_ok = 0.0
        else:
            precision_ok = float(num_matched_labels[ok]) / float(
                num_predicted_labels[ok]