numpy 2.0.0
src/multiarray/number.h
Go to the documentation of this file.
00001 #ifndef _NPY_ARRAY_NUMBER_H_
00002 #define _NPY_ARRAY_NUMBER_H_
00003 
00004 typedef struct {
00005     PyObject *add;
00006     PyObject *subtract;
00007     PyObject *multiply;
00008     PyObject *divide;
00009     PyObject *remainder;
00010     PyObject *power;
00011     PyObject *square;
00012     PyObject *reciprocal;
00013     PyObject *ones_like;
00014     PyObject *sqrt;
00015     PyObject *negative;
00016     PyObject *absolute;
00017     PyObject *invert;
00018     PyObject *left_shift;
00019     PyObject *right_shift;
00020     PyObject *bitwise_and;
00021     PyObject *bitwise_xor;
00022     PyObject *bitwise_or;
00023     PyObject *less;
00024     PyObject *less_equal;
00025     PyObject *equal;
00026     PyObject *not_equal;
00027     PyObject *greater;
00028     PyObject *greater_equal;
00029     PyObject *floor_divide;
00030     PyObject *true_divide;
00031     PyObject *logical_or;
00032     PyObject *logical_and;
00033     PyObject *floor;
00034     PyObject *ceil;
00035     PyObject *maximum;
00036     PyObject *minimum;
00037     PyObject *rint;
00038     PyObject *conjugate;
00039 } NumericOps;
00040 
00041 #ifdef NPY_ENABLE_SEPARATE_COMPILATION
00042 extern NPY_NO_EXPORT NumericOps n_ops;
00043 extern NPY_NO_EXPORT PyNumberMethods array_as_number;
00044 #else
00045 NPY_NO_EXPORT NumericOps n_ops;
00046 NPY_NO_EXPORT PyNumberMethods array_as_number;
00047 #endif
00048 
00049 NPY_NO_EXPORT PyObject *
00050 array_int(PyArrayObject *v);
00051 
00052 NPY_NO_EXPORT int
00053 PyArray_SetNumericOps(PyObject *dict);
00054 
00055 NPY_NO_EXPORT PyObject *
00056 PyArray_GetNumericOps(void);
00057 
00058 NPY_NO_EXPORT PyObject *
00059 PyArray_GenericBinaryFunction(PyArrayObject *m1, PyObject *m2, PyObject *op);
00060 
00061 NPY_NO_EXPORT PyObject *
00062 PyArray_GenericUnaryFunction(PyArrayObject *m1, PyObject *op);
00063 
00064 NPY_NO_EXPORT PyObject *
00065 PyArray_GenericReduceFunction(PyArrayObject *m1, PyObject *op, int axis,
00066                               int rtype, PyArrayObject *out);
00067 
00068 NPY_NO_EXPORT PyObject *
00069 PyArray_GenericAccumulateFunction(PyArrayObject *m1, PyObject *op, int axis,
00070                                   int rtype, PyArrayObject *out);
00071 
00072 #endif