baml.FloatStats
Statistical reductions for `float[]`.
Reference version
Signature
interface baml.FloatStatsStatistical reductions for float[].
Unlike Summable, which also covers int[], this interface has a single
implementor: mean and median are defined only for float[]. It exists
so the reductions attach as methods — xs.mean(), xs.median() — to the
structural float[] type. Both reject the empty array rather than inventing
a value for it.
Source:<builtin>/baml/containers.bamlbytes 35365–35927
Required instance methods
The arithmetic mean (average) of self.
Throws
baml.errors.InvalidArgumentwhenselfis empty — the mean of no elements is undefined.
The median of self: the middle element once the values are ordered, or
the mean of the two middle elements when the count is even.
Throws
baml.errors.InvalidArgumentwhenselfis empty.