Skip to content

Commit 854948d

Browse files
authored
docs: update example
Signed-off-by: Athan <[email protected]>
1 parent d9c37b9 commit 854948d

File tree

1 file changed

+5
-7
lines changed
  • lib/node_modules/@stdlib/math/base/special/cinvf/examples

1 file changed

+5
-7
lines changed

lib/node_modules/@stdlib/math/base/special/cinvf/examples/index.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,13 @@
1818

1919
'use strict';
2020

21-
var Complex64 = require( '@stdlib/complex/float64/ctor' );
22-
var uniform = require( '@stdlib/random/base/uniform' );
23-
var filledarrayBy = require( '@stdlib/array/filled-by' );
21+
var Complex64Array = require( '@stdlib/array/complex64' );
22+
var uniform = require( '@stdlib/random/array/uniform' );
2423
var logEachMap = require( '@stdlib/console/log-each-map' );
2524
var cinvf = require( './../lib' );
2625

27-
function clbk() {
28-
return new Complex64( uniform( -50.0, 50.0 ), uniform( -50.0, 50.0 ) );
29-
}
30-
var arr = filledarrayBy( 100, 'complex64', clbk );
26+
// Create an array of random numbers:
27+
var arr = new Complex64Array( uniform( 200, -100.0, 100.0 ) );
3128

29+
// Compute the inverse of each number in the array:
3230
logEachMap( '1.0 / (%s) = %s', arr, cinvf );

0 commit comments

Comments
 (0)