Skip to content

Commit 393da2b

Browse files
committed
chore: add examples
--- 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: na - 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 6842519 commit 393da2b

File tree

1 file changed

+10
-5
lines changed
  • lib/node_modules/@stdlib/blas/base/zdotu/examples

1 file changed

+10
-5
lines changed

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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,16 @@ function rand() {
2727
return new Complex128( discreteUniform( 0, 10 ), discreteUniform( -5, 5 ) );
2828
}
2929

30-
var zx = filledarrayBy( 10, 'complex128', rand );
31-
console.log( zx.toString() );
30+
var x = filledarrayBy( 10, 'complex128', rand );
31+
console.log( x.toString() );
3232

33-
var zy = filledarrayBy( 10, 'complex128', rand );
34-
console.log( zy.toString() );
33+
var y = filledarrayBy( 10, 'complex128', rand );
34+
console.log( y.toString() );
3535

36-
var out = zdotu.ndarray( zx.length, zx, 1, 0, zy, -1, zy.length-1 );
36+
// Compute the dot product:
37+
var out = zdotu( x.length, x, 1, 0, y, -1, y.length-1 );
38+
console.log( out.toString() );
39+
40+
// Compute the dot product using alternative indexing semantics:
41+
out = zdotu.ndarray( x.length, x, 1, 0, y, -1, y.length-1 );
3742
console.log( out.toString() );

0 commit comments

Comments
 (0)