Repository navigation
docs: use dedicated zero-dimensional tensor constructor in blas/ext/base/ndarray/dxsa - #16687
Merged
Merged
Conversation
…base/ndarray/dxsa`
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves a part of #16654.
Description
This pull request:
@stdlib/blas/ext/base/ndarray/dxsato use the dedicatedFloat64Tensor0Dconstructor (@stdlib/ndarray/tensor0d/float64) instead of@stdlib/ndarray/from-scalarwhen creating the zero-dimensionalalphandarray. 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@examplecomments.Related Issues
This pull request has the following related issues:
Reference Packages
This pull request followed these packages:
blas/ext/base/ndarray/daxpby(commit 3757981, referenced in the issue)blas/ext/base/ndarray/cxsa(docs: use dedicated zero-dimensional tensor constructor inblas/ext/base/ndarray/cxsa#16685) andblas/ext/base/ndarray/zwxsa(docs: use dedicated zero-dimensional tensor constructor inblas/ext/base/ndarray/zwxsa#16686), which apply the same change to sibling packagesblas/ext/base/ndarray/cunitspace(docs: use dedicated zero-dimensional tensor constructor inblas/ext/base/ndarray/cunitspace#16675, including the review feedback)from-scalarwith the typedtensor0dconstructor.var x = ...andvar alpha = ...in the documentation examples, as requested in the review of docs: use dedicated zero-dimensional tensor constructor inblas/ext/base/ndarray/cunitspace#16675.float64takes a single value (new Float64Tensor0D( 5.0 )), so noComplexconstructor orrequireneeded removing.from-scalarwas called either with an inline{ 'dtype': 'float64' }object or with a sharedoptions/optsvariable. Both forms were replaced. The sharedoptions/optsvariable was kept where it is still used to createx(the benchmarks,examples/index.js, and the second README example) and was removed fromdocs/repl.txt, where onlyalphaused it.examples/index.js, because other statements sit between the declarations there.Questions
No.
Other
Run locally for this package:
examples/index.jstest/test.js(4/4 pass),test/test.main.js(12/12 pass)test/test.native.js(12/12 pass), after building the addon withnode-gypbenchmark/benchmark.js(18/18 pass)benchmark/benchmark.native.js(18/18 pass)make lint-javascript-fileson the changed JavaScript files (0 errors; one pre-existingmax-lenwarning in each oftest/test.main.jsandtest/test.native.js, on a line this PR doesn't change)make lint-markdown-fileson the README (no issues)make lint-typescript-declarations-filesondocs/types/index.d.tsanddocs/types/test.ts(no issues)@stdlib/_tools/lint/repl-txt) on the package'sdocs/repl.txt(no errors or warnings)Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
I used Claude Code to find this package, apply the
from-scalartoFloat64Tensor0Dreplacement, and run the linters, tests and benchmarks (including building the native addon). I reviewed the full diff before committing.@stdlib-js/reviewers