feat: add blas/base/ndarray/caxpy#11459
feat: add blas/base/ndarray/caxpy#11459MeKaustubh07 wants to merge 6 commits intostdlib-js:developfrom
blas/base/ndarray/caxpy#11459Conversation
Coverage Report
The above coverage report was generated for the changes in this PR. |
| 'use strict'; | ||
|
|
||
| /** | ||
| * BLAS level 1 routine to multiply a one-dimensional single-precision complex floating-point ndarray `x` by a constant `alpha` and add the result to a one-dimensional single-precision complex floating-point ndarray `y`. |
There was a problem hiding this comment.
Hmm...I am not actually seeing why the linter is failing here. The values look the same. This is possibly a bug in our doctest runner.
There was a problem hiding this comment.
I think this wasn’t about lint/style issue in index.js, it seems failing job was the JavaScript example runner, and the error was a runtime RangeError from Complex64Array length validation.
| * var ybuf = new Complex64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] ); | ||
| * var y = new ndarray( 'complex64', ybuf, [ 4 ], [ 1 ], 0, 'row-major' ); | ||
| * | ||
| * var alpha = scalar2ndarray( new Complex64( 0.4, -0.7 ), 'complex64', 'row-major' ); |
There was a problem hiding this comment.
As a workaround, you can make your life easier by using integer values here.
| * var alpha = scalar2ndarray( new Complex64( 0.4, -0.7 ), 'complex64', 'row-major' ); | |
| * var alpha = scalar2ndarray( new Complex64( 1.0, 2.0 ), 'complex64', 'row-major' ); |
There was a problem hiding this comment.
This way you don't return approximate values but nice round numbers. Applies throughout this PR.
There was a problem hiding this comment.
Yep, makes sense now. it was originally a base/caxpy interpretation. Thanks for the suggestion!
|
/stdlib merge |
@MeKaustubh07, the slash command failed to complete. Please check the workflow logs for details. |
Description
This pull request:
blas/base/ndarray/caxpyRelated Issues
This pull request has the following related issues:
Questions
No.
Other
No.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
{{TODO: add disclosure if applicable}}
@stdlib-js/reviewers