MCPcopy Create free account
hub / github.com/numpy/numpy / PyArray_GenericAccumulateFunction

Function PyArray_GenericAccumulateFunction

numpy/core/src/multiarray/number.c:249–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247
248
249NPY_NO_EXPORT PyObject *
250PyArray_GenericAccumulateFunction(PyArrayObject *m1, PyObject *op, int axis,
251 int rtype, PyArrayObject *out)
252{
253 PyObject *args, *ret = NULL, *meth;
254 PyObject *kwds;
255
256 args = Py_BuildValue("(Oi)", m1, axis);
257 kwds = _get_keywords(rtype, out);
258 meth = PyObject_GetAttrString(op, "accumulate");
259 if (meth && PyCallable_Check(meth)) {
260 ret = PyObject_Call(meth, args, kwds);
261 }
262 Py_DECREF(args);
263 Py_DECREF(meth);
264 Py_XDECREF(kwds);
265 return ret;
266}
267
268
269NPY_NO_EXPORT PyObject *

Callers 2

PyArray_CumSumFunction · 0.85
PyArray_CumProdFunction · 0.85

Calls 1

_get_keywordsFunction · 0.85

Tested by

no test coverage detected