Skip to content

docs: use dedicated zero-dimensional tensor constructor in blas/ext/base/ndarray/cxsa - #16685

Merged
kgryte merged 1 commit into
stdlib-js:developfrom
Deepanshu-Mehta:contrib/cxsa-tensor0d
Nov 18, 2026
Merged

kgryte merged 1 commit into
stdlib-js:developfrom
Deepanshu-Mehta:contrib/cxsa-tensor0d

Conversation

@Deepanshu-Mehta

Copy link
Copy Markdown
Contributor

Resolves a part of #16654.

Description

What is the purpose of this pull request?

This pull request:

  • updates @stdlib/blas/ext/base/ndarray/cxsa to use the dedicated Complex64Tensor0D constructor (@stdlib/ndarray/tensor0d/complex64) instead of @stdlib/ndarray/from-scalar when creating the zero-dimensional alpha ndarray. The change covers the README examples, REPL text, TypeScript declaration example and type tests (docs/types/test.ts), JSDoc examples (lib/index.js, lib/main.js, lib/native.js), examples/index.js, the benchmarks, and the unit tests.

Runtime code and TypeScript signatures are unchanged. The only edits under lib/ are @example comments.

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

Reference Packages

Did the content of this pull request follow one or more existing packages? Answering is optional.

This pull request followed these packages:

What carried over from the reference(s)?

What differed, or what did you have to work out yourself?

  • complex64 takes the real and imaginary parts directly (new Complex64Tensor0D( 5.0, 0.0 )), so the intermediate Complex64 instance and its require were removed.
  • Unlike cunitspace, this package also has native variants (lib/native.js, test/test.native.js, benchmark/benchmark.native.js), which were updated in the same way.
  • The blank line was left in the second README example and in examples/index.js, because other statements sit between x and alpha there.

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.

Run locally for this package:

  • examples/index.js
  • unit tests: test/test.js (4/4 pass), test/test.main.js (12/12 pass)
  • native unit tests: test/test.native.js (12/12 pass), after building the addon with node-gyp
  • benchmark: benchmark/benchmark.js (18/18 pass)
  • native benchmark: benchmark/benchmark.native.js (18/18 pass)
  • make lint-javascript-files on the changed JavaScript files (no issues)
  • make lint-markdown-files on the README (no issues)
  • make lint-typescript-declarations-files on docs/types/index.d.ts and docs/types/test.ts (no issues)
  • REPL help linter (@stdlib/_tools/lint/repl-txt) on the package's docs/repl.txt (no errors or warnings)

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

N/A. No AI assistance was used.


@stdlib-js/reviewers

@Deepanshu-Mehta
Deepanshu-Mehta requested a review from a team November 18, 2026 04:48
@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 Nov 18, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
blas/ext/base/ndarray/cxsa $\\color{green}193/193$
$\\color{green}+100.00\\%$
$\\color{green}7/7$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}193/193$
$\\color{green}+100.00\\%$

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

@kgryte kgryte added Documentation Improvements, additions, or changes to documentation. difficulty: 1 Low degree of difficulty. Should be straightforward to implement and/or resolve. review: 5 and removed Needs Review A pull request which needs code review. labels Nov 18, 2026

@kgryte kgryte left a comment

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.

LGTM

@kgryte
kgryte merged commit 02116b2 into stdlib-js:develop Nov 18, 2026
99 checks passed
@stdlib-bot stdlib-bot added the Good First PR A pull request resolving a Good First Issue. label Nov 18, 2026
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). difficulty: 1 Low degree of difficulty. Should be straightforward to implement and/or resolve. Documentation Improvements, additions, or changes to documentation. Good First PR A pull request resolving a Good First Issue. review: 5

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants