Repository navigation
docs: update descriptions - #15593
Merged
Merged
Conversation
The package summary was the only place in the `stats/incr` namespace where `NaN` appeared in ASCII single quotes rather than backticks, and one of two `nan*` summaries phrased as "while ignoring" rather than ", ignoring". 69 of the 72 `nan*` members (95.8%) end their summary with ", ignoring `NaN` values." and `nancv`'s own `lib/main.js`, `lib/index.js`, `docs/repl.txt` and `docs/types/index.d.ts` already use that wording, so the README was the sole deviating surface in the package. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FFCQ8XaJ5NUDv9oDpHF2Vj
The package summary read "incrementally ignoring `NaN` values" where 69 of the 72 `nan*` members (95.8%) read "incrementally, ignoring `NaN` values". The package's own `package.json` description already carries the comma, as do the behaviourally identical siblings `nanmmax`, `nanmmin` and `nanmminabs`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FFCQ8XaJ5NUDv9oDpHF2Vj
The JSDoc summary in `lib/main.js` wrote `NaN` unquoted, making it the only documentation surface in the package to do so: `README.md`, `lib/index.js`, `docs/repl.txt` and `docs/types/index.d.ts` all already backtick it. 69 of the 72 `nan*` members (95.8%) backtick `NaN` in their JSDoc summary, so this brings the file in line with both its siblings and the rest of its own package. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FFCQ8XaJ5NUDv9oDpHF2Vj
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
kgryte
marked this pull request as ready for review
September 27, 2026 21:58
kgryte
approved these changes
Sep 27, 2026
NaN notation and a missing comma in stats/incr summary lines
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 normalizes the
NaNnotation and summary-line punctuation in three@stdlib/stats/incrpackages whose documentation had drifted from the convention used by the rest of the namespace.Namespace summary
lib/node_modules/@stdlib/stats/incr/*); none autogenerated.package.jsontop-level keys,package.jsonscriptskeys,package.jsonstdlibkeys,manifest.jsonshape,test/naming,benchmark/naming,examples/naming, README heading set, README heading order, public signature, return kind, validation prologue, error construction, and JSDoc shape (param/returns/throws/example tags).formatis already used for 62/62 (100%) of members that construct an error, so no error-construction normalization was needed. README heading set was the only majority feature with outliers.publicSignature(largest cohort 59/163 = 36.2%) andvalidationPrologue. Both vary legitimately: the namespace deliberately mixes zero-argument, window-size, mean-hint, and output-array accumulator shapes.stats/incris unusually well-kept. Of the seven candidate corrections that survived majority voting, four were dropped during validation, leaving three.@stdlib/stats/incr/nancvNormalizes the
nancvREADME summary to match the package's own docstrings and the 95.8% convention acrossstats/incr.'NaN'in ASCII single quotes was the only single-quoted occurrence ofNaNin namespace prose; 69/72nan*members ofstats/incr(95.8%) backtick it. Also replaces "while ignoring" with the comma form ", ignoring", again matching 69/72 (95.8%), and bringing the README in line withnancv's ownlib/main.js,lib/index.js,docs/repl.txt, anddocs/types/index.d.ts, which already used the correct phrasing — the README was the package's sole deviating surface.@stdlib/stats/incr/nanmmaxabsAdds the missing comma before "ignoring" in the README description, matching the pattern used by 69 of the 72
nan*members ofstats/incr(95.8%), which read "incrementally, ignoringNaNvalues." The package's ownpackage.jsondescription already carries the comma, as do the behaviorally identical siblingsnanmmax,nanmmin, andnanmminabs. The JSDoc summary inlib/main.jscarries a separate, larger deviation ("while ignoring NaN values") replicated acrosslib/index.js,docs/repl.txt, anddocs/types/index.d.ts; that is left untouched here and warrants one coordinated pass.@stdlib/stats/incr/nansumprodBackticks
NaNin thelib/main.jsJSDoc summary to match the rest of the package. 69 of 72nan*accumulators in@stdlib/stats/incr(95.8%) already backtickNaNin their summary line, and every other documentation surface in this package —README.md,lib/index.js,docs/repl.txt,docs/types/index.d.ts— already does so;lib/main.jswas the sole holdout. Strictly reduces intra-package inconsistency; introduces none.Related Issues
None.
Questions
Yes — one, on the drift that was deliberately not fixed here.
nanmmaxabs,nanmstdev, andnanmvmreach replicate the same deviating summary sentence across five surfaces:README.md,lib/main.js,lib/index.js,docs/repl.txt, anddocs/types/index.d.ts. In those three packageslib/main.jscurrently agrees withdocs/repl.txtanddocs/types/index.d.ts, so editinglib/main.jsalone would trade an existing README-vs-JSDoc mismatch for a new JSDoc-vs-declaration mismatch.nanmstdevis the worst case: the namespace TOC entry atlib/node_modules/@stdlib/stats/incr/README.md:121is generated from its README summary line by_tools/markdown/namespace-toc, andlib/node_modules/@stdlib/stats/incr/docs/types/index.d.ts:2419mirrors the unbackticked form, so a correct fix also requires regenerating the TOC (make markdown-namespace-tocs).Should that five-surface pass be folded into this pull request, or handled separately?
Other
Validation
Every correction was checked as follows before being applied:
package.jsonkey sets, README heading sequences, andtest/benchmark/examplesfile naming, over all 163 members.require()-derived dependencies, over all 163 members._toolsfixture references any of the changed text.remark-lint-expected-html-sectionstreats thenotessection as optional, andstdlib/jsdoc-maximum-line-lengthis configuredoff, so neither changed line carries lint risk.nansumprod/lib/main.jswas re-parsed withnode --checkand exercised at runtime after editing (2*3 + 1*5 = 11with theNaNpair correctly skipped).Deliberately excluded
stats/incr/countlacks the## Notessection present in 158/163 members (96.9%), butincrcount's accumulator never reads its argument — it increments onarguments.lengthalone — so the majority bullet's warning that aNaNinput poisons all future values would be factually false there. Two independent reviews reached this conclusion separately.lib/main.jsJSDoc corrections fornanmmaxabs,nanmvmr, andnanmstdev, and thenanmstdevREADME correction — see Questions above.nancountandnancovarianceare also missing## Notes. Content exists to lift, but only 51 of 160## Notessections in the namespace consist of the standard bullet alone; the other 109 carry package-specific prose.nancovariance's README additionally deviates in ways outside this analysis (#### incrnancovariancewith no signature,#### accumulator(`[x, y]`)instead of#### accumulator( \[x, y] ), unbacktickedNaNin the Usage prose), which wants one scoped README pass rather than a drive-by section add.publicSignatureandvalidationPrologue, per the namespace summary above.docs/repl.txt,docs/types/index.d.ts, README## See Alsoblocks, and the commented-out equation<div>blocks were treated as out of scope.## Notesgap incovmatandpcorrmat(both carry an empty<section class="notes">with no heading) is proposed by docs: add NaN notes tostats/incr/covmatandstats/incr/pcorrmat#12693, and the backticked-NaNpackage.jsondescriptions innanmmdaandnanmmpeare corrected by chore: address review findings in newstats/incr/nan*packages #13602.nanmmaxabsis the only one of the 19nanm*( W )delegating accumulators that re-validatesWitself; the other 18 (94.7%) rely on the delegate to throw. Conforming would mean removing a validation check, which is behavior-adjacent, so it was left alone.A note on
@throwswithoutthrow44
nan*packages document@throwswhile containing nothrowstatement. This is not drift and was not flagged: each delegates construction to its non-nansibling (e.g.incrnanmmean( W )callsincrmmean( W )), so the documented error is genuinely thrown and propagates.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This pull request was authored by Claude Code running an automated cross-package drift-detection routine. The routine extracted structural and semantic features from all 163
stats/incrpackages, computed the majority pattern per feature at a 75% threshold, and flagged deviating packages. Candidate corrections were then reviewed by three independent agents; four of seven candidates were rejected at that stage and are documented under "Deliberately excluded" above. The three changes that remain are one-line documentation edits. Reviewers should scrutinize the conformance percentages and the judgement that each deviation is unintentional rather than meaningful; the underlying measurements are reproducible from the namespace itself.🤖 Generated with Claude Code
https://claude.ai/code/session_01FFCQ8XaJ5NUDv9oDpHF2Vj
Generated by Claude Code