Returns sum of all elements in the given ndarray.
Returns an ndarray of sum all elements over a given axis.