docs: update descriptions#13370
Merged
kgryte merged 7 commits intoJul 8, 2026
Merged
Conversation
…type1/logcdf` The JSDoc, native.js, C source, and C header docstrings all described the function as "Evaluates the cumulative distribution function (CDF)" when the package evaluates the natural logarithm of the CDF. The package's own `docs/repl.txt`, `docs/types/index.d.ts`, and `README.md` title/intro already document the function correctly; only the source comments were copy-pasted from `pareto-type1/cdf` without updating the brief. Also inconsistent with sibling `logpdf/lib/main.js`, which correctly reads "Evaluates the natural logarithm of the probability density function (PDF)…" — 24 of 25 `<dist>/logcdf` packages across `stats/base/dists/*` already carry the corrected phrasing.
…pdf` Aligns the `README.md` title blockquote, the `lib/index.js` module-doc brief, and the `package.json` description with the namespace's noun-phrase convention `<Name> distribution <thing>.` used by 12 of 14 sibling `lib/index.js` briefs (85.7% conformance), 13 of 14 sibling README blockquotes (92.9%), and 13 of 14 sibling package.json descriptions (92.9%). The prior verb-phrase form `Evaluate the natural logarithm of the probability density function (PDF) for a Pareto (Type I) distribution.` was the sole `lib/index.js`/README outlier in the namespace and the sole `package.json` outlier. New phrasings mirror `pareto-type1/logcdf` verbatim (word order, capitalization, elided `natural` in package.json, preserved trailing `(PDF)` acronym per the PDF-family convention).
Aligns the `lib/index.js` module-doc brief with the namespace's noun-phrase convention `<Name> distribution <thing>.` used by 12 of 14 sibling `lib/index.js` briefs (85.7% conformance) and by 26 of 31 sibling `<dist>/pdf` packages across `stats/base/dists/*` (83.9%). The prior verb-phrase form `Evaluate the probability density function (PDF) for a Pareto (Type I) distribution.` was the sole in-namespace outlier alongside `logpdf` (now realigned in the previous commit). The package's own `README.md` blockquote, `docs/repl.txt`, and `package.json` description already carry the noun-phrase form; only `lib/index.js` was drifting.
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
kgryte
reviewed
Jul 8, 2026
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Athan <kgryte@gmail.com>
…ype1/logpdf/README.md
…ype1/logpdf/package.json
…ype1/logpdf/lib/index.js
kgryte
approved these changes
Jul 8, 2026
logcdf docstrings and normalize brief phrasings in stats/base/dists/pareto-type1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request:
@stdlib/stats/base/dists/pareto-type1with the namespace-wide documentation conventions:logcdfsource docstrings incorrectly described the function as the CDF (a copy-paste bug — the package is the natural-log of the CDF, as its owndocs/repl.txt,docs/types/index.d.ts, andREADME.mdalready document);logpdfwas the sole in-namespace outlier onlib/index.jsbrief,README.mdtitle blockquote, andpackage.jsondescription, still carrying the verb-phraseEvaluate the … for a Pareto (Type I) distribution.form;pdf/lib/index.jswas the second outlier on the module-doc brief (its README andpackage.jsonhad already been normalized). No behavior changes; 8 files, 8 lines.Namespace summary
@stdlib/stats/base/dists/pareto-type1cdf,ctor,entropy,kurtosis,logcdf,logpdf,mean,median,mode,pdf,quantile,skewness,stdev,variance)package.jsontop-level /scripts/stdlib/directories/keywordskeys anddescriptionvalue,README.mdheading sequence and title blockquote,manifest.jsonshape, test/benchmark/examples filenames, public signature, return kind, validation prologue, error construction, JSDoc shape (@param/@returns/@throws/@example),lib/main.jsrequiredependencies,lib/index.jsmodule-doc brief,lib/native.js/src/main.c/include/**/*.hdocstrings, factual accuracy of the source docstring against the package name.lib/index.jsmodule-doc brief noun-phrase form<Name> distribution <thing>.at 12/14 = 85.7% (outliers:logpdf,pdf);README.mdtitle blockquote noun-phrase form at 13/14 = 92.9% (outlier:logpdf);package.jsondescription noun-phrase form at 13/14 = 92.9% (outlier:logpdf); source docstring correctly describes the function at 13/14 = 92.9% (outlier:logcdf, whoselib/main.js,lib/native.js,src/main.c, andinclude/**/logcdf.hdescribe it as the CDF); JS source docstring mirrored in the C mirror at 12/13 = 92.3% among native-backed packages (samelogcdfoutlier). Cross-namespace confirmation via structural-review agent against allstats/base/dists/*/logcdf(24/25 conform) andstats/base/dists/*/pdf(26/31 conform) siblings.isnanguards #13343 (isnan guard shape, native-bindings absence inctor/median,lib/factory.jspresence, public signature shape, error construction, README## Notessection, dependency sets, SVG naming) — no new majority-less features surfaced this run.stats/base/dists/pareto-type1/logcdfFix a copy-paste bug in the source docstrings.
lib/main.js:32,lib/native.js:29,src/main.c:26, andinclude/stdlib/stats/base/dists/pareto-type1/logcdf.h:30all readEvaluates the cumulative distribution function (CDF) for a Pareto (Type I) distribution …, but the package evaluates the natural logarithm of the CDF, as@returns {number} evaluated logCDFin the same JSDoc,docs/repl.txt,docs/types/index.d.ts, andREADME.mdalready document. The four docstrings were copy-pasted frompareto-type1/cdfwithout updating the brief; 24 of 25<dist>/logcdfpackages acrossstats/base/dists/*already carry the corrected phrasing (Evaluates the natural logarithm of the cumulative distribution function (CDF) …), matchingpareto-type1/logpdf/lib/main.js:31verbatim.stats/base/dists/pareto-type1/logpdfRealign
README.md:23,lib/index.js:22, andpackage.json:4with the namespace's noun-phrase convention<Name> distribution <thing>.used by 12 of 14 siblinglib/index.jsbriefs (85.7%), 13 of 14 sibling README blockquotes (92.9%), and 13 of 14 siblingpackage.jsondescriptions (92.9%). The prior verb-phrase formEvaluate the natural logarithm of the probability density function (PDF) for a Pareto (Type I) distribution.was the sole in-namespace outlier on all three axes. New phrasings mirrorpareto-type1/logcdfword-for-word (word order, capitalization, and — inpackage.json— the namespace convention of elidingnaturalfor brevity); the README blockquote preserves the trailing(PDF)acronym per the cross-namespace PDF-family README convention (25 of 26 sibling<dist>/logpdfREADMEs keep it, versus the CDF-family which drops the acronym).stats/base/dists/pareto-type1/pdfRealign
lib/index.js:22with the noun-phrase convention. This was the sole in-namespacelib/index.jsoutlier alongsidelogpdf(now also realigned). 26 of 31 sibling<dist>/pdfpackages acrossstats/base/dists/*already use the noun-phrase form. The package's ownREADME.md:23blockquote,docs/repl.txt, andpackage.json:4description already readPareto (Type I) distribution probability density function (PDF).; only thelib/index.jsmodule-doc brief was drifting. Post-fix, all four in-package briefs match verbatim.Validation
Checked:
package.jsonshape, README section list and title blockquote,manifest.jsonshape, test/benchmark/example filenames) across all 14 members.lib/main.js,lib/index.js,lib/native.js,src/main.c, and the correspondinginclude/**/*.hdirectly.confirmed-driftfor all five, citing@returns {number} evaluated logCDFinlogcdf/lib/main.js:37as direct contradiction of the buggyEvaluates the cumulative distribution functionbrief on line 32, and verifying the sibling comparisons for the phrasing normalizations.safe-to-applyfor four, andneeds-humanforlogpdf/lib/index.json the grounds that the namespace-levelstats/base/dists/pareto-type1/README.md<toc>TOC entry forlogpdfcurrently mirrors the old verb-phrase brief — which is a generator-owned artifact and out of scope per gate 7a (the TOC will re-generate from the corrected source on the nextdocs: update namespace table of contentspass, as it did forpdfwhenpdf/lib/index.jswas previously normalized).stats/base/dists/*ecosystem: confirmed F1/F2/F3 as high-conformance drift (24/25, 15/26, 26/31 respectively); refined F4 to keep the trailing(PDF)acronym after finding 25/26 sibling<dist>/logpdfREADMEs keep it (the initial fix would have matched onlyfrechet); rejected F5 (linkifyprobability density functioninpdf/README.md) as a wrong-fix — the current unlinked(PDF)form matches the largest sibling group (16/31), so pareto-type1'spdfis already within the PDF-family majority.Deliberately excluded:
pdf/README.md:23blockquote linkification. Rejected by sonnet structural-review: 16 of 31 sibling<dist>/pdfREADMEs use the unlinkeddistribution probability density function (PDF).form (the largest single group); only 7 of 31 use the linked variant. The CDF-family linkifies almost universally (33/36), but the PDF-family does not — the two families' README conventions differ intentionally.stats/base/dists/pareto-type1/README.md<toc>block. Autogenerated from the source briefs; gated out per 7a; will re-populate on next TOC-regeneration commit.isnanguards #13343 (isnan guard shape inmean/median, and all associated per-namespace/cross-namespace deliberate exclusions listed there). Re-analysis confirmsmean/medianare now in-family.mediannative-bindings absence — the open PR feat: add C implementation forstats/base/dists/pareto-type1/median#10079 adds it; orthogonal to this run.ctorerrorConstruction = "format"andstdevprologue-less delegation viasqrt( variance( α, β ) )— intentional deviations, unchanged from refactor: add explicitisnanguards #13343's exclusion list.Related Issues
No.
Questions
No.
Other
Second run of the cross-package drift-detection routine on
stats/base/dists/pareto-type1; the earlier run (PR #13343, merged 2026-07-07) covered validation-prologue drift onmean/medianand enumerated the majority-less features as deliberate exclusions. This run picked up a different axis — source-docstring factual accuracy inlogcdfand doc-brief phrasing style inlogpdf/pdf— that #13343 did not flag. No conflict with the open native-binding PR #10079 forpareto-type1/median, which touches only new native files and appends a## C APIssection tomedian/README.md— orthogonal to thelogcdf/logpdf/pdfdocstrings modified here.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was authored by Claude Code via the cross-package drift-detection routine: structural and semantic features were extracted from every member of
stats/base/dists/pareto-type1, majority patterns were computed at a 75% conformance threshold, and three independent validation agents (opus semantic-review, opus cross-reference, sonnet cross-namespace structural-review) reviewed each candidate correction before any file was edited. The structural-review pass dropped one candidate as a wrong-fix (would have movedpdf/README.mdfrom majority PDF-family style into a minority) and refined a second to preserve the trailing(PDF)acronym; the remaining four survived unchanged. Each edit is a documentation-string realignment with no source, test, REPL, TypeScript, or observable-behavior change.@stdlib-js/reviewers
Generated by Claude Code