(ungrouped_metric: np.ndarray,
                            groups: np.ndarray)
return mean_of_mu_star
Computes the mean value for the groups of parameter values.

    Parameters
    ----------
    ungrouped_metric: np.ndarray
        Metric calculated without considering the groups
    groups: np.ndarray
        Array defining the distribution of groups

    Returns
    -------
    mean_of_mu_star: np.ndarray
         Mean value for the groups of parameter values
Computes the mean value for the groups of parameter values.
Computes the mean value for the groups of parameter values .
def _compute_grouped_metric(ungrouped_metric: np.ndarray,
                            groups: np.ndarray) -> np.ndarray:
    """ Computes the mean value for the groups of parameter values.

    Parameters
    ----------
    ungrouped_metric: np.ndarray
        Metric calculated without considering the groups
    groups: np.ndarray
        Array defining the distribution of groups

    Returns
    -------
    mean_of_mu_star: np.ndarray
         Mean value for the groups of parameter values
    """

    groups = np.array(groups, dtype=bool)

    mu_star_masked = np.ma.masked_array(ungrouped_metric * groups.T,
                                        mask=(groups ^ 1).T)
    mean_of_mu_star = np.ma.mean(mu_star_masked, axis=1)

    return mean_of_mu_star
def _compute_grouped_metric ( ungrouped_metric : np . ndarray , groups : np . ndarray ) -> np . ndarray : groups = np . array ( groups , dtype = bool ) mu_star_masked = np . ma . masked_array ( ungrouped_metric * groups . T , mask = ( groups ^ 1 ) . T ) mean_of_mu_star = np . ma . mean ( mu_star_masked , axis = 1 ) return mean_of_mu_star