From 51f053b63ad076284e8ffb90222c8d41159d46a7 Mon Sep 17 00:00:00 2001 From: orthodox-64 Date: Fri, 5 Dec 2025 19:24:26 +0530 Subject: [PATCH] refactor: examples in stats/max --- lib/node_modules/@stdlib/stats/max/README.md | 10 ++-------- lib/node_modules/@stdlib/stats/max/examples/index.js | 10 ++-------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/max/README.md b/lib/node_modules/@stdlib/stats/max/README.md index 1b978bf7cb69..b6faa817535f 100644 --- a/lib/node_modules/@stdlib/stats/max/README.md +++ b/lib/node_modules/@stdlib/stats/max/README.md @@ -209,19 +209,13 @@ The method accepts the following options: ```javascript -var discreteUniform = require( '@stdlib/random/array/discrete-uniform' ); +var uniform = require( '@stdlib/random/uniform' ); var getDType = require( '@stdlib/ndarray/dtype' ); var ndarray2array = require( '@stdlib/ndarray/to-array' ); -var ndarray = require( '@stdlib/ndarray/ctor' ); var max = require( '@stdlib/stats/max' ); // Generate an array of random numbers: -var xbuf = discreteUniform( 25, 0, 20, { - 'dtype': 'generic' -}); - -// Wrap in an ndarray: -var x = new ndarray( 'generic', xbuf, [ 5, 5 ], [ 5, 1 ], 0, 'row-major' ); +var x = uniform( [ 5, 5 ], 0.0, 20.0 ); console.log( ndarray2array( x ) ); // Perform a reduction: diff --git a/lib/node_modules/@stdlib/stats/max/examples/index.js b/lib/node_modules/@stdlib/stats/max/examples/index.js index cee85d494ffc..520fa720f96c 100644 --- a/lib/node_modules/@stdlib/stats/max/examples/index.js +++ b/lib/node_modules/@stdlib/stats/max/examples/index.js @@ -18,19 +18,13 @@ 'use strict'; -var discreteUniform = require( '@stdlib/random/array/discrete-uniform' ); +var uniform = require( '@stdlib/random/uniform' ); var getDType = require( '@stdlib/ndarray/dtype' ); var ndarray2array = require( '@stdlib/ndarray/to-array' ); -var ndarray = require( '@stdlib/ndarray/ctor' ); var max = require( './../lib' ); // Generate an array of random numbers: -var xbuf = discreteUniform( 25, 0, 20, { - 'dtype': 'generic' -}); - -// Wrap in an ndarray: -var x = new ndarray( 'generic', xbuf, [ 5, 5 ], [ 5, 1 ], 0, 'row-major' ); +var x = uniform( [ 5, 5 ], 0.0, 20.0 ); console.log( ndarray2array( x ) ); // Perform a reduction: