SciPy

This is documentation for an old release of NumPy (version 1.17). Read this page in the documentation of the latest stable release (version 2.2).

numpy.ndarray.sum

method

ndarray.sum(axis=None, dtype=None, out=None, keepdims=False, initial=0, where=True)

Return the sum of the array elements over the given axis.

Refer to numpy.sum for full documentation.

See also

numpy.sum
equivalent function

Previous topic

numpy.ndarray.std

Next topic

numpy.ndarray.swapaxes