Skip to content

Commit 1a3dc71

Browse files
authored
chore: update markdown example
Signed-off-by: Shabareesh Shetty <[email protected]>
1 parent 88559fb commit 1a3dc71

File tree

1 file changed

+6
-1
lines changed
  • lib/node_modules/@stdlib/blas/base/dzasum

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,20 @@ var filledarrayBy = require( '@stdlib/array/filled-by' );
157157
var dzasum = require( '@stdlib/blas/base/dzasum' );
158158

159159
function rand() {
160-
return new Complex128( discreteUniform( 0, 10 ), discreteUniform( -5, 5 ) );
160+
return new Complex128( discreteUniform( 0, 10 ), discreteUniform( -5, 5 ) );
161161
}
162162

163163
// Generate random input arrays:
164164
var x = filledarrayBy( 10, 'complex128', rand );
165165
console.log( x.toString() );
166166

167+
// Compute the sum of the absolute values of each element:
167168
var out = dzasum( x.length, x, 1 );
168169
console.log( out );
170+
171+
// Compute the sum of the absolute values of each element using alternative indexing semantics:
172+
out = dzasum.ndarray( x.length, x, 1, 0 );
173+
console.log( out );
169174
```
170175

171176
</section>

0 commit comments

Comments
 (0)