Andrey Epifancev 3ad378c1dc chore(openspec): archive dsh-sdd (#41)
Change dsh-sdd перенесён в openspec/changes/archive/2026-10-24-dsh-sdd,
дельта dsh-sdd добавлена в openspec/specs/dsh-sdd/spec.md (7 требований).

Co-Authored-By: DeepSeek Harness <noreply@deepseek.com>
2026-10-24 17:57:35 +04:00

21 lines
520 B
Markdown

# Spec: stats
Module `src/stats.py`. Plain functions over a list of numbers. No third-party
dependencies; Python 3.8+ stdlib only.
## mean(values)
Returns the arithmetic mean as `float`. Raises `ValueError("empty")` on an
empty list.
## median(values)
Returns the median as `float` and does not mutate `values`.
- Odd length: the middle element.
- Even length: the mean of the two middle elements.
- Empty list: `ValueError("empty")`.
## describe(values)
Returns `{"count": int, "mean": float, "median": float}`.