<commit_before>#ifndef Py_UFUNCOBJECT_H
#define Py_UFUNCOBJECT_H
#ifdef __cplusplus
extern "C" {
#endif

typedef void (*PyUFuncGenericFunction) (char **, npy_intp *, npy_intp *, void *);

typedef struct {
        PyObject_HEAD
        int nin, nout, nargs;
        int identity;
        PyUFuncGenericFunction *functions;
        void **data;
        int ntypes;
        int check_return;
        char *name, *types;
        char *doc;
        void *ptr;
        PyObject *obj;
        PyObject *userloops;
    
        /* generalized ufunc */
        int core_enabled;      /* 0 for scalar ufunc; 1 for generalized ufunc */
        int core_num_dim_ix;   /* number of distinct dimension names in
                                  signature */
 
        /* dimension indices of input/output argument k are stored in
           core_dim_ixs[core_offsets[k]..core_offsets[k]+core_num_dims[k]-1] */
        int *core_num_dims;    /* numbers of core dimensions of each argument */
        int *core_dim_ixs;     /* dimension indices in a flatted form; indices
                                  are in the range of [0,core_num_dim_ix) */
        int *core_offsets;     /* positions of 1st core dimensions of each
                                  argument in core_dim_ixs */
        char *core_signature;  /* signature string for printing purpose */
} PyUFuncObject;

#include "arrayobject.h"

#define UFUNC_ERR_IGNORE 0
#define UFUNC_ERR_WARN   1
#define UFUNC_ERR_RAISE  2
#define UFUNC_ERR_CALL   3
#define UFUNC_ERR_PRINT  4
#define UFUNC_ERR_LOG    5

        /* Python side integer mask */

#define UFUNC_MASK_DIVIDEBYZERO 0x07
#define UFUNC_MASK_OVERFLOW 0x3f
#define UFUNC_MASK_UNDERFLOW 0x1ff
#define UFUNC_MASK_INVALID 0xfff

#define UFUNC_SHIFT_DIVIDEBYZERO 0
#define UFUNC_SHIFT_OVERFLOW     3
#define UFUNC_SHIFT_UNDERFLOW    6
#define UFUNC_SHIFT_INVALID      9


/* platform-dependent code translates floating point
   status to an integer sum of these values
*/
#define UFUNC_FPE_DIVIDEBYZERO  1
#define UFUNC_FPE_OVERFLOW      2
#define UFUNC_FPE_UNDERFLOW     4
#define UFUNC_FPE_INVALID       8

#define UFUNC_ERR_DEFAULT  0      /* Error mode that avoids look-up (no checking) */

#define UFUNC_OBJ_ISOBJECT      1
#define UFUNC_OBJ_NEEDS_API     2

   /* Default user error mode */
#define UFUNC_ERR_DEFAULT2                               \
        (UFUNC_ERR_PRINT << UFUNC_SHIFT_DIVIDEBYZERO) +  \
        (UFUNC_ERR_PRINT << UFUNC_SHIFT_OVERFLOW) +      \
        (UFUNC_ERR_PRINT << UFUNC_SHIFT_INVALID)

        /* Only internal -- not exported, yet*/
typedef struct {
        /* Multi-iterator portion --- needs to be present in this order
           to work with PyArray_Broadcast */
        /* DANGER - this must be in sync with multi-interator structure in ndarraytypes.h */
        PyObject_HEAD
        int magic_number;            /* Initialized to NPY_VALID_MAGIC initialization and NPY_INVALID_MAGIC on dealloc */
        int  numiter;
        npy_intp size;
        npy_intp index;
        int nd;
        npy_intp dimensions[NPY_MAXDIMS];
        PyArrayIterObject *iters[NPY_MAXARGS];
        /*  End of Multi-iterator portion */

        /* The ufunc */
        PyUFuncObject *ufunc;

        /* The error handling */
        int errormask;         /* Integer showing desired error handling */
        PyObject *errobj;      /* currently a tuple with
                                  (string, func or obj with write method or None)
                               */
        int first;

        /* Specific function and data to use */
        PyUFuncGenericFunction function;
        void *funcdata;

        /* Loop method */
        int meth;

        /* Whether we need to copy to a buffer or not.*/<commit_msg>Make the multiiter a field in the ufunc loop instead of matching the layout.<commit_after>#ifndef Py_UFUNCOBJECT_H
#define Py_UFUNCOBJECT_H
#ifdef __cplusplus
extern "C" {
#endif

typedef void (*PyUFuncGenericFunction) (char **, npy_intp *, npy_intp *, void *);

typedef struct {
        PyObject_HEAD
        int nin, nout, nargs;
        int identity;
        PyUFuncGenericFunction *functions;
        void **data;
        int ntypes;
        int check_return;
        char *name, *types;
        char *doc;
        void *ptr;
        PyObject *obj;
        PyObject *userloops;
    
        /* generalized ufunc */
        int core_enabled;      /* 0 for scalar ufunc; 1 for generalized ufunc */
        int core_num_dim_ix;   /* number of distinct dimension names in
                                  signature */
 
        /* dimension indices of input/output argument k are stored in
           core_dim_ixs[core_offsets[k]..core_offsets[k]+core_num_dims[k]-1] */
        int *core_num_dims;    /* numbers of core dimensions of each argument */
        int *core_dim_ixs;     /* dimension indices in a flatted form; indices
                                  are in the range of [0,core_num_dim_ix) */
        int *core_offsets;     /* positions of 1st core dimensions of each
                                  argument in core_dim_ixs */
        char *core_signature;  /* signature string for printing purpose */
} PyUFuncObject;

#include "arrayobject.h"

#define UFUNC_ERR_IGNORE 0
#define UFUNC_ERR_WARN   1
#define UFUNC_ERR_RAISE  2
#define UFUNC_ERR_CALL   3
#define UFUNC_ERR_PRINT  4
#define UFUNC_ERR_LOG    5

        /* Python side integer mask */

#define UFUNC_MASK_DIVIDEBYZERO 0x07
#define UFUNC_MASK_OVERFLOW 0x3f
#define UFUNC_MASK_UNDERFLOW 0x1ff
#define UFUNC_MASK_INVALID 0xfff

#define UFUNC_SHIFT_DIVIDEBYZERO 0
#define UFUNC_SHIFT_OVERFLOW     3
#define UFUNC_SHIFT_UNDERFLOW    6
#define UFUNC_SHIFT_INVALID      9


/* platform-dependent code translates floating point
   status to an integer sum of these values
*/
#define UFUNC_FPE_DIVIDEBYZERO  1
#define UFUNC_FPE_OVERFLOW      2
#define UFUNC_FPE_UNDERFLOW     4
#define UFUNC_FPE_INVALID       8

#define UFUNC_ERR_DEFAULT  0      /* Error mode that avoids look-up (no checking) */

#define UFUNC_OBJ_ISOBJECT      1
#define UFUNC_OBJ_NEEDS_API     2

   /* Default user error mode */
#define UFUNC_ERR_DEFAULT2                               \
        (UFUNC_ERR_PRINT << UFUNC_SHIFT_DIVIDEBYZERO) +  \
        (UFUNC_ERR_PRINT << UFUNC_SHIFT_OVERFLOW) +      \
        (UFUNC_ERR_PRINT << UFUNC_SHIFT_INVALID)

        /* Only internal -- not exported, yet*/
typedef struct PyUFuncLoopObject {
        /* Multi-iterator portion --- needs to be present in this order
           to work with PyArray_Broadcast */
        PyObject_HEAD

	/* The iterators. */
	struct NpyArrayMultiIter *iter;

        /* The ufunc */
        PyUFuncObject *ufunc;

        /* The error handling */
        int errormask;         /* Integer showing desired error handling */
        PyObject *errobj;      /* currently a tuple with
                                  (string, func or obj with write method or None)
                               */
        int first;

        /* Specific function and data to use */
        PyUFuncGenericFunction function;
        void *funcdata;

        /* Loop method */
        int meth;

        /* Whether we need to copy to a buffer or not.*/
{'fraction_non_alphanumeric': 0.06917627448256702, 'fraction_numerical': 0.008612307264897902, 'mean_word_length': 2.1358885017421603, 'pattern_counts': {'":': 0, '<': 15, '<?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': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3001309', 'n_tokens_mistral': 2218, 'n_tokens_neox': 2138, 'n_words': 647}