Skip to content

feat: add blas/ext/base/ndarray/dnannsum - #17161

Open
AtharvaPatange wants to merge 2 commits into
stdlib-js:developfrom
AtharvaPatange:feat/add-blas-ext-base-ndarray-dnannsum
Open

AtharvaPatange wants to merge 2 commits into
stdlib-js:developfrom
AtharvaPatange:feat/add-blas-ext-base-ndarray-dnannsum

Conversation

@AtharvaPatange

Copy link
Copy Markdown
Contributor

Resolves a part of #14404.

Description

What is the purpose of this pull request?

This pull request:

  • adds @stdlib/blas/ext/base/ndarray/dnannsum, which computes the sum of a one-dimensional double-precision floating-point ndarray, 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?

Since the strided dnannsum writes the sum and the number of non-NaN elements to an output array, this wrapper accepts [ x, out ] (where out is a two-element one-dimensional ndarray) and returns out, following the same pattern as @stdlib/blas/ext/base/ndarray/dcuany. Is this the preferred API for the *nannsum* ndarray wrappers? If so, I'll follow the same approach for the remaining packages in this family.

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

I used Claude Code to study existing blas/ext/base/ndarray packages (mainly dcuany and dnansum) for conventions, and to help draft the tests, benchmarks and documentation. I reviewed all changes and verified them locally (tests, examples, benchmarks and lint).


@stdlib-js/reviewers

@AtharvaPatange
AtharvaPatange requested a review from a team December 4, 2026 18:22
@stdlib-bot stdlib-bot added BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS). Needs Review A pull request which needs code review. labels Dec 4, 2026
@stdlib-bot

stdlib-bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
blas/ext/base/ndarray/dnannsum $\\color{green}114/114$
$\\color{green}+100.00\\%$
$\\color{green}3/3$
$\\color{green}+100.00\\%$
$\\color{green}1/1$
$\\color{green}+100.00\\%$
$\\color{green}114/114$
$\\color{green}+100.00\\%$

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

This branch has not been deployed

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

Labels

BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS). Needs Review A pull request which needs code review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants