docs: clean-up#13435
Conversation
stats/incr/nan* additions
Coverage ReportNo coverage information available. |
| var randu = require( '@stdlib/random/base/randu' ); | ||
| var incrnanewstdev = require( './../lib' ); | ||
|
|
||
| var accumulator; |
There was a problem hiding this comment.
This sort of hoisting is not desired. The inlining of declarations was intentional. In general, we should move away from using an explicit for loop, and instead update all the examples in the stats/incr/* namespace to use console/log-each-map. Namely, generate an array of random values. If NaN values should be generated, can use some combination of, e.g., random/array/discrete-uniform and array/put. Then use logEachMap with the accumulator function as the callback.
There was a problem hiding this comment.
Reverted in 8073a65 — restored the inline declarations in nanpcorr, nanmsumprod (both examples/index.js and README.md), and nanewstdev. Package.json description backticks-strip stays. Migrating the stats/incr/* examples to console/log-each-map looks like its own sweep — I'll leave that out of this follow-up.
Generated by Claude Code
Per @kgryte review on #13435: the inlining was intentional; hoisting is undesired. The broader direction is to migrate `stats/incr/*` examples to `console/log-each-map`, which is out of scope for this follow-up. Reverts the example/README hoisting in `nanpcorr`, `nanmsumprod`, and `nanewstdev`; package.json description fixes remain.
stats/incr/nan* additions
Description
This pull request:
developbetween 2026-07-11 16:36 PDT (e48bed5) and 2026-07-12 01:21 CDT (8be93a5), covering ninestats/incr/nan*package additions and adjacentblas/ext/basehousekeeping.Grouped by package:
stats/incr/nanpcorr(originating: 8be93a5)var r,x,y,ideclarations inexamples/index.jsabove executable statements per the declaration-order style guide, and drop the markdown backticks around NaN inpackage.json'sdescriptionto match sibling packages.stats/incr/nanmsumprod(originating: 1edad6d)examples/index.jsand theREADME.mdExamples block, which declared them after executable statements; also strip the stray backticks around NaN inpackage.json'sdescription.stats/incr/nanewstdev(originating: 38a69db)var s,var v,var iinexamples/index.jsabove the accumulator init andconsole.logcalls to comply with the declaration-order style guide.stats/incr/nanmpcorr(originating: 4038a2c)README.mdwith the other four copies (docs/repl.txt,docs/types/index.d.ts,lib/index.js,lib/main.js) by changingaccumulator( 2.0, NaN )toaccumulator( -2.0, NaN ).stats/incr/nanmapcorr(originating: 525fcdf)ar = accumulator( 3.0, NaN ); // returns ~0.925step in the@exampleblock ofincrnanmapcorr()inlib/main.js; the JSDoc had drifted fromREADME.md,docs/repl.txt,docs/types/index.d.ts, andlib/index.js.stats/incr/nanmeanvar(originating: b0d9c7c)package.json'sdescriptionso JSON metadata matches the plain "NaN" convention used by sibling nan* packages.Related Issues
No.
Questions
No.
Other
Validation: two independent Sonnet reviewers audited the batch for stdlib style compliance (JS declaration order,
docs/style-guides/javascript, cross-copy example consistency betweenREADME.md/docs/repl.txt/docs/types/index.d.ts/lib/index.js/lib/main.js, andpackage.jsonmetadata conventions against sibling nan* packages). Two independent Opus reviewers scanned the diff for correctness bugs, wrong operators, off-by-one, NaN-guard placement, and manifest/type mismatches; both returned zero findings, so nothing in this PR touches the accumulator math or the newblas/ext/base/ndarray/gfill-not-equalpackage. Every surviving finding was independently re-verified against the working tree before staging; nothing that required interpretation, style preferences not in the guide, or context outside the diff window was included.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was authored by Claude Code as an automated follow-up review of the last 24 hours of commits merged to
develop. Two Sonnet style-compliance reviewers and two Opus bug reviewers ran in parallel over the union diff; only findings independently re-verified against the working tree were applied. Each fix was manually cross-checked against sibling doc copies and reference (non-NaN) packages before staging.@stdlib-js/reviewers
Generated by Claude Code