numpy
2.0.0
|
#include "Python.h"
#include "npy_config.h"
#include "npy_pycompat.h"
#include "numpy/arrayobject.h"
#include "numpy/ufuncobject.h"
#include "numpy/arrayscalars.h"
#include "lowlevel_strided_loops.h"
#include "ufunc_type_resolution.h"
#include "reduction.h"
#include "ufunc_object.h"
#include "ufunc_override.h"
Data Structures | |
struct | _simple_cobj |
Defines | |
#define | _UMATHMODULE |
#define | NPY_NO_DEPRECATED_API NPY_API_VERSION |
#define | PY_ARRAY_UNIQUE_SYMBOL _npy_umathmodule_ARRAY_API |
#define | NO_IMPORT_ARRAY |
#define | NPY_UF_DBG_TRACING 0 |
#define | NPY_UF_DBG_PRINT(s) |
#define | NPY_UF_DBG_PRINT1(s, p1) |
#define | NPY_UF_DBG_PRINT2(s, p1, p2) |
#define | NPY_UF_DBG_PRINT3(s, p1, p2, p3) |
#define | USE_USE_DEFAULTS 1 |
#define | HANDLEIT(NAME, str) |
#define | _SETCPTR(cobj, val) ((_simple_cobj *)(cobj))->c_obj = (val) |
Functions | |
static int | _does_loop_use_arrays (void *data) |
static int | _extract_pyvals (PyObject *ref, const char *name, int *bufsize, int *errmask, PyObject **errobj) |
static int | assign_reduce_identity_zero (PyArrayObject *result, void *data) |
static int | assign_reduce_identity_minusone (PyArrayObject *result, void *data) |
static int | assign_reduce_identity_one (PyArrayObject *result, void *data) |
static int | _error_handler (int method, PyObject *errobj, char *errtype, int retstatus, int *first) |
NPY_NO_EXPORT int | PyUFunc_getfperr (void) |
NPY_NO_EXPORT int | PyUFunc_handlefperr (int errmask, PyObject *errobj, int retstatus, int *first) |
NPY_NO_EXPORT int | PyUFunc_checkfperr (int errmask, PyObject *errobj, int *first) |
NPY_NO_EXPORT void | PyUFunc_clearfperr () |
static PyObject * | get_global_ext_obj (void) |
static int | _get_bufsize_errmask (PyObject *extobj, const char *ufunc_name, int *buffersize, int *errormask) |
static void | _find_array_prepare (PyObject *args, PyObject *kwds, PyObject **output_prep, int nin, int nout, int check_subok) |
NPY_NO_EXPORT int | PyUFunc_GetPyValues (char *name, int *bufsize, int *errmask, PyObject **errobj) |
static int | _next_non_white_space (const char *str, int offset) |
static int | _is_alpha_underscore (char ch) |
static int | _is_alnum_underscore (char ch) |
static int | _get_end_of_name (const char *str, int offset) |
static int | _is_same_name (const char *s1, const char *s2) |
static int | _parse_signature (PyUFuncObject *ufunc, const char *signature) |
static int | _set_out_array (PyObject *obj, PyArrayObject **store) |
static int | get_ufunc_arguments (PyUFuncObject *ufunc, PyObject *args, PyObject *kwds, PyArrayObject **out_op, NPY_ORDER *out_order, NPY_CASTING *out_casting, PyObject **out_extobj, PyObject **out_typetup, int *out_subok, PyArrayObject **out_wheremask) |
static int | check_for_trivial_loop (PyUFuncObject *ufunc, PyArrayObject **op, PyArray_Descr **dtype, npy_intp buffersize) |
static void | trivial_two_operand_loop (PyArrayObject **op, PyUFuncGenericFunction innerloop, void *innerloopdata) |
static void | trivial_three_operand_loop (PyArrayObject **op, PyUFuncGenericFunction innerloop, void *innerloopdata) |
static int | prepare_ufunc_output (PyUFuncObject *ufunc, PyArrayObject **op, PyObject *arr_prep, PyObject *arr_prep_args, int i) |
static int | iterator_loop (PyUFuncObject *ufunc, PyArrayObject **op, PyArray_Descr **dtype, NPY_ORDER order, npy_intp buffersize, PyObject **arr_prep, PyObject *arr_prep_args, PyUFuncGenericFunction innerloop, void *innerloopdata) |
static int | execute_legacy_ufunc_loop (PyUFuncObject *ufunc, int trivial_loop_ok, PyArrayObject **op, PyArray_Descr **dtypes, NPY_ORDER order, npy_intp buffersize, PyObject **arr_prep, PyObject *arr_prep_args) |
static int | execute_fancy_ufunc_loop (PyUFuncObject *ufunc, PyArrayObject *wheremask, PyArrayObject **op, PyArray_Descr **dtypes, NPY_ORDER order, npy_intp buffersize, PyObject **arr_prep, PyObject *arr_prep_args) |
static PyObject * | make_arr_prep_args (npy_intp nin, PyObject *args, PyObject *kwds) |
static int | _check_ufunc_fperr (int errmask, PyObject *extobj, const char *ufunc_name) |
static int | PyUFunc_GeneralizedFunction (PyUFuncObject *ufunc, PyObject *args, PyObject *kwds, PyArrayObject **op) |
NPY_NO_EXPORT int | PyUFunc_GenericFunction (PyUFuncObject *ufunc, PyObject *args, PyObject *kwds, PyArrayObject **op) |
static int | get_binary_op_function (PyUFuncObject *ufunc, int *otype, PyUFuncGenericFunction *out_innerloop, void **out_innerloopdata) |
static int | reduce_type_resolver (PyUFuncObject *ufunc, PyArrayObject *arr, PyArray_Descr *odtype, PyArray_Descr **out_dtype) |
static int | assign_reduce_identity_zero (PyArrayObject *result, void *NPY_UNUSED(data)) |
static int | assign_reduce_identity_one (PyArrayObject *result, void *NPY_UNUSED(data)) |
static int | assign_reduce_identity_minusone (PyArrayObject *result, void *NPY_UNUSED(data)) |
static int | reduce_loop (NpyIter *iter, char **dataptrs, npy_intp *strides, npy_intp *countptr, NpyIter_IterNextFunc *iternext, int needs_api, npy_intp skip_first_count, void *data) |
static PyArrayObject * | PyUFunc_Reduce (PyUFuncObject *ufunc, PyArrayObject *arr, PyArrayObject *out, int naxes, int *axes, PyArray_Descr *odtype, int keepdims) |
static PyObject * | PyUFunc_Accumulate (PyUFuncObject *ufunc, PyArrayObject *arr, PyArrayObject *out, int axis, int otype) |
static PyObject * | PyUFunc_Reduceat (PyUFuncObject *ufunc, PyArrayObject *arr, PyArrayObject *ind, PyArrayObject *out, int axis, int otype) |
static PyObject * | PyUFunc_GenericReduction (PyUFuncObject *ufunc, PyObject *args, PyObject *kwds, int operation) |
static PyObject * | _get_out_wrap (PyObject *out, PyObject *wrap) |
static void | _find_array_wrap (PyObject *args, PyObject *kwds, PyObject **output_wrap, int nin, int nout) |
static PyObject * | ufunc_generic_call (PyUFuncObject *ufunc, PyObject *args, PyObject *kwds) |
NPY_NO_EXPORT PyObject * | ufunc_geterr (PyObject *NPY_UNUSED(dummy), PyObject *args) |
static int | ufunc_update_use_defaults (void) |
NPY_NO_EXPORT PyObject * | ufunc_seterr (PyObject *NPY_UNUSED(dummy), PyObject *args) |
NPY_NO_EXPORT int | PyUFunc_ReplaceLoopBySignature (PyUFuncObject *func, PyUFuncGenericFunction newfunc, int *signature, PyUFuncGenericFunction *oldfunc) |
NPY_NO_EXPORT PyObject * | PyUFunc_FromFuncAndData (PyUFuncGenericFunction *func, void **data, char *types, int ntypes, int nin, int nout, int identity, const char *name, const char *doc, int unused) |
NPY_NO_EXPORT PyObject * | PyUFunc_FromFuncAndDataAndSignature (PyUFuncGenericFunction *func, void **data, char *types, int ntypes, int nin, int nout, int identity, const char *name, const char *doc, int unused, const char *signature) |
NPY_NO_EXPORT int | PyUFunc_SetUsesArraysAsData (void **data, size_t i) |
static int | cmp_arg_types (int *arg1, int *arg2, int n) |
static NPY_INLINE void | _free_loop1d_list (PyUFunc_Loop1d *data) |
static void | _loop1d_list_free (void *ptr) |
NPY_NO_EXPORT int | PyUFunc_RegisterLoopForDescr (PyUFuncObject *ufunc, PyArray_Descr *user_dtype, PyUFuncGenericFunction function, PyArray_Descr **arg_dtypes, void *data) |
NPY_NO_EXPORT int | PyUFunc_RegisterLoopForType (PyUFuncObject *ufunc, int usertype, PyUFuncGenericFunction function, int *arg_types, void *data) |
static void | ufunc_dealloc (PyUFuncObject *ufunc) |
static PyObject * | ufunc_repr (PyUFuncObject *ufunc) |
static PyObject * | ufunc_outer (PyUFuncObject *ufunc, PyObject *args, PyObject *kwds) |
static PyObject * | ufunc_reduce (PyUFuncObject *ufunc, PyObject *args, PyObject *kwds) |
static PyObject * | ufunc_accumulate (PyUFuncObject *ufunc, PyObject *args, PyObject *kwds) |
static PyObject * | ufunc_reduceat (PyUFuncObject *ufunc, PyObject *args, PyObject *kwds) |
static NPY_INLINE PyArrayObject * | new_array_op (PyArrayObject *op_array, char *data) |
static PyObject * | ufunc_at (PyUFuncObject *ufunc, PyObject *args) |
static PyObject * | _makeargs (int num, char *ltr, int null_if_none) |
static char | _typecharfromnum (int num) |
static PyObject * | ufunc_get_doc (PyUFuncObject *ufunc) |
static PyObject * | ufunc_get_nin (PyUFuncObject *ufunc) |
static PyObject * | ufunc_get_nout (PyUFuncObject *ufunc) |
static PyObject * | ufunc_get_nargs (PyUFuncObject *ufunc) |
static PyObject * | ufunc_get_ntypes (PyUFuncObject *ufunc) |
static PyObject * | ufunc_get_types (PyUFuncObject *ufunc) |
static PyObject * | ufunc_get_name (PyUFuncObject *ufunc) |
static PyObject * | ufunc_get_identity (PyUFuncObject *ufunc) |
static PyObject * | ufunc_get_signature (PyUFuncObject *ufunc) |
Variables | |
static int | PyUFunc_NUM_NODEFAULTS = 0 |
static struct PyMethodDef | ufunc_methods [] |
static PyGetSetDef | ufunc_getset [] |
NPY_NO_EXPORT PyTypeObject | PyUFunc_Type |
#define _SETCPTR | ( | cobj, | |
val | |||
) | ((_simple_cobj *)(cobj))->c_obj = (val) |
#define _UMATHMODULE |
#define HANDLEIT | ( | NAME, | |
str | |||
) |
{if (retstatus & NPY_FPE_##NAME) { \ handle = errmask & UFUNC_MASK_##NAME; \ if (handle && \ _error_handler(handle >> UFUNC_SHIFT_##NAME, \ errobj, str, retstatus, first) < 0) \ return -1; \ }}
#define NO_IMPORT_ARRAY |
#define NPY_NO_DEPRECATED_API NPY_API_VERSION |
#define NPY_UF_DBG_PRINT | ( | s | ) |
Referenced by prepare_ufunc_output().
#define NPY_UF_DBG_PRINT1 | ( | s, | |
p1 | |||
) |
Referenced by assign_reduce_identity_zero().
#define NPY_UF_DBG_PRINT2 | ( | s, | |
p1, | |||
p2 | |||
) |
#define NPY_UF_DBG_PRINT3 | ( | s, | |
p1, | |||
p2, | |||
p3 | |||
) |
#define NPY_UF_DBG_TRACING 0 |
#define PY_ARRAY_UNIQUE_SYMBOL _npy_umathmodule_ARRAY_API |
#define USE_USE_DEFAULTS 1 |
static int _check_ufunc_fperr | ( | int | errmask, |
PyObject * | extobj, | ||
const char * | ufunc_name | ||
) | [static] |
errmask: mask of status to check
may be null, in which case the thread global one is fetched
ufunc_name: name of ufunc
static int _does_loop_use_arrays | ( | void * | data | ) | [static] |
Referenced by prepare_ufunc_output().
static int _error_handler | ( | int | method, |
PyObject * | errobj, | ||
char * | errtype, | ||
int | retstatus, | ||
int * | first | ||
) | [static] |
static int _extract_pyvals | ( | PyObject * | ref, |
const char * | name, | ||
int * | bufsize, | ||
int * | errmask, | ||
PyObject ** | errobj | ||
) | [static] |
<blockquote> if an error handling method is 'call'</blockquote>
static void _find_array_prepare | ( | PyObject * | args, |
PyObject * | kwds, | ||
PyObject ** | output_prep, | ||
int | nin, | ||
int | nout, | ||
int | check_subok | ||
) | [static] |
static void _find_array_wrap | ( | PyObject * | args, |
PyObject * | kwds, | ||
PyObject ** | output_wrap, | ||
int | nin, | ||
int | nout | ||
) | [static] |
static NPY_INLINE void _free_loop1d_list | ( | PyUFunc_Loop1d * | data | ) | [static] |
static int _get_bufsize_errmask | ( | PyObject * | extobj, |
const char * | ufunc_name, | ||
int * | buffersize, | ||
int * | errormask | ||
) | [static] |
static int _get_end_of_name | ( | const char * | str, |
int | offset | ||
) | [static] |
static PyObject* _get_out_wrap | ( | PyObject * | out, |
PyObject * | wrap | ||
) | [static] |
static int _is_alnum_underscore | ( | char | ch | ) | [static] |
References _next_non_white_space().
static int _is_alpha_underscore | ( | char | ch | ) | [static] |
static int _is_same_name | ( | const char * | s1, |
const char * | s2 | ||
) | [static] |
static void _loop1d_list_free | ( | void * | ptr | ) | [static] |
References PyArray_ITER_NEXT.
static PyObject* _makeargs | ( | int | num, |
char * | ltr, | ||
int | null_if_none | ||
) | [static] |
static int _next_non_white_space | ( | const char * | str, |
int | offset | ||
) | [static] |
Referenced by _is_alnum_underscore(), and _parse_signature().
static int _parse_signature | ( | PyUFuncObject * | ufunc, |
const char * | signature | ||
) | [static] |
<
<
<
<
References _next_non_white_space().
static int _set_out_array | ( | PyObject * | obj, |
PyArrayObject ** | store | ||
) | [static] |
References _loop1d_info::arg_dtypes, _loop1d_info::next, NpyCapsule_AsVoidPtr(), and _tagPyUFuncObject::userloops.
static char _typecharfromnum | ( | int | num | ) | [static] |
static int assign_reduce_identity_minusone | ( | PyArrayObject * | result, |
void * | data | ||
) | [static] |
static int assign_reduce_identity_minusone | ( | PyArrayObject * | result, |
void * | NPY_UNUSEDdata | ||
) | [static] |
static int assign_reduce_identity_one | ( | PyArrayObject * | result, |
void * | data | ||
) | [static] |
static int assign_reduce_identity_one | ( | PyArrayObject * | result, |
void * | NPY_UNUSEDdata | ||
) | [static] |
static int assign_reduce_identity_zero | ( | PyArrayObject * | result, |
void * | data | ||
) | [static] |
static int assign_reduce_identity_zero | ( | PyArrayObject * | result, |
void * | NPY_UNUSEDdata | ||
) | [static] |
References NPY_UF_DBG_PRINT1.
static int check_for_trivial_loop | ( | PyUFuncObject * | ufunc, |
PyArrayObject ** | op, | ||
PyArray_Descr ** | dtype, | ||
npy_intp | buffersize | ||
) | [static] |
References NPY_ITER_ALIGNED, NPY_ITER_READONLY, NPY_ITER_READWRITE, NPY_ITER_WRITEONLY, and _tagPyUFuncObject::op_flags.
static int cmp_arg_types | ( | int * | arg1, |
int * | arg2, | ||
int | n | ||
) | [static] |
References PyArrayMapIterObject::dataptr.
static int execute_fancy_ufunc_loop | ( | PyUFuncObject * | ufunc, |
PyArrayObject * | wheremask, | ||
PyArrayObject ** | op, | ||
PyArray_Descr ** | dtypes, | ||
NPY_ORDER | order, | ||
npy_intp | buffersize, | ||
PyObject ** | arr_prep, | ||
PyObject * | arr_prep_args | ||
) | [static] |
static int execute_legacy_ufunc_loop | ( | PyUFuncObject * | ufunc, |
int | trivial_loop_ok, | ||
PyArrayObject ** | op, | ||
PyArray_Descr ** | dtypes, | ||
NPY_ORDER | order, | ||
npy_intp | buffersize, | ||
PyObject ** | arr_prep, | ||
PyObject * | arr_prep_args | ||
) | [static] |
static int get_binary_op_function | ( | PyUFuncObject * | ufunc, |
int * | otype, | ||
PyUFuncGenericFunction * | out_innerloop, | ||
void ** | out_innerloopdata | ||
) | [static] |
static PyObject* get_global_ext_obj | ( | void | ) | [static] |
static int get_ufunc_arguments | ( | PyUFuncObject * | ufunc, |
PyObject * | args, | ||
PyObject * | kwds, | ||
PyArrayObject ** | out_op, | ||
NPY_ORDER * | out_order, | ||
NPY_CASTING * | out_casting, | ||
PyObject ** | out_extobj, | ||
PyObject ** | out_typetup, | ||
int * | out_subok, | ||
PyArrayObject ** | out_wheremask | ||
) | [static] |
<blockquote> Python 3: raise TypeError (hallelujah)</blockquote> </blockquote>
References DEPRECATE_FUTUREWARNING, and PyArray_NDIM.
static int iterator_loop | ( | PyUFuncObject * | ufunc, |
PyArrayObject ** | op, | ||
PyArray_Descr ** | dtype, | ||
NPY_ORDER | order, | ||
npy_intp | buffersize, | ||
PyObject ** | arr_prep, | ||
PyObject * | arr_prep_args, | ||
PyUFuncGenericFunction | innerloop, | ||
void * | innerloopdata | ||
) | [static] |
static PyObject* make_arr_prep_args | ( | npy_intp | nin, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
static NPY_INLINE PyArrayObject* new_array_op | ( | PyArrayObject * | op_array, |
char * | data | ||
) | [static] |
static int prepare_ufunc_output | ( | PyUFuncObject * | ufunc, |
PyArrayObject ** | op, | ||
PyObject * | arr_prep, | ||
PyObject * | arr_prep_args, | ||
int | i | ||
) | [static] |
References _does_loop_use_arrays(), _tagPyUFuncObject::legacy_inner_loop_selector, _tagPyUFuncObject::nin, _tagPyUFuncObject::nout, NPY_ANYORDER, NPY_ARRAY_F_CONTIGUOUS, NPY_KEEPORDER, NPY_UF_DBG_PRINT, PyArray_DIMS, PyArray_ISFORTRAN, PyArray_NDIM, PyArray_NewFromDescr(), PyArray_TRIVIALLY_ITERABLE, PyArray_Type, and trivial_two_operand_loop().
static PyObject* PyUFunc_Accumulate | ( | PyUFuncObject * | ufunc, |
PyArrayObject * | arr, | ||
PyArrayObject * | out, | ||
int | axis, | ||
int | otype | ||
) | [static] |
NPY_NO_EXPORT int PyUFunc_checkfperr | ( | int | errmask, |
PyObject * | errobj, | ||
int * | first | ||
) |
NPY_NO_EXPORT void PyUFunc_clearfperr | ( | ) |
NPY_NO_EXPORT PyObject* PyUFunc_FromFuncAndData | ( | PyUFuncGenericFunction * | func, |
void ** | data, | ||
char * | types, | ||
int | ntypes, | ||
int | nin, | ||
int | nout, | ||
int | identity, | ||
const char * | name, | ||
const char * | doc, | ||
int | unused | ||
) |
NPY_NO_EXPORT PyObject* PyUFunc_FromFuncAndDataAndSignature | ( | PyUFuncGenericFunction * | func, |
void ** | data, | ||
char * | types, | ||
int | ntypes, | ||
int | nin, | ||
int | nout, | ||
int | identity, | ||
const char * | name, | ||
const char * | doc, | ||
int | unused, | ||
const char * | signature | ||
) |
References PyArrayMapIterObject::consec, PyArrayMapIterObject::dimensions, PyArrayMapIterObject::nd, PyArray_BroadcastToShape(), PyArray_FromAny(), PyArray_MapIterSwapAxes(), and PyArrayMapIterObject::subspace.
Referenced by addUfuncs().
static int PyUFunc_GeneralizedFunction | ( | PyUFuncObject * | ufunc, |
PyObject * | args, | ||
PyObject * | kwds, | ||
PyArrayObject ** | op | ||
) | [static] |
<blockquote>
</blockquote>
NPY_NO_EXPORT int PyUFunc_GenericFunction | ( | PyUFuncObject * | ufunc, |
PyObject * | args, | ||
PyObject * | kwds, | ||
PyArrayObject ** | op | ||
) |
and an array of (pointers to) PyArrayObjects which are NULL.
'op' is an array of at least NPY_MAXARGS PyArrayObject *.
static PyObject* PyUFunc_GenericReduction | ( | PyUFuncObject * | ufunc, |
PyObject * | args, | ||
PyObject * | kwds, | ||
int | operation | ||
) | [static] |
References NPY_BUFSIZE, npy_um_str_pyvals_name, and UFUNC_ERR_DEFAULT.
Referenced by ufunc_geterr().
NPY_NO_EXPORT int PyUFunc_getfperr | ( | void | ) |
References npy_clear_floatstatus().
NPY_NO_EXPORT int PyUFunc_GetPyValues | ( | char * | name, |
int * | bufsize, | ||
int * | errmask, | ||
PyObject ** | errobj | ||
) |
NPY_NO_EXPORT int PyUFunc_handlefperr | ( | int | errmask, |
PyObject * | errobj, | ||
int | retstatus, | ||
int * | first | ||
) |
static PyArrayObject* PyUFunc_Reduce | ( | PyUFuncObject * | ufunc, |
PyArrayObject * | arr, | ||
PyArrayObject * | out, | ||
int | naxes, | ||
int * | axes, | ||
PyArray_Descr * | odtype, | ||
int | keepdims | ||
) | [static] |
>>> a = arange(10000)
>>> timeit sum(a) 10000 loops, best of 3: 17 us per loop
>>> timeit einsum("i->",a) 100000 loops, best of 3: 13.5 us per loop
static PyObject* PyUFunc_Reduceat | ( | PyUFuncObject * | ufunc, |
PyArrayObject * | arr, | ||
PyArrayObject * | ind, | ||
PyArrayObject * | out, | ||
int | axis, | ||
int | otype | ||
) | [static] |
NPY_NO_EXPORT int PyUFunc_RegisterLoopForDescr | ( | PyUFuncObject * | ufunc, |
PyArray_Descr * | user_dtype, | ||
PyUFuncGenericFunction | function, | ||
PyArray_Descr ** | arg_dtypes, | ||
void * | data | ||
) |
NPY_NO_EXPORT int PyUFunc_RegisterLoopForType | ( | PyUFuncObject * | ufunc, |
int | usertype, | ||
PyUFuncGenericFunction | function, | ||
int * | arg_types, | ||
void * | data | ||
) |
References _tagPyUFuncObject::name, and PyUString_FromFormat.
NPY_NO_EXPORT int PyUFunc_ReplaceLoopBySignature | ( | PyUFuncObject * | func, |
PyUFuncGenericFunction | newfunc, | ||
int * | signature, | ||
PyUFuncGenericFunction * | oldfunc | ||
) |
NPY_NO_EXPORT int PyUFunc_SetUsesArraysAsData | ( | void ** | data, |
size_t | i | ||
) |
References NPY_ITER_ALIGNED, NPY_ITER_ALLOCATE, NPY_ITER_NO_BROADCAST, NPY_ITER_NO_SUBTYPE, and NPY_ITER_WRITEONLY.
static int reduce_loop | ( | NpyIter * | iter, |
char ** | dataptrs, | ||
npy_intp * | strides, | ||
npy_intp * | countptr, | ||
NpyIter_IterNextFunc * | iternext, | ||
int | needs_api, | ||
npy_intp | skip_first_count, | ||
void * | data | ||
) | [static] |
static int reduce_type_resolver | ( | PyUFuncObject * | ufunc, |
PyArrayObject * | arr, | ||
PyArray_Descr * | odtype, | ||
PyArray_Descr ** | out_dtype | ||
) | [static] |
static void trivial_three_operand_loop | ( | PyArrayObject ** | op, |
PyUFuncGenericFunction | innerloop, | ||
void * | innerloopdata | ||
) | [static] |
static void trivial_two_operand_loop | ( | PyArrayObject ** | op, |
PyUFuncGenericFunction | innerloop, | ||
void * | innerloopdata | ||
) | [static] |
Referenced by prepare_ufunc_output().
static PyObject* ufunc_accumulate | ( | PyUFuncObject * | ufunc, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
static PyObject* ufunc_at | ( | PyUFuncObject * | ufunc, |
PyObject * | args | ||
) | [static] |
<blockquote> over first operand.</blockquote>
static void ufunc_dealloc | ( | PyUFuncObject * | ufunc | ) | [static] |
References ufunc_get_identity(), ufunc_get_name(), ufunc_get_signature(), and ufunc_get_types().
static PyObject* ufunc_generic_call | ( | PyUFuncObject * | ufunc, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
static PyObject* ufunc_get_doc | ( | PyUFuncObject * | ufunc | ) | [static] |
static PyObject* ufunc_get_identity | ( | PyUFuncObject * | ufunc | ) | [static] |
Referenced by ufunc_dealloc().
static PyObject* ufunc_get_name | ( | PyUFuncObject * | ufunc | ) | [static] |
Referenced by ufunc_dealloc().
static PyObject* ufunc_get_nargs | ( | PyUFuncObject * | ufunc | ) | [static] |
static PyObject* ufunc_get_nin | ( | PyUFuncObject * | ufunc | ) | [static] |
static PyObject* ufunc_get_nout | ( | PyUFuncObject * | ufunc | ) | [static] |
static PyObject* ufunc_get_ntypes | ( | PyUFuncObject * | ufunc | ) | [static] |
static PyObject* ufunc_get_signature | ( | PyUFuncObject * | ufunc | ) | [static] |
Referenced by ufunc_dealloc().
static PyObject* ufunc_get_types | ( | PyUFuncObject * | ufunc | ) | [static] |
NPY_NO_EXPORT PyObject* ufunc_geterr | ( | PyObject * | NPY_UNUSEDdummy, |
PyObject * | args | ||
) |
References PyUFunc_CheckOverride(), PyUFunc_GenericReduction(), and UFUNC_REDUCE.
Referenced by intern_strings().
static PyObject* ufunc_outer | ( | PyUFuncObject * | ufunc, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
static PyObject* ufunc_reduce | ( | PyUFuncObject * | ufunc, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
static PyObject* ufunc_reduceat | ( | PyUFuncObject * | ufunc, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
static PyObject* ufunc_repr | ( | PyUFuncObject * | ufunc | ) | [static] |
NPY_NO_EXPORT PyObject* ufunc_seterr | ( | PyObject * | NPY_UNUSEDdummy, |
PyObject * | args | ||
) |
References NPY_MAXARGS.
Referenced by intern_strings().
static int ufunc_update_use_defaults | ( | void | ) | [static] |
int PyUFunc_NUM_NODEFAULTS = 0 [static] |
NPY_NO_EXPORT PyTypeObject PyUFunc_Type |
PyGetSetDef ufunc_getset[] [static] |
{ {"__doc__", (getter)ufunc_get_doc, NULL, NULL, NULL}, {"nin", (getter)ufunc_get_nin, NULL, NULL, NULL}, {"nout", (getter)ufunc_get_nout, NULL, NULL, NULL}, {"nargs", (getter)ufunc_get_nargs, NULL, NULL, NULL}, {"ntypes", (getter)ufunc_get_ntypes, NULL, NULL, NULL}, {"types", (getter)ufunc_get_types, NULL, NULL, NULL}, {"__name__", (getter)ufunc_get_name, NULL, NULL, NULL}, {"identity", (getter)ufunc_get_identity, NULL, NULL, NULL}, {"signature", (getter)ufunc_get_signature, NULL, NULL, NULL}, {NULL, NULL, NULL, NULL, NULL}, }
struct PyMethodDef ufunc_methods[] [static] |
{ {"reduce", (PyCFunction)ufunc_reduce, METH_VARARGS | METH_KEYWORDS, NULL }, {"accumulate", (PyCFunction)ufunc_accumulate, METH_VARARGS | METH_KEYWORDS, NULL }, {"reduceat", (PyCFunction)ufunc_reduceat, METH_VARARGS | METH_KEYWORDS, NULL }, {"outer", (PyCFunction)ufunc_outer, METH_VARARGS | METH_KEYWORDS, NULL}, {"at", (PyCFunction)ufunc_at, METH_VARARGS, NULL}, {NULL, NULL, 0, NULL} }