def compute_min_max_variances(variances, n_variances=10):
    """
    Compute the indexes with highest and lowest variances
    """
    max_variances = variances.argsort()[-n_variances:][::-1]
    min_variances = variances.argsort()[:n_variances]
    return max_variances, min_variances