def __get_f_from_idx(idx, f):
    """
    Returns the value of f from the index
    
    Parameters
    ----------
    
    idx: array 
        array with indices for which frequencies are required
        
    Returns
    -------
    f: array
        array with frequencies corresponding to idx
    
    """

    return [f[i] for i in idx]