Skip to content

Commit 0ff8764

Browse files
committed
chore: update 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_pkg_readmes status: na - task: lint_markdown_docs status: na - 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: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 840afdc commit 0ff8764

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

  • lib/node_modules/@stdlib/blas/base/dzasum/examples

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

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2025 The Stdlib Authors.
4+
* Copyright (c) 2026 The Stdlib Authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -19,22 +19,17 @@
1919
'use strict';
2020

2121
var discreteUniform = require( '@stdlib/random/base/discrete-uniform' );
22-
var Complex128 = require( '@stdlib/complex/float64/ctor' );
2322
var filledarrayBy = require( '@stdlib/array/filled-by' );
23+
var Complex128 = require( '@stdlib/complex/float64/ctor' );
2424
var dzasum = require( './../lib' );
2525

2626
function rand() {
2727
return new Complex128( discreteUniform( 0, 10 ), discreteUniform( -5, 5 ) );
2828
}
2929

30-
// Generate random input arrays:
3130
var x = filledarrayBy( 10, 'complex128', rand );
3231
console.log( x.toString() );
3332

34-
// Compute the sum of the absolute values of each element:
33+
// Compute the sum of the absolute values of the real and imaginary components:
3534
var out = dzasum( x.length, x, 1 );
3635
console.log( out );
37-
38-
// Compute the sum of the absolute values of each element using alternative indexing semantics:
39-
out = dzasum.ndarray( x.length, x, 1, 0 );
40-
console.log( out );

0 commit comments

Comments
 (0)