Skip to content

docs: clean-up#13435

Merged
kgryte merged 7 commits into
developfrom
philipp/fix-commit-review-2026-07-12
Jul 12, 2026
Merged

docs: clean-up#13435
kgryte merged 7 commits into
developfrom
philipp/fix-commit-review-2026-07-12

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request:

  • Follow-up fixes for commits merged to develop between 2026-07-11 16:36 PDT (e48bed5) and 2026-07-12 01:21 CDT (8be93a5), covering nine stats/incr/nan* package additions and adjacent blas/ext/base housekeeping.

Grouped by package:

stats/incr/nanpcorr (originating: 8be93a5)

  • Hoist var r, x, y, i declarations in examples/index.js above executable statements per the declaration-order style guide, and drop the markdown backticks around NaN in package.json's description to match sibling packages.

stats/incr/nanmsumprod (originating: 1edad6d)

  • Hoist loop/accumulator vars in examples/index.js and the README.md Examples block, which declared them after executable statements; also strip the stray backticks around NaN in package.json's description.

stats/incr/nanewstdev (originating: 38a69db)

  • Hoist var s, var v, var i in examples/index.js above the accumulator init and console.log calls to comply with the declaration-order style guide.

stats/incr/nanmpcorr (originating: 4038a2c)

  • Align the NaN-skip step in README.md with the other four copies (docs/repl.txt, docs/types/index.d.ts, lib/index.js, lib/main.js) by changing accumulator( 2.0, NaN ) to accumulator( -2.0, NaN ).

stats/incr/nanmapcorr (originating: 525fcdf)

  • Restore the missing ar = accumulator( 3.0, NaN ); // returns ~0.925 step in the @example block of incrnanmapcorr() in lib/main.js; the JSDoc had drifted from README.md, docs/repl.txt, docs/types/index.d.ts, and lib/index.js.

stats/incr/nanmeanvar (originating: b0d9c7c)

  • Strip the Markdown backticks around NaN in package.json's description so JSON metadata matches the plain "NaN" convention used by sibling nan* packages.

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: two independent Sonnet reviewers audited the batch for stdlib style compliance (JS declaration order, docs/style-guides/javascript, cross-copy example consistency between README.md / docs/repl.txt / docs/types/index.d.ts / lib/index.js / lib/main.js, and package.json metadata 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 new blas/ext/base/ndarray/gfill-not-equal package. 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

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 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

@stdlib-bot stdlib-bot added the Statistics Issue or pull request related to statistical functionality. label Jul 12, 2026
@Planeshifter Planeshifter changed the title Follow-up fixes for stats/incr/nan* additions (2026-07-11 → 2026-07-12) docs: apply follow-up fixes across recent stats/incr/nan* additions Jul 12, 2026
@stdlib-bot

stdlib-bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Coverage Report

No coverage information available.

var randu = require( '@stdlib/random/base/randu' );
var incrnanewstdev = require( './../lib' );

var accumulator;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@kgryte kgryte marked this pull request as ready for review July 12, 2026 18:50
@kgryte kgryte requested a review from a team July 12, 2026 18:50
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Jul 12, 2026
@kgryte kgryte added Documentation Improvements, additions, or changes to documentation. and removed Needs Review A pull request which needs code review. labels Jul 12, 2026
@kgryte kgryte changed the title docs: apply follow-up fixes across recent stats/incr/nan* additions docs: clean-up Jul 12, 2026
@kgryte kgryte merged commit afc9d5b into develop Jul 12, 2026
51 checks passed
@kgryte kgryte deleted the philipp/fix-commit-review-2026-07-12 branch July 12, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Improvements, additions, or changes to documentation. Statistics Issue or pull request related to statistical functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants