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

Function PyArray_CumSum

numpy/core/src/multiarray/calculation.c:518–532  ·  view source on GitHub ↗

NUMPY_API *CumSum */

Source from the content-addressed store, hash-verified

516 *CumSum
517 */
518NPY_NO_EXPORT PyObject *
519PyArray_CumSum(PyArrayObject *self, int axis, int rtype, PyArrayObject *out)
520{
521 PyObject *arr, *ret;
522
523 arr = PyArray_CheckAxis(self, &axis, 0);
524 if (arr == NULL) {
525 return NULL;
526 }
527 ret = PyArray_GenericAccumulateFunction((PyArrayObject *)arr,
528 n_ops.add, axis,
529 rtype, out);
530 Py_DECREF(arr);
531 return ret;
532}
533
534/*NUMPY_API
535 * CumProd

Callers 1

array_cumsumFunction · 0.85

Calls 2

PyArray_CheckAxisFunction · 0.85

Tested by

no test coverage detected