Skip to content

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

Open
Deepanshu-Mehta wants to merge 1 commit into
stdlib-js:developfrom
Deepanshu-Mehta:contrib/good-first-issue
Open

Deepanshu-Mehta wants to merge 1 commit into
stdlib-js:developfrom
Deepanshu-Mehta:contrib/good-first-issue

Conversation

@Deepanshu-Mehta

Copy link
Copy Markdown

Resolves a part of #16654.

Description

What is the purpose of this pull request?

This pull request:

  • updates @stdlib/blas/ext/base/ndarray/cunitspace to use the dedicated Complex64Tensor0D constructor (@stdlib/ndarray/tensor0d/complex64) instead of @stdlib/ndarray/from-scalar when creating the zero-dimensional start ndarray. The change covers the README examples, REPL text, TypeScript declaration example, JSDoc examples (lib/index.js, lib/main.js), examples/index.js, and the benchmark.

Runtime code, TypeScript signatures, and unit tests 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:

  • blas/ext/base/ndarray/daxpby (commit 3757981, referenced in the issue)
  • blas/ext/base/ndarray/caxpby (for the Complex64Tensor0D pattern)

What carried over from the reference(s)?

  • Replaced from-scalar plus the { 'dtype': ... } options object with the typed tensor0d constructor.

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

  • complex64 takes the real and imaginary parts directly (new Complex64Tensor0D( 3.0, 0.0 )), so the intermediate Complex64 instance and its require were removed.
  • test/test.js uses @stdlib/ndarray/base/from-scalar with explicit dtype and order arguments, not the public from-scalar this issue targets, so it was left unchanged.

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 (21/21 pass)
  • benchmark (18/18 pass)
  • ESLint on the package, including the TypeScript declarations (0 errors; one pre-existing max-len warning in test/test.js, which this PR doesn't touch)
  • make lint-javascript-files on the changed JavaScript files
  • make lint-markdown-files / remark on the README (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

…base/ndarray/cunitspace`

Replace `@stdlib/ndarray/from-scalar` with `@stdlib/ndarray/tensor0d/complex64`
when creating the zero-dimensional `start` ndarray in the README, REPL text,
TypeScript declarations example, JSDoc examples, example script, and benchmark.
Runtime behavior and the unit tests are unchanged.

Ref: stdlib-js#16654
@Deepanshu-Mehta
Deepanshu-Mehta requested a review from a team November 17, 2026 14:40
@stdlib-bot stdlib-bot added the BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS). label Nov 17, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

👋 Hi there! 👋

And thank you for opening your first pull request! We will review it shortly. 🏃 💨

Getting Started

Next Steps

  1. A project maintainer will approve GitHub Actions workflows for your PR.
  2. All CI checks must pass before your submission can be fully reviewed.
  3. You'll need to address any failures in linting or unit tests.

Running Tests Locally

You can use make to run any of the CI commands locally from the root directory of the stdlib repository:

# Run tests for all packages in the math namespace:
make test TESTS_FILTER=".*/@stdlib/math/.*"

# Run benchmarks for a specific package:
make benchmark BENCHMARKS_FILTER=".*/@stdlib/math/base/special/sin/.*"

If you haven't heard back from us within two weeks, please ping us by tagging the "reviewers" team in a comment on this PR.

If you have any further questions while waiting for a response, please join our Zulip community to chat with project maintainers and other community members.

We appreciate your contribution!

Documentation Links

@stdlib-bot stdlib-bot added Needs Review A pull request which needs code review. First-time Contributor A pull request from a contributor who has never previously committed to the project repository. labels Nov 17, 2026

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). First-time Contributor A pull request from a contributor who has never previously committed to the project repository. Needs Review A pull request which needs code review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants