Skip to content

docs: fix parameter descriptions and update spacing - #13671

Merged
kgryte merged 2 commits into
developfrom
claude/ecstatic-heisenberg-6m06us
Jul 26, 2026
Merged

docs: fix parameter descriptions and update spacing#13671
kgryte merged 2 commits into
developfrom
claude/ecstatic-heisenberg-6m06us

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

> What is the purpose of this pull request?

Propagating fixes merged to develop between 2026-07-26 00:12 PDT (0239983) and 2026-07-26 03:02 PDT (a7865fd) to sibling packages carrying the same defect.

Pattern: rate parameter → scale parameter (invgamma)

Commit b06219c (#13653) corrected a test description in invgamma/quantile, relabeling beta from "rate parameter" to "scale parameter" — for X ~ Gamma(α, β), 1/X ~ InvGamma(α, β) with β a scale, not rate, consistent with stdlib's moment formulas (e.g., mean = β/(α−1)) and the Julia Distributions.jl fixture generators (InverseGamma(alpha, beta), θ = scale). This propagates the fix to the 101 remaining "rate parameter" occurrences across 64 files under stats/base/dists/invgamma/** — JSDoc/TSDoc and C doxygen @param blocks, README prose and C-API bullets, docs/repl.txt, test descriptions, example comments, and Julia fixture-runner docstrings — several files had both correct and stale labels side by side. Variable names (largeRate) and fixture filenames (large_rate.json) are left as-is, matching the source commit.

  • b06219c (chore: clean-up)
    • stats/base/dists/invgamma/{cdf,ctor,entropy,kurtosis,logpdf,mean,mode,pdf,quantile,skewness,stdev,variance}
    • stats/base/dists/invgamma/docs/types/index.d.ts (namespace declarations)

Pattern: doxygen one-liner expansion (invgamma siblings)

PR #13653 (b06219c7a) expanded the doxygen one-liner in quantile's header and src/main.c from "Evaluates the quantile function for an inverse gamma distribution." to name alpha, beta, and the evaluation argument explicitly; logpdf already carried the expanded form in its header. pdf and cdf still had the short form in their headers while their own src/main.c already had the expanded sentence — this propagates that same expansion into pdf/include/.../pdf.h and cdf/include/.../cdf.h, copied byte-for-byte from each package's src/main.c. Headers and implementation now agree across all four invgamma packages.

  • b06219c (chore: clean-up)
    • stats/base/dists/invgamma/pdf (header only)
    • stats/base/dists/invgamma/cdf (header only)

Pattern: unspaced index brackets and paren spacing in dists test suites

Follows up on b06219c (#13653) by completing the bracket/paren spacing sweep across the remaining stats/base/dists/anglit and stats/base/dists/invgamma test files: 304 lines across 46 files normalize x[i]x[ i ] style index accesses (expected, alpha, beta, sigma, mu, p, values), plus one unspaced outer-paren t.strictEqual call in anglit/cdf/test/test.factory.js. Purely mechanical spacing changes to match stdlib style; no logic, variable names, or test messages touched.

  • b06219c (chore: clean-up)
    • stats/base/dists/anglit/{cdf,entropy,mean,median,mode,quantile,skewness,stdev,variance} test files
    • stats/base/dists/invgamma/{cdf,ctor,entropy,kurtosis,logpdf,mean,mode,pdf,quantile,skewness,stdev,variance} test files

Pattern: @param whitespace propagation from #13654

01a20c0 (#13654) removed doubled spaces around the - separator in @param tags but only covered random/iter/* and stats/base/dists/binomial/quantile. A repo-wide sweep for the same defect turned up one more site: blas/base/gscal/lib/main.js, where stride - stride length collapses to a single space. The other four hits are out of scope — random/strided/docs/types/index.d.ts is generated, random/strided/weibull/docs/types/index.d.ts and ml/incr/sgd-regression/lib/validate.js are superseded by open PRs #12571 and #13641, and the _tools transformer hit is a doubled-hyphen defect requiring a different fix.

Related Issues

> Does this pull request have any related issues?

No.

Questions

> Any questions for reviewers of this pull request?

No.

Other

> Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

Validation

  • Search scope. Per source pattern: rg 'rate parameter' over stats/base/dists/invgamma/** (101 hits, 64 files; zero hits under random/** invgamma packages, which already say "scale"); rg for short-form doxygen descriptions over invgamma headers and sources; rg '\[[a-z0-9]+\]' over stats/base/dists/{anglit,invgamma}/**/test/*.js (304 hits, 46 files; anglit/pdf and invgamma/quantile/test/test.native.js correctly absent — already fixed by the source commit); repo-wide sweep for doubled-space @param separators (5 hits, 4 excluded).
  • Two independent Opus validation agents each read every candidate file in full and confirmed the defect at all sites, including independently deriving that invgamma's beta is a scale parameter (pdf form, scale-linear moment formulas, Distributions.jl parameterization) and verifying the namespace docs/types/index.d.ts is hand-maintained, not generated. An adaptation pass produced byte-exact patches (confirming C doxygen @param column alignment is preserved and no markdown link labels or `[in]` code spans are touched), and a style-consistency pass verified the post-fix text against already-correct siblings (rayleigh, f dist test descriptions; random/base/invgamma docs).
  • Zero sites were rejected or rated needs-human; every changed line was audited against the expected transformation shapes after application (407 changed lines = 101 + 304 + 2 headers, with the paren fix landing on an already-counted line).

Deliberately excluded:

  • Sites in open-PR collision or generated files (see the @param pattern above).
  • test: ULP-migration commits (d98aba7, 4588717) — tracked campaign work ([RFC]: Migrate math/base/special packages from relative tolerance testing to ULP difference testing (tracking issue) #11352), not propagatable defect fixes.
  • docs: update related packages sections (0239983) — auto-generated churn.
  • Two zero-site patterns from b06219c: "modified huber" → "modified Huber" capitalization (only intentional lowercase npm keywords remain) and README NaN per-argument example coverage (all ml/base/loss siblings already correct).
  • largeRate variables and large_rate.json fixture filenames (renaming would cascade into fixture regeneration; matches source-commit precedent).
  • Adjacent pre-existing defects observed but out of pattern scope: garbled clause in invgamma/entropy/README.md, doubled space in invgamma/pdf/README.md link prose, missing C++ name-mangling comment in cdf.h, and the _tools doubled-hyphen @param defect — logged for a future maintenance pass.

Checklist

> Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

> When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

This PR was authored by Claude Code on behalf of @Planeshifter as an automated propagation of fixes merged to develop over the prior 24 hours. Candidate source commits were filtered for generalizable patterns, sibling sites located via grep-able pattern signatures, and each proposed patch independently validated by parallel reviewer agents (two Opus validation passes, an adaptation pass, and a style-consistency pass) before commits were applied. A maintainer should audit and promote out of draft.



Generated by Claude Code

claude added 2 commits July 26, 2026 13:24
Propagates fixes from b06219c ("chore: clean-up") to sibling packages
carrying the same defects:

-   relabel the inverse gamma `beta` from "rate parameter" to "scale
    parameter" across `stats/base/dists/invgamma` documentation,
    test descriptions, and fixture-runner docstrings
-   expand the one-line doxygen descriptions in the `invgamma/{pdf,cdf}`
    headers to match the wording already present in each package's
    `src/main.c`
-   normalize index-bracket and call-paren spacing in
    `stats/base/dists/{anglit,invgamma}` test files
Propagates fix from 01a20c0 ("style: remove extraneous whitespace") to
the one remaining JSDoc `@param` line with a doubled space around the
hyphen separator.
@stdlib-bot stdlib-bot added the Good First PR A pull request resolving a Good First Issue. label Jul 26, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
blas/base/gscal $\\color{green}314/314$
$\\color{green}+100.00\\%$
$\\color{green}34/34$
$\\color{green}+100.00\\%$
$\\color{green}3/3$
$\\color{green}+100.00\\%$
$\\color{green}314/314$
$\\color{green}+100.00\\%$
stats/base/dists/anglit/cdf $\\color{green}327/327$
$\\color{green}+100.00\\%$
$\\color{green}27/27$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}327/327$
$\\color{green}+100.00\\%$
stats/base/dists/anglit/entropy $\\color{green}194/194$
$\\color{green}+100.00\\%$
$\\color{green}9/9$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}194/194$
$\\color{green}+100.00\\%$
stats/base/dists/anglit/mean $\\color{green}175/175$
$\\color{green}+100.00\\%$
$\\color{green}9/9$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}175/175$
$\\color{green}+100.00\\%$
stats/base/dists/anglit/median $\\color{green}175/175$
$\\color{green}+100.00\\%$
$\\color{green}9/9$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}175/175$
$\\color{green}+100.00\\%$
stats/base/dists/anglit/mode $\\color{green}175/175$
$\\color{green}+100.00\\%$
$\\color{green}9/9$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}175/175$
$\\color{green}+100.00\\%$
stats/base/dists/anglit/quantile $\\color{green}297/297$
$\\color{green}+100.00\\%$
$\\color{green}27/27$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}297/297$
$\\color{green}+100.00\\%$
stats/base/dists/anglit/skewness $\\color{green}175/175$
$\\color{green}+100.00\\%$
$\\color{green}9/9$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}175/175$
$\\color{green}+100.00\\%$
stats/base/dists/anglit/stdev $\\color{green}180/180$
$\\color{green}+100.00\\%$
$\\color{green}9/9$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}180/180$
$\\color{green}+100.00\\%$
stats/base/dists/anglit/variance $\\color{green}181/181$
$\\color{green}+100.00\\%$
$\\color{green}9/9$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}181/181$
$\\color{green}+100.00\\%$
stats/base/dists/invgamma/cdf $\\color{green}299/299$
$\\color{green}+100.00\\%$
$\\color{green}25/25$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}299/299$
$\\color{green}+100.00\\%$
stats/base/dists/invgamma/ctor $\\color{green}408/408$
$\\color{green}+100.00\\%$
$\\color{green}31/31$
$\\color{green}+100.00\\%$
$\\color{green}16/16$
$\\color{green}+100.00\\%$
$\\color{green}408/408$
$\\color{green}+100.00\\%$
stats/base/dists/invgamma $\\color{red}2014/2363$
$\\color{green}+85.23\\%$
$\\color{green}29/29$
$\\color{green}+100.00\\%$
$\\color{red}0/27$
$\\color{green}+0.00\\%$
$\\color{red}2014/2363$
$\\color{green}+85.23\\%$
stats/base/dists/invgamma/entropy $\\color{green}201/201$
$\\color{green}+100.00\\%$
$\\color{green}10/10$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}201/201$
$\\color{green}+100.00\\%$
stats/base/dists/invgamma/kurtosis $\\color{green}203/203$
$\\color{green}+100.00\\%$
$\\color{green}10/10$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}203/203$
$\\color{green}+100.00\\%$
stats/base/dists/invgamma/logpdf $\\color{green}313/313$
$\\color{green}+100.00\\%$
$\\color{green}25/25$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}313/313$
$\\color{green}+100.00\\%$
stats/base/dists/invgamma/mean $\\color{green}192/192$
$\\color{green}+100.00\\%$
$\\color{green}10/10$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}192/192$
$\\color{green}+100.00\\%$
stats/base/dists/invgamma/mode $\\color{green}195/195$
$\\color{green}+100.00\\%$
$\\color{green}10/10$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}195/195$
$\\color{green}+100.00\\%$
stats/base/dists/invgamma/pdf $\\color{green}313/313$
$\\color{green}+100.00\\%$
$\\color{green}25/25$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}313/313$
$\\color{green}+100.00\\%$
stats/base/dists/invgamma/quantile $\\color{green}307/307$
$\\color{green}+100.00\\%$
$\\color{green}24/24$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}307/307$
$\\color{green}+100.00\\%$
stats/base/dists/invgamma/skewness $\\color{green}193/193$
$\\color{green}+100.00\\%$
$\\color{green}10/10$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}193/193$
$\\color{green}+100.00\\%$
stats/base/dists/invgamma/stdev $\\color{green}196/196$
$\\color{green}+100.00\\%$
$\\color{green}10/10$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}196/196$
$\\color{green}+100.00\\%$
stats/base/dists/invgamma/variance $\\color{green}196/196$
$\\color{green}+100.00\\%$
$\\color{green}10/10$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}196/196$
$\\color{green}+100.00\\%$

The above coverage report was generated for the changes in this PR.

@kgryte
kgryte marked this pull request as ready for review July 26, 2026 23:33
@kgryte
kgryte requested a review from a team July 26, 2026 23:33
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Jul 26, 2026
@kgryte kgryte changed the title chore: propagate develop fixes to sibling packages (2026-07-26) docs: fix parameter descriptions and update spacing Jul 26, 2026
@kgryte
kgryte merged commit 8df3c50 into develop Jul 26, 2026
54 checks passed
@kgryte
kgryte deleted the claude/ecstatic-heisenberg-6m06us branch July 26, 2026 23:34
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Jul 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Good First PR A pull request resolving a Good First Issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants