src/estimagic/inference/bootstrap_samples.py
def _convert_cluster_ids_to_indices(cluster_col, drawn_clusters):
    """Convert the drawn clusters to positional indices of individual observations.

    Args:
        cluster_col (pandas.Series):

    """
    bootstrap_indices = []
    cluster_to_locs = pd.Series(np.arange(len(cluster_col)), index=cluster_col)
    for draw in drawn_clusters:
        bootstrap_indices.append(cluster_to_locs[draw].to_numpy())
    return bootstrap_indices
Convert the drawn clusters to positional indices of individual observations.

    Args:
        cluster_col (pandas.Series):

    
Convert the drawn clusters to positional indices of individual observations.
Convert the drawn clusters to positional indices of individual observations .
def _convert_cluster_ids_to_indices(cluster_col, drawn_clusters):
    bootstrap_indices = []
    cluster_to_locs = pd.Series(np.arange(len(cluster_col)), index=cluster_col)
    for draw in drawn_clusters:
        bootstrap_indices.append(cluster_to_locs[draw].to_numpy())
    return bootstrap_indices
def _convert_cluster_ids_to_indices ( cluster_col , drawn_clusters ) : bootstrap_indices = [ ] cluster_to_locs = pd . Series ( np . arange ( len ( cluster_col ) ) , index = cluster_col ) for draw in drawn_clusters : bootstrap_indices . append ( cluster_to_locs [ draw ] . to_numpy ( ) ) return bootstrap_indices
Convert the drawn clusters to positional indices of individual observations.
Convert the drawn clusters to positional indices of individual observations .
"""Convert the drawn clusters to positional indices of individual observations.

    Args:
        cluster_col (pandas.Series):

    """
cluster_col
None
drawn_clusters