OptionalbinOptionalkeepIf true, the first and last points of the input are preserved unchanged
in the output (useful to keep the exact domain endpoints of a spectrum).
The intermediate points (indices 1 to length - 2) are binned.
OptionalnumberTarget number of points in the output. When provided, the input is split
into numberOfPoints contiguous bins of as-equal-as-possible size, and
takes precedence over binSize. Must be a positive integer and
<= array.length.
Number of consecutive points to average per bin. Must be a positive integer. Ignored when
numberOfPointsis provided.