Base.sum

Base.sum()

Returns a number representing the sum of the nimble object.

Examples

>>> lst = [[1, 2, 0], [0, 0, 5]]
>>> X = nimble.data(lst)
>>> X.sum()
8