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

Function PyArray_Sum

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

NUMPY_API *Sum */

Source from the content-addressed store, hash-verified

479 *Sum
480 */
481NPY_NO_EXPORT PyObject *
482PyArray_Sum(PyArrayObject *self, int axis, int rtype, PyArrayObject *out)
483{
484 PyObject *arr, *ret;
485
486 arr = PyArray_CheckAxis(self, &axis, 0);
487 if (arr == NULL) {
488 return NULL;
489 }
490 ret = PyArray_GenericReduceFunction((PyArrayObject *)arr, n_ops.add, axis,
491 rtype, out);
492 Py_DECREF(arr);
493 return ret;
494}
495
496/*NUMPY_API
497 * Prod

Callers

nothing calls this directly

Calls 2

PyArray_CheckAxisFunction · 0.85

Tested by

no test coverage detected