docs: correct main summaries for stats/iter/cugmean and cuhmean#13615
Open
Planeshifter wants to merge 2 commits into
Open
docs: correct main summaries for stats/iter/cugmean and cuhmean#13615Planeshifter wants to merge 2 commits into
stats/iter/cugmean and cuhmean#13615Planeshifter wants to merge 2 commits into
Conversation
The `lib/main.js` function summary read "cumulative arithmetic geometric mean", contradicting the package's own `index.js`, README, and REPL docs (all "cumulative geometric mean") and the wrapped `@stdlib/stats/incr/gmean` dependency. Normalized to the sibling summary template "cumulative <operation>" used by 41/43 (95%) of `stats/iter` members. Documentation-only; no behavior change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A3CZyAa5MtCKvYnAtfZTYb
The `lib/main.js` function summary read "cumulative arithmetic geometric mean", naming the wrong operation entirely. The package computes a cumulative harmonic mean, as its own `index.js`, README, and REPL docs state and as the wrapped `@stdlib/stats/incr/hmean` dependency confirms. Normalized to the sibling summary template "cumulative <operation>" used by 41/43 (95%) of `stats/iter` members. Documentation-only; no behavior change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A3CZyAa5MtCKvYnAtfZTYb
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
Planeshifter
marked this pull request as ready for review
July 23, 2026 04:18
@stdlib/stats/iter/cugmean and cuhmeantats/iter/cugmean and cuhmean
tats/iter/cugmean and cuhmeanstats/iter/cugmean and cuhmean
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 corrects two drifted
lib/main.jsJSDoc summaries in the@stdlib/stats/iternamespace, where copy-pasted wording named the wrong statistical operation. Both changes are documentation-only.Namespace summary —
@stdlib/stats/iterpackage.json/directoriesshape, README sections and order, test/benchmark/example naming, public signatures, validation prologues, error construction, JSDoc shape, and source dependencies.Usage→Notes→Examples→See Also), file naming, error construction (format), iterator validation (isIteratorLike), and@examplepresence — all 100% uniform across the namespace.iterator → number|null), cumulative (15,iterator → Iterator), and moving (13,(iterator, W) → Iterator) — each below the 75% threshold, so their differences are correctly not treated as drift.@stdlib/stats/iter/cugmeanFixed a stale
arithmeticqualifier in thelib/main.jsJSDoc summary for@stdlib/stats/iter/cugmean, which incorrectly described the iterator as computing a "cumulative arithmetic geometric mean." This contradictedindex.js, the README, and the REPL help, all of which correctly describe a cumulative geometric mean, and disagreed with the underlying@stdlib/stats/incr/gmeanaccumulator being wrapped. The summary now reads "cumulative geometric mean," aligning with thecumulative <operation>template used across 41/43stats/iterpackages; documentation-only, no behavioral change.@stdlib/stats/iter/cuhmeanFixed a copy-pasted JSDoc summary in
@stdlib/stats/iter/cuhmean:lib/main.jsdescribed the iterator as computing a "cumulative arithmetic geometric mean," which is simply wrong—the package wraps@stdlib/stats/incr/hmeanand computes a cumulative harmonic mean, as its ownindex.js, README, and REPL help all correctly state. Updated the summary to "cumulative harmonic mean" to match both reality and thecumulative <operation>phrasing used by 41/43 otherstats/iterpackages. Docs only; no behavioral change.Related Issues
None.
Questions
No.
Other
Validation. Structural features were extracted from the filesystem; semantic features (public signatures, validation prologues, error construction, JSDoc shape, dependencies) were extracted from source. Candidate outliers were vetted by a three-agent review (semantic, cross-reference, structural), and both surviving corrections were unanimously confirmed as unintentional drift: neither changes observable behavior, and no test or example references the edited strings.
Deliberately excluded. Intentional sub-family signature/return-kind differences (no namespace-wide majority); a single
msuminline-comment wording deviation (dropped — flagged as a cosmetic/style judgment call rather than confirmed drift); and all structural features (zero drift — file trees,package.jsonshapes, and README sections are 100% uniform).Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was authored by Claude Code running an automated cross-package drift-detection routine over the
@stdlib/stats/iternamespace: it extracted structural and semantic features across all 43 members, identified the majority documentation convention, flagged the twolib/main.jssummaries that named the wrong operation, and applied the corrections. Each finding was verified against that package's ownindex.js, README, and REPL docs and its wrappedincr/*dependency. Human review is requested before merge.@stdlib-js/reviewers
Generated by Claude Code