<commit_before>import gc
import opcode
import inspect
import numpy as np

from autodiff.compat import OrderedDict, getcallargs

#import theano
#from theano.sandbox.cuda import cuda_ndarray
#cuda_ndarray = cuda_ndarray.cuda_ndarray


def _int(i):
    """
    CPython caches small ints (-5 <= i <= 256), so they share ids and can not
    be differentiated. NumPy int classes do not get cached, so two variables
    with the same _int value will have different ids.
    """
    return np.int(i)


def orderedcallargs(fn, *args, **kwargs):
    """
    Returns an OrderedDictionary containing the names and values of a
    function's arguments. The arguments are ordered according to the function's
    argspec:
        1. named arguments
        2. variable positional argument
        3. variable keyword argument
    """
    callargs = getcallargs(fn, *args, **kwargs)<commit_msg>BUG: int_ not int<commit_after>import gc
import opcode
import inspect
import numpy as np

from autodiff.compat import OrderedDict, getcallargs

#import theano
#from theano.sandbox.cuda import cuda_ndarray
#cuda_ndarray = cuda_ndarray.cuda_ndarray


def _int(i):
    """
    CPython caches small ints (-5 <= i <= 256), so they share ids and can not
    be differentiated. NumPy int classes do not get cached, so two variables
    with the same _int value will have different ids.
    """
    return np.int_(i)


def orderedcallargs(fn, *args, **kwargs):
    """
    Returns an OrderedDictionary containing the names and values of a
    function's arguments. The arguments are ordered according to the function's
    argspec:
        1. named arguments
        2. variable positional argument
        3. variable keyword argument
    """
    callargs = getcallargs(fn, *args, **kwargs)
{'fraction_non_alphanumeric': 0.07325383304940375, 'fraction_numerical': 0.007950028392958546, 'mean_word_length': 3.383084577114428, 'pattern_counts': {'":': 0, '<': 7, '<?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': '1728700', 'n_tokens_mistral': 526, 'n_tokens_neox': 504, 'n_words': 206}