Skip to content

feat: add stats/incr/nanrss#10082

Draft
kanikasharma-18 wants to merge 1 commit intostdlib-js:developfrom
kanikasharma-18:nanrss-added
Draft

feat: add stats/incr/nanrss#10082
kanikasharma-18 wants to merge 1 commit intostdlib-js:developfrom
kanikasharma-18:nanrss-added

Conversation

@kanikasharma-18
Copy link

Resolves #5622

Description

What is the purpose of this pull request?

This pull request:-

  • Adds an incremental residual sum of squares (RSS) accumulator.

  • Ignores NaN input values during accumulation.

  • Returns the previously accumulated RSS when inputs contain NaN

  • Passes all existing test cases and maintains backward compatibility.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.
Result of tests:-

Screenshot 2026-01-26 at 1 32 03 PM

Result for benchmark:-

Screenshot 2026-01-26 at 1 32 57 PM

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

@stdlib-js/reviewers

---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown
    status: passed
  - task: lint_package_json
    status: passed
  - task: lint_repl_help
    status: passed
  - task: lint_javascript_src
    status: passed
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: passed
  - task: lint_javascript_tests
    status: passed
  - task: lint_javascript_benchmarks
    status: passed
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: passed
  - task: lint_typescript_tests
    status: passed
  - task: lint_license_headers
    status: passed
---
@stdlib-bot stdlib-bot added Statistics Issue or pull request related to statistical functionality. Good First PR A pull request resolving a Good First Issue. First-time Contributor A pull request from a contributor who has never previously committed to the project repository. labels Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

First-time Contributor A pull request from a contributor who has never previously committed to the project repository. Good First PR A pull request resolving a Good First Issue. 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/nanrss

2 participants