Skip to content

Improved distances docs - #41

Merged
sidchaini merged 2 commits into
mainfrom
docs-distances
Nov 15, 2026
Merged

sidchaini merged 2 commits into
mainfrom
docs-distances

Conversation

@sidchaini

Copy link
Copy Markdown
Owner

No description provided.

Closes #5.

Rewrites all 43 function docstrings and the module docstring for
consistent formatting; no code changes (AST-identical with docstrings
excluded).

- Parameters: proper `u, v : array_like` entries instead of "- u, v:"
  bullets; document the previously undocumented `w` (SciPy wrappers),
  `centered` (correlation) and `p` (minkowski).
- Returns: typed (`float`) with description.
- Sections in numpydoc order (Parameters, Returns, See Also, Notes,
  References); Notes/References no longer over-indented, which rendered
  as blockquotes.
- "Synonyms:" blocks become an "Also known as" line in the summary.
- SciPy wrappers get a See Also entry for the underlying function
  (replaces cosine's bare "SciPy." reference).
- References as plain numbered lists with one canonical Cha (2007)
  citation (previously 6 spellings). Not `.. [n]` citations: with
  napoleon all functions share one page, so labels would collide.
- correlation: document the RuntimeWarning / return 0 behaviour.
- jensenshannon_divergence: stray "Comments:" code moved into Notes as a
  literal block.
- Module docstring: fix the RST errors (indented Notes, "Copyright"
  parsed as a section title), the "Minimimum" typo, and replace the
  `# noqa` long URL with a wrapped link target (same full permalink).
- Wording: "Added by SC." spelled out, "Equals to ..." and other
  tautologies/grammar fixed.

numpydoc validation: 314 errors -> 0. Sphinx (autodoc + napoleon, as in
docs/conf.py) on the distances page: 3 errors/warnings -> 0.
This module's dice (sum((u-v)^2) / (sum(u^2) + sum(v^2))) and sorensen
(sum|u-v| / sum(u+v)) compute different formulas; the names only
coincide for the set-based Sorensen-Dice coefficient.
@sidchaini
sidchaini merged commit 0f2e540 into main Nov 15, 2026
20 checks passed
@sidchaini
sidchaini deleted the docs-distances branch November 15, 2026 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant