dualfroz 62beb61195 fix: return the value as all three quartiles for single-element input
Quartile called Median on empty half-slices when the input held one value
and discarded both errors, so it returned {NaN, v, NaN} with a nil error.
The NaN spread silently through InterQuartileRange, Midhinge and Trimean.

A single observation is its own lower hinge, median and upper hinge, which
is what Percentile already returns for the same data. Return that instead,
and note why the remaining discarded Median errors cannot fire.
2026-09-03 14:05:13 +02:00
S
Description
My contributions to montanaflynn/stats: 3 commits, 1 merged PRs
70 KiB
0 Stars 1 Watchers 0 Forks
Languages
Go 100%