Skip to content

Commit db8f8d1

Browse files
Shabareesh ShettyShabareesh Shetty
authored andcommitted
chore: update example
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 5d18f71 commit db8f8d1

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

lib/node_modules/@stdlib/blas/base/zaxpy/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,23 +165,23 @@ function rand() {
165165

166166
var x = filledarrayBy( 10, 'complex128', rand );
167167
var y = filledarrayBy( 10, 'complex128', rand );
168-
var yc = zcopy( y.length, y, 1, zeros( y.length, 'complex128' ), 1 );
168+
var yc1 = zcopy( y.length, y, 1, zeros( y.length, 'complex128' ), 1 );
169169

170170
var alpha = new Complex128( 2.0, 2.0 );
171171

172172
// Scale values from `x` by `alpha` and add the result to `y`:
173173
zaxpy( x.length, alpha, x, 1, y, 1 );
174174

175175
// Print the results:
176-
logEach( '(%s)*(%s) + (%s) = %s', alpha, x, yc, y );
176+
logEach( '(%s)*(%s) + (%s) = %s', alpha, x, yc1, y );
177177

178-
yc = zcopy( y.length, y, 1, zeros( y.length, 'complex128' ), 1 );
178+
var yc2 = zcopy( yc1.length, yc1, 1, zeros( yc1.length, 'complex128' ), 1 );
179179

180180
// Scale values from `x` by `alpha` and add the result to `y` using alternative indexing semantics:
181-
zaxpy.ndarray( x.length, alpha, x, 1, 0, y, 1, 0 );
181+
zaxpy.ndarray( x.length, alpha, x, 1, 0, yc1, 1, 0 );
182182

183183
// Print the results:
184-
logEach( '(%s)*(%s) + (%s) = %s', alpha, x, yc, y );
184+
logEach( '(%s)*(%s) + (%s) = %s', alpha, x, yc2, yc1 );
185185
```
186186

187187
</section>

lib/node_modules/@stdlib/blas/base/zaxpy/examples/index.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,20 @@ function rand() {
3232

3333
var x = filledarrayBy( 10, 'complex128', rand );
3434
var y = filledarrayBy( 10, 'complex128', rand );
35-
var yc = zcopy( y.length, y, 1, zeros( y.length, 'complex128' ), 1 );
35+
var yc1 = zcopy( y.length, y, 1, zeros( y.length, 'complex128' ), 1 );
3636

3737
var alpha = new Complex128( 2.0, 2.0 );
3838

3939
// Scale values from `x` by `alpha` and add the result to `y`:
4040
zaxpy( x.length, alpha, x, 1, y, 1 );
4141

4242
// Print the results:
43-
logEach( '(%s)*(%s) + (%s) = %s', alpha, x, yc, y );
43+
logEach( '(%s)*(%s) + (%s) = %s', alpha, x, yc1, y );
44+
45+
var yc2 = zcopy( yc1.length, yc1, 1, zeros( yc1.length, 'complex128' ), 1 );
46+
47+
// Scale values from `x` by `alpha` and add the result to `y` using alternative indexing semantics:
48+
zaxpy.ndarray( x.length, alpha, x, 1, 0, yc1, 1, 0 );
49+
50+
// Print the results:
51+
logEach( '(%s)*(%s) + (%s) = %s', alpha, x, yc2, yc1 );

0 commit comments

Comments
 (0)