Skip to content

feat: add stats/strided/snanmeankbn#11116

Open
parthodas23 wants to merge 2 commits intostdlib-js:developfrom
parthodas23:feat/stats-strided-snanmeankbn
Open

feat: add stats/strided/snanmeankbn#11116
parthodas23 wants to merge 2 commits intostdlib-js:developfrom
parthodas23:feat/stats-strided-snanmeankbn

Conversation

@parthodas23
Copy link
Copy Markdown
Contributor

Resolves #346 .

Description

What is the purpose of this pull request?

This pull request:

  • Adds JS implementation for stats/strided/snanmeankbn
  • Adds native C implementation for stats/strided/snanmeankbn
  • Adds benchmark, docs and relevant tests.

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 24, 2026
@parthodas23 parthodas23 force-pushed the feat/stats-strided-snanmeankbn branch from dab1ccc to 90413de Compare March 24, 2026 08:03
@stdlib-bot
Copy link
Copy Markdown
Contributor

stdlib-bot commented Mar 24, 2026

Coverage Report

Package Statements Branches Functions Lines
stats/strided/snanmeankbn $\color{green}387/387$
$\color{green}+0.00%$
$\color{green}20/20$
$\color{green}+0.00%$
$\color{green}4/4$
$\color{green}+0.00%$
$\color{green}387/387$
$\color{green}+0.00%$

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

@parthodas23 parthodas23 force-pushed the feat/stats-strided-snanmeankbn branch 2 times, most recently from 4503ca0 to 6f1b8e3 Compare March 24, 2026 09:21
Copy link
Copy Markdown
Contributor

@Om-A-osc Om-A-osc left a comment

Choose a reason for hiding this comment

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

Hey @parthodas23. I have left some comments on you PR. Happy to give my first code review in stdlib on your PR.

Comment on lines +297 to +301

- <span class="package-name">[`@stdlib/stats/strided/dmeankbn`][@stdlib/stats/strided/dmeankbn]</span><span class="delimiter">: </span><span class="description">calculate the arithmetic mean of a double-precision floating-point strided array using an improved Kahan–Babuška algorithm.</span>
- <span class="package-name">[`@stdlib/stats/strided/smeankbn`][@stdlib/stats/strided/smeankbn]</span><span class="delimiter">: </span><span class="description">calculate the arithmetic mean of a single-precision floating-point strided array using an improved Kahan–Babuška algorithm.</span>
- <span class="package-name">[`@stdlib/stats/strided/meankbn`][@stdlib/stats/strided/meankbn]</span><span class="delimiter">: </span><span class="description">calculate the arithmetic mean of a strided array using an improved Kahan–Babuška algorithm.</span>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This needs to be removed. The see also section in README.md is not supposed to be filled manually.

// MODULES //

var stride2offset = require( '@stdlib/strided/base/stride2offset' );
var ndarray = require( '@stdlib/stats/strided/snanmeankbn/lib/ndarray.js' );
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
var ndarray = require( '@stdlib/stats/strided/snanmeankbn/lib/ndarray.js' );
var ndarray = require( './ndarray.js' );

@github-actions github-actions bot mentioned this pull request Mar 24, 2026
@parthodas23
Copy link
Copy Markdown
Contributor Author

@Om-A-osc Done, thanks for the review. ❤️

@parthodas23 parthodas23 force-pushed the feat/stats-strided-snanmeankbn branch from dfe3f3b to cdbecf5 Compare March 24, 2026 13:33
@parthodas23 parthodas23 changed the title feat: add js and C implementation for stats/strided/snanmeankbn feat: add stats/strided/snanmeankbn Mar 24, 2026
@parthodas23 parthodas23 force-pushed the feat/stats-strided-snanmeankbn branch from cdbecf5 to 936fe44 Compare March 25, 2026 04:05
@parthodas23 parthodas23 force-pushed the feat/stats-strided-snanmeankbn branch from 936fe44 to ad1736f Compare March 27, 2026 03:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review A pull request which needs code review. 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/snanmeankbn

3 participants