<commit_before>"""Here we define the exported functions, types, etc... which need to be
exported through a global C pointer.

Each dictionary contains name -> index pair.

Whenever you change one index, you break the ABI (and the ABI version number
should be incremented). Whenever you add an item to one of the dict, the API
needs to be updated.

When adding a function, make sure to use the next integer not used as an index
(in case you use an existing index or jump, the build will stop and raise an
exception, so it should hopefully not get unnoticed).
"""

multiarray_global_vars = {
    'NPY_NUMUSERTYPES':             7,
    'NPY_DEFAULT_ASSIGN_CASTING':   292,
}

multiarray_global_vars_types = {
    'NPY_NUMUSERTYPES':             'int',
    'NPY_DEFAULT_ASSIGN_CASTING':   'NPY_CASTING',
}

multiarray_scalar_bool_values = {
    '_PyArrayScalar_BoolValues':    9
}

multiarray_types_api = {
    'PyBigArray_Type':                  1,
    'PyArray_Type':                     2,
    'PyArrayDescr_Type':                3,
    'PyArrayFlags_Type':                4,
    'PyArrayIter_Type':                 5,
    'PyArrayMultiIter_Type':            6,
    'PyBoolArrType_Type':               8,
    'PyGenericArrType_Type':            10,
    'PyNumberArrType_Type':             11,
    'PyIntegerArrType_Type':            12,
    'PySignedIntegerArrType_Type':      13,
    'PyUnsignedIntegerArrType_Type':    14,
    'PyInexactArrType_Type':            15,
    'PyFloatingArrType_Type':           16,
    'PyComplexFloatingArrType_Type':    17,
    'PyFlexibleArrType_Type':           18,
    'PyCharacterArrType_Type':          19,
    'PyByteArrType_Type':               20,
    'PyShortArrType_Type':              21,
    'PyIntArrType_Type':                22,
    'PyLongArrType_Type':               23,
    'PyLongLongArrType_Type':           24,
    'PyUByteArrType_Type':              25,
    'PyUShortArrType_Type':             26,
    'PyUIntArrType_Type':               27,
    'PyULongArrType_Type':              28,
    'PyULongLongArrType_Type':          29,
    'PyFloatArrType_Type':              30,
    'PyDoubleArrType_Type':             31,
    'PyLongDoubleArrType_Type':         32,
    'PyCFloatArrType_Type':             33,
    'PyCDoubleArrType_Type':            34,
    'PyCLongDoubleArrType_Type':        35,
    'PyObjectArrType_Type':             36,
    'PyStringArrType_Type':             37,
    'PyUnicodeArrType_Type':            38,
    'PyVoidArrType_Type':               39,
    # End 1.5 API
    'PyTimeIntegerArrType_Type':        214,
    'PyDatetimeArrType_Type':           215,
    'PyTimedeltaArrType_Type':          216,
    'PyHalfArrType_Type':               217,
    'NpyIter_Type':                     218,
    # End 1.6 API
    'PyArrayMapIter_Type':              295,
}

#define NPY_NUMUSERTYPES (*(int *)PyArray_API[6])
#define PyBoolArrType_Type (*(PyTypeObject *)PyArray_API[7])
#define _PyArrayScalar_BoolValues ((PyBoolScalarObject *)PyArray_API[8])

