klyn.math.NDArray.binCount
method
public binCount(notnull weights as NDArray<Double>, minLength as Long = 0l) as NDArray<Double>
Description

Weighted occurrence counts; each weight is added to its integer bin.

Parameters
ParameterDescription
weightsFinite Double weights matching the 1D source shape.
minLengthMinimum output length, non-negative.
Returns

Double sum of weights per integer index.

Throws
  • ValueException for invalid source/weights or unaddressable bins.
  • NullException if weights is null at runtime; statically null arguments are rejected with TypeError.
Example

counts = ids.binCount(weights=weights, minLength=10l)