def get_center_indices(data, centers):
    """
    Outputs the indices of the given centroids in the original dataset.
    In case multiple similar arrays are present in the dataset, the first
    match is returned. Required since K++ initializer outputs the 
    actual centroid arrays while the kmedoids implementation needs indices.
    
    data: input matrix, list of arrays
    centroids: list of centroid arrays
    
    """
    indices = list()
    for medoid in centers:
        indices.append([i for i, m in enumerate(data) if list(m) == list(medoid)][0])
    return indices