numpy  2.0.0
_tagPyUFuncObject Struct Reference

#include <ufuncobject.h>

Data Fields

PyObject_HEAD int nin
PyObject_HEAD int nout
PyObject_HEAD int nargs
int identity
PyUFuncGenericFunctionfunctions
void ** data
int ntypes
int reserved1
const char * name
char * types
const char * doc
void * ptr
PyObject * obj
PyObject * userloops
int core_enabled
int core_num_dim_ix
int * core_num_dims
int * core_dim_ixs
int * core_offsets
char * core_signature
PyUFunc_TypeResolutionFunctype_resolver
PyUFunc_LegacyInnerLoopSelectionFunclegacy_inner_loop_selector
void * reserved2
PyUFunc_MaskedInnerLoopSelectionFuncmasked_inner_loop_selector
npy_uint32 * op_flags
npy_uint32 iter_flags

Field Documentation

dimension indices in a flatted form; indices are in the range of [0,core_num_dim_ix)
generalized ufunc parameters
0 for scalar ufunc; 1 for generalized ufunc
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]
numbers of core dimensions of each argument
positions of 1st core dimensions of each argument in core_dim_ixs
signature string for printing purpose
Array of funcdata that gets passed into the functions

Referenced by object_ufunc_loop_selector().

Documentation string
Array of one-dimensional core loops

Referenced by object_ufunc_loop_selector().

Identity for reduction, either PyUFunc_One or PyUFunc_Zero
List of global flags used when ufunc is called by nditer object. These flags will be used in addition to the default global flags set by nditer object.
A function which returns an inner loop written for NumPy 1.6 and earlier ufuncs. This is for backwards compatibility, and may be NULL if inner_loop_selector is specified.

Referenced by prepare_ufunc_output().

A function which returns a masked inner loop for the ufunc.
PyObject_HEAD int _tagPyUFuncObject::nargs
PyObject_HEAD int _tagPyUFuncObject::nin
nin: Number of inputs nout: Number of outputs nargs: Always nin + nout (Why is it stored?)

Referenced by object_ufunc_type_resolver(), prepare_ufunc_output(), PyUFunc_DefaultTypeResolver(), and PyUFunc_ValidateCasting().

The number of elements in 'functions' and 'data'
List of flags for each operand when ufunc is called by nditer object. These flags will be used in addition to the default flags for each operand set by nditer object.

Referenced by check_for_trivial_loop().

Used to be unused field 'check_return'
This was blocked off to be the "new" inner loop selector in 1.7, but this was never implemented. (This is also why the above selector is called the "legacy" selector.)
A function which resolves the types and fills an array with the dtypes for the inputs and outputs.
Array of type numbers, of size ('nargs' * 'ntypes')

The documentation for this struct was generated from the following file: