klyn.math.NDArray.sum
method
public sum(ignoreNaN as Boolean, where as Boolean[] = null) as Object
Description

Masked/NaN-aware global sum, retaining the numeric type of this array.

Parameters
ParameterDescription
ignoreNaNSkip NaN values; false propagates them for floating data.
whereOptional flat selection mask matching the source size.
Returns

Typed scalar boxed as Object, as with sum(); no observations gives zero.

Throws
  • ValueException for a mask of incorrect length.
Example

total = data.sum(ignoreNaN=true)