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 *cbrt;
00016     PyObject *negative;
00017     PyObject *absolute;
00018     PyObject *invert;
00019     PyObject *left_shift;
00020     PyObject *right_shift;
00021     PyObject *bitwise_and;
00022     PyObject *bitwise_xor;
00023     PyObject *bitwise_or;
00024     PyObject *less;
00025     PyObject *less_equal;
00026     PyObject *equal;
00027     PyObject *not_equal;
00028     PyObject *greater;
00029     PyObject *greater_equal;
00030     PyObject *floor_divide;
00031     PyObject *true_divide;
00032     PyObject *logical_or;
00033     PyObject *logical_and;
00034     PyObject *floor;
00035     PyObject *ceil;
00036     PyObject *maximum;
00037     PyObject *minimum;
00038     PyObject *rint;
00039     PyObject *conjugate;
00040 } NumericOps;
00041 
00042 extern NPY_NO_EXPORT NumericOps n_ops;
00043 extern NPY_NO_EXPORT PyNumberMethods array_as_number;
00044 
00045 NPY_NO_EXPORT PyObject *
00046 array_int(PyArrayObject *v);
00047 
00048 NPY_NO_EXPORT int
00049 PyArray_SetNumericOps(PyObject *dict);
00050 
00051 NPY_NO_EXPORT PyObject *
00052 PyArray_GetNumericOps(void);
00053 
00054 NPY_NO_EXPORT PyObject *
00055 PyArray_GenericBinaryFunction(PyArrayObject *m1, PyObject *m2, PyObject *op);
00056 
00057 NPY_NO_EXPORT PyObject *
00058 PyArray_GenericUnaryFunction(PyArrayObject *m1, PyObject *op);
00059 
00060 NPY_NO_EXPORT PyObject *
00061 PyArray_GenericReduceFunction(PyArrayObject *m1, PyObject *op, int axis,
00062                               int rtype, PyArrayObject *out);
00063 
00064 NPY_NO_EXPORT PyObject *
00065 PyArray_GenericAccumulateFunction(PyArrayObject *m1, PyObject *op, int axis,
00066                                   int rtype, PyArrayObject *out);
00067 
00068 NPY_NO_EXPORT int
00069 needs_right_binop_forward(PyObject *self, PyObject *other,
00070                           const char *right_name, int is_inplace);
00071 
00072 #endif