Skip to content

feat: add stats/strided/dnanmeankbn#11129

Open
parthodas23 wants to merge 1 commit intostdlib-js:developfrom
parthodas23:feat/stats-strided-dnanmeankbn
Open

feat: add stats/strided/dnanmeankbn#11129
parthodas23 wants to merge 1 commit intostdlib-js:developfrom
parthodas23:feat/stats-strided-dnanmeankbn

Conversation

@parthodas23
Copy link
Copy Markdown
Contributor

Resolves #345 .

Description

What is the purpose of this pull request?

This pull request:

  • feat: add stats/strided/dnanmeankbn

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

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.

No.

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

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance. This helps reviewers determine how much scrutiny to apply when reviewing your contribution. Example disclosures: "This PR was written primarily by Claude Code." or "I consulted ChatGPT to understand the codebase, but the proposed changes were fully authored manually by myself.".

{{TODO: add disclosure if applicable}}


@stdlib-js/reviewers

@stdlib-bot stdlib-bot added Statistics Issue or pull request related to statistical functionality. Needs Review A pull request which needs code review. labels Mar 25, 2026
@stdlib-bot
Copy link
Copy Markdown
Contributor

stdlib-bot commented Mar 25, 2026

Coverage Report

Package Statements Branches Functions Lines
stats/strided/dnanmeankbn $\color{green}363/363$
$\color{green}+0.00%$
$\color{green}17/17$
$\color{green}+0.00%$
$\color{green}4/4$
$\color{green}+0.00%$
$\color{green}363/363$
$\color{green}+0.00%$

The above coverage report was generated for the changes in this PR.

@parthodas23 parthodas23 force-pushed the feat/stats-strided-dnanmeankbn branch from 0baf7d2 to 21625a5 Compare March 25, 2026 03:14
Comment on lines +64 to +74
for ( i = 0; i < N; i++ ) {
v = x[ ix ];
if ( v === v ) {
count += 1;
}
ix += strideX;
}
if ( count === 0 ) {
return NaN;
}
sum = dnansumkbn( N, x, strideX, offsetX );
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 is not what is desired. You are effectively doing two passes. You should be using https://github.com/stdlib-js/stdlib/tree/d479058e503f9625161a2666e308d6976902d0f6/lib/node_modules/%40stdlib/blas/ext/base/dnannsumkbn. Returning both the sum and the count is precisely the point of that package.

@kgryte kgryte added Feature Issue or pull request for adding a new feature. difficulty: 3 Likely to be challenging but manageable. Needs Changes Pull request which needs changes before being merged. review: 3 and removed Needs Review A pull request which needs code review. labels Apr 4, 2026
@parthodas23 parthodas23 force-pushed the feat/stats-strided-dnanmeankbn branch from 21625a5 to aecc81a Compare April 5, 2026 13:42
@parthodas23 parthodas23 force-pushed the feat/stats-strided-dnanmeankbn branch from aecc81a to 6916a37 Compare April 5, 2026 13:56
@parthodas23 parthodas23 requested a review from kgryte April 5, 2026 14:09
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Apr 5, 2026
@github-actions github-actions bot mentioned this pull request Apr 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

difficulty: 3 Likely to be challenging but manageable. Feature Issue or pull request for adding a new feature. Needs Changes Pull request which needs changes before being merged. Needs Review A pull request which needs code review. review: 3 Statistics Issue or pull request related to statistical functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RFC: add stats/strided/dnanmeankbn

3 participants