File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
lib/node_modules/@stdlib/blas/base/dzasum Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -157,15 +157,20 @@ var filledarrayBy = require( '@stdlib/array/filled-by' );
157
157
var dzasum = require ( ' @stdlib/blas/base/dzasum' );
158
158
159
159
function rand () {
160
- return new Complex128 ( discreteUniform ( 0 , 10 ), discreteUniform ( - 5 , 5 ) );
160
+ return new Complex128 ( discreteUniform ( 0 , 10 ), discreteUniform ( - 5 , 5 ) );
161
161
}
162
162
163
163
// Generate random input arrays:
164
164
var x = filledarrayBy ( 10 , ' complex128' , rand );
165
165
console .log ( x .toString () );
166
166
167
+ // Compute the sum of the absolute values of each element:
167
168
var out = dzasum ( x .length , x, 1 );
168
169
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 );
169
174
```
170
175
171
176
</section >
You can’t perform that action at this time.
0 commit comments