turicreate.Sketch.sum

Sketch.sum()

Returns the sum of all the values in the SArray. Returns 0 on an empty array. Throws an exception if called on an sarray with non-numeric type. Will overflow without warning.

Returns:
out : type of SArray

Sum of all values in SArray. Returns 0 if the SArray is empty.

Raises:
RuntimeError

If the sarray is a non-numeric type.