Skip to content

Commit d9c37b9

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

File tree

1 file changed

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

1 file changed

+5
-7
lines changed

lib/node_modules/@stdlib/math/base/special/cinvf/README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,15 @@ var im = imagf( v );
7676
<!-- eslint no-undef: "error" -->
7777

7878
```javascript
79-
var Complex64 = require( '@stdlib/complex/float64/ctor' );
80-
var uniform = require( '@stdlib/random/base/uniform' );
81-
var filledarrayBy = require( '@stdlib/array/filled-by' );
79+
var Complex64Array = require( '@stdlib/array/complex64' );
80+
var uniform = require( '@stdlib/random/array/uniform' );
8281
var logEachMap = require( '@stdlib/console/log-each-map' );
8382
var cinvf = require( '@stdlib/math/base/special/cinvf' );
8483

85-
function clbk() {
86-
return new Complex64( uniform( -50.0, 50.0 ), uniform( -50.0, 50.0 ) );
87-
}
88-
var arr = filledarrayBy( 100, 'complex64', clbk );
84+
// Create an array of random numbers:
85+
var arr = new Complex64Array( uniform( 200, -100.0, 100.0 ) );
8986

87+
// Compute the inverse of each number in the array:
9088
logEachMap( '1.0 / (%s) = %s', arr, cinvf );
9189
```
9290

0 commit comments

Comments
 (0)