Skip to content

Commit 2c07828

Browse files
authored
docs: use Float64Array
Signed-off-by: Athan <[email protected]>
1 parent 88ab751 commit 2c07828

File tree

1 file changed

+4
-2
lines changed
  • lib/node_modules/@stdlib/blas/ext/base/wasm/dnansumkbn2

1 file changed

+4
-2
lines changed

lib/node_modules/@stdlib/blas/ext/base/wasm/dnansumkbn2/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ Computes the sum of double-precision floating-point strided array elements, igno
142142
<!-- eslint-disable node/no-sync -->
143143

144144
```javascript
145+
var Float64Array = require( '@stdlib/array/float64' );
145146
var Memory = require( '@stdlib/wasm/memory' );
146147

147148
// Create a new memory instance with an initial size of 10 pages (640KiB) and a maximum size of 100 pages (6.4MiB):
@@ -164,7 +165,7 @@ var N = 4;
164165
var xptr = 0;
165166

166167
// Write vector values to module memory:
167-
mod.write( xptr, [ 1.0, 2.0, 3.0, NaN ] );
168+
mod.write( xptr, new Float64Array( [ 1.0, 2.0, 3.0, NaN ] ) );
168169

169170
// Perform computation:
170171
var sum = mod.main( N, xptr, 1 );
@@ -184,6 +185,7 @@ Computes the sum of double-precision floating-point strided array elements, igno
184185
<!-- eslint-disable node/no-sync -->
185186

186187
```javascript
188+
var Float64Array = require( '@stdlib/array/float64' );
187189
var Memory = require( '@stdlib/wasm/memory' );
188190

189191
// Create a new memory instance with an initial size of 10 pages (640KiB) and a maximum size of 100 pages (6.4MiB):
@@ -206,7 +208,7 @@ var N = 4;
206208
var xptr = 0;
207209

208210
// Write vector values to module memory:
209-
mod.write( xptr, [ 1.0, 2.0, 3.0, NaN ] );
211+
mod.write( xptr, new Float64Array( [ 1.0, 2.0, 3.0, NaN ] ) );
210212

211213
// Perform computation:
212214
var sum = mod.ndarray( N, xptr, 1, 0 );

0 commit comments

Comments
 (0)