<commit_before><commit_msg>Move decorators to special file<commit_after>import afnumpy

def outufunc(func):
    def wrapper(*args, **kws):
        out = kws.pop('out', None)
        ret = func(*args, **kws)
        if out is not None:
            out[:] = ret
        return ret
    return wrapper

def iufunc(func):
    def wrapper(*args, **kws):
        if all(isinstance(A, afnumpy.ndarray) for A in args):
            bcast_args = afnumpy.broadcast_arrays(*args)
            if(bcast_args[0].shape is not args[0].shape):
                raise ValueError("non-broadcastable output operand with"
                                 " shape %s doesn't match the broadcast"
                                 " shape %s" % (args[0].shape, bcast_args[0].shape))
            args = bcast_args
            
        return func(*args, **kws)
    return wrapper

def ufunc(func):
    def wrapper(*args, **kws):
        if all(isinstance(A, afnumpy.ndarray) for A in args):
            args = afnumpy.broadcast_arrays(*args)            
        return func(*args, **kws)
    return wrapper
{'fraction_non_alphanumeric': 0.11410018552875696, 'fraction_numerical': 0.0037105751391465678, 'mean_word_length': 1.9642857142857142, 'pattern_counts': {'":': 0, '<': 3, '<?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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5484590', 'n_tokens_mistral': 326, 'n_tokens_neox': 323, 'n_words': 87}