Skip to content

Commit 494f148

Browse files
authored
docs: update example
Signed-off-by: Athan <[email protected]>
1 parent 00b3c5f commit 494f148

File tree

1 file changed

+8
-11
lines changed
  • lib/node_modules/@stdlib/math/base/special/fast/maxf/examples

1 file changed

+8
-11
lines changed

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

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,14 @@
1818

1919
'use strict';
2020

21-
var minstd = require( '@stdlib/random/base/minstd-shuffle' );
21+
var uniform = require( '@stdlib/random/array/uniform' );
22+
var logEachMap = require( '@stdlib/console/log-each-map' );
2223
var maxf = require( './../lib' );
2324

24-
var x;
25-
var y;
26-
var v;
27-
var i;
25+
var opts = {
26+
'dtype': 'float32'
27+
};
28+
var x = uniform( 100, -10.0, 10.0, opts );
29+
var y = uniform( x.length, -10.0, 10.0, opts );
2830

29-
for ( i = 0; i < 100; i++ ) {
30-
x = minstd();
31-
y = minstd();
32-
v = maxf( x, y );
33-
console.log( 'maxf(%d,%d) = %d', x, y, v );
34-
}
31+
logEachMap( 'maxf(%0.4f,%0.4f) = %0.4f', x, y, maxf );

0 commit comments

Comments
 (0)