Skip to content

feat: add stats/incr/nanmsumabs2 - #15050

Open
abdoo303 wants to merge 1 commit into
stdlib-js:developfrom
abdoo303:feat-nanmsumabs2
Open

feat: add stats/incr/nanmsumabs2#15050
abdoo303 wants to merge 1 commit into
stdlib-js:developfrom
abdoo303:feat-nanmsumabs2

Conversation

@abdoo303

@abdoo303 abdoo303 commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Resolves #5612.

Description

What is the purpose of this pull request?

This pull request:

  • add stats/incr/nanmsumabs2, an accumulator for incrementally computing a moving sum of squared absolute values, ignoring NaN values

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.

This implementation makes use of the existing @stdlib/stats/incr/msumabs2 package (which does not handle NaN values) and adds a NaN-skipping guard around it, following the same pattern used by @stdlib/stats/incr/nanmsumabs, which uses @stdlib/stats/incr/msumabs in the same way.

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

I used Claude Code in order follow the conventions and better comprehend similar existing work in stats/incr/msumabs2 and stats/incr/nanmsumabs packages.


@stdlib-js/reviewers

@abdoo303
abdoo303 requested a review from a team September 6, 2026 20:12
@stdlib-bot stdlib-bot added Statistics Issue or pull request related to statistical functionality. Needs Review A pull request which needs code review. Good First PR A pull request resolving a Good First Issue. labels Sep 6, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
stats/incr/nanmsumabs2 $\\color{green}142/142$
$\\color{green}+100.00\\%$
$\\color{green}7/7$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}142/142$
$\\color{green}+100.00\\%$

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Good First PR A pull request resolving a Good First Issue. 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/incr/nanmsumabs2

2 participants