def _replace_labels()

in src/responsibleai/rai_analyse/_score_card/_rai_insight_data.py [0:0]


    def _replace_labels(y, primary_label, other_label, is_numeric_label):
        # for multi class scenario, replacing all labels with other_label except for primary_label.
        if is_numeric_label:
            y = y.astype('U')

        if y.dtype.itemsize / 4 < len(other_label):
            y = y.astype(f"U{len(other_label)}")

        y[y != primary_label] = other_label
        return y