multiarray_funcs_api = {
    'PyArray_GetNDArrayCVersion':           0,
    'PyArray_SetNumericOps':                40,
    'PyArray_GetNumericOps':                41,
    'PyArray_INCREF':                       42,
    'PyArray_XDECREF':                      43,
    'PyArray_SetStringFunction':            44,
    'PyArray_DescrFromType':                45,
    'PyArray_TypeObjectFromType':           46,
    'PyArray_Zero':                         47,
    'PyArray_One':                          48,
    'PyArray_CastToType':                   49,
    'PyArray_CastTo':                       50,
    'PyArray_CastAnyTo':                    51,
    'PyArray_CanCastSafely':                52,
    'PyArray_CanCastTo':                    53,<commit_msg>removed expsure of mapiter type<commit_after>"""Here we define the exported functions, types, etc... which need to be
exported through a global C pointer.

Each dictionary contains name -> index pair.

Whenever you change one index, you break the ABI (and the ABI version number
should be incremented). Whenever you add an item to one of the dict, the API
needs to be updated.

When adding a function, make sure to use the next integer not used as an index
(in case you use an existing index or jump, the build will stop and raise an
exception, so it should hopefully not get unnoticed).
"""

multiarray_global_vars = {
    'NPY_NUMUSERTYPES':             7,
    'NPY_DEFAULT_ASSIGN_CASTING':   292,
}

multiarray_global_vars_types = {
    'NPY_NUMUSERTYPES':             'int',
    'NPY_DEFAULT_ASSIGN_CASTING':   'NPY_CASTING',
}

multiarray_scalar_bool_values = {
    '_PyArrayScalar_BoolValues':    9
}

multiarray_types_api = {
    'PyBigArray_Type':                  1,
    'PyArray_Type':                     2,
    'PyArrayDescr_Type':                3,
    'PyArrayFlags_Type':                4,
    'PyArrayIter_Type':                 5,
    'PyArrayMultiIter_Type':            6,
    'PyBoolArrType_Type':               8,
    'PyGenericArrType_Type':            10,
    'PyNumberArrType_Type':             11,
    'PyIntegerArrType_Type':            12,
    'PySignedIntegerArrType_Type':      13,
    'PyUnsignedIntegerArrType_Type':    14,
    'PyInexactArrType_Type':            15,
    'PyFloatingArrType_Type':           16,
    'PyComplexFloatingArrType_Type':    17,
    'PyFlexibleArrType_Type':           18,
    'PyCharacterArrType_Type':          19,
    'PyByteArrType_Type':               20,
    'PyShortArrType_Type':              21,
    'PyIntArrType_Type':                22,
    'PyLongArrType_Type':               23,
    'PyLongLongArrType_Type':           24,
    'PyUByteArrType_Type':              25,
    'PyUShortArrType_Type':             26,
    'PyUIntArrType_Type':               27,
    'PyULongArrType_Type':              28,
    'PyULongLongArrType_Type':          29,
    'PyFloatArrType_Type':              30,
    'PyDoubleArrType_Type':             31,
    'PyLongDoubleArrType_Type':         32,
    'PyCFloatArrType_Type':             33,
    'PyCDoubleArrType_Type':            34,
    'PyCLongDoubleArrType_Type':        35,
    'PyObjectArrType_Type':             36,
    'PyStringArrType_Type':             37,
    'PyUnicodeArrType_Type':            38,
    'PyVoidArrType_Type':               39,
    # End 1.5 API
    'PyTimeIntegerArrType_Type':        214,
    'PyDatetimeArrType_Type':           215,
    'PyTimedeltaArrType_Type':          216,
    'PyHalfArrType_Type':               217,
    'NpyIter_Type':                     218,
    # End 1.6 API
}

#define NPY_NUMUSERTYPES (*(int *)PyArray_API[6])
#define PyBoolArrType_Type (*(PyTypeObject *)PyArray_API[7])
#define _PyArrayScalar_BoolValues ((PyBoolScalarObject *)PyArray_API[8])

multiarray_funcs_api = {
    'PyArray_GetNDArrayCVersion':           0,
    'PyArray_SetNumericOps':                40,
    'PyArray_GetNumericOps':                41,
    'PyArray_INCREF':                       42,
    'PyArray_XDECREF':                      43,
    'PyArray_SetStringFunction':            44,
    'PyArray_DescrFromType':                45,
    'PyArray_TypeObjectFromType':           46,
    'PyArray_Zero':                         47,
    'PyArray_One':                          48,
    'PyArray_CastToType':                   49,
    'PyArray_CastTo':                       50,
    'PyArray_CastAnyTo':                    51,
    'PyArray_CanCastSafely':                52,
    'PyArray_CanCastTo':                    53,
{'fraction_non_alphanumeric': 0.08697965154940816, 'fraction_numerical': 0.03311610586514164, 'mean_word_length': 1.8207051762940736, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4612358', 'n_tokens_mistral': 2447, 'n_tokens_neox': 2293, 'n_words': 493}