<commit_before>
# find outliers based on DVARS and FD

def outlier(data, bound):
    '''
    Input:
        data: array of values
        bound: threshold for outliers
    
    Output:
        indices of outliers
    '''
    outlier = []
    # set outlier values to 0
    for i in data:
        if i <= bound:
            outlier.append(0)
        else:
            outlier.append(i)
    # find outlier indices
    outlier_indices = np.nonzero(outlier)
    return outlier_indices
<commit_msg>update function and comment<commit_after>
# find outliers based on DVARS and FD

def outlier(data, bound):
    '''
    Input:
        data: array of values
        bound: threshold for outliers
    
    Output:
        indices of outliers
    '''
    outlier = []
    # set nonoutlier values to 0, outliers to nonzero
    for i in data:
        if i <= bound:
            outlier.append(0)
        else:
            outlier.append(i)
    # find outlier indices
    outlier_indices = np.nonzero(outlier)
    return outlier_indices

{'fraction_non_alphanumeric': 0.07534246575342465, 'fraction_numerical': 0.003913894324853229, 'mean_word_length': 1.9652173913043478, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2825973', 'n_tokens_mistral': 336, 'n_tokens_neox': 296, 'n_words': 100}