From 71ed0f0b462b9790e9f97e234d9eaa6e100aeaae Mon Sep 17 00:00:00 2001 From: orthodox-64 Date: Fri, 5 Dec 2025 19:01:44 +0530 Subject: [PATCH] refactor: examples in stats/maxabs --- lib/node_modules/@stdlib/stats/maxabs/README.md | 10 ++-------- .../@stdlib/stats/maxabs/examples/index.js | 10 ++-------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/maxabs/README.md b/lib/node_modules/@stdlib/stats/maxabs/README.md index c9d43c6efd4d..7dd35819ac87 100644 --- a/lib/node_modules/@stdlib/stats/maxabs/README.md +++ b/lib/node_modules/@stdlib/stats/maxabs/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 maxabs = require( '@stdlib/stats/maxabs' ); // Generate an array of random numbers: -var xbuf = discreteUniform( 25, -10, 10, { - 'dtype': 'generic' -}); - -// Wrap in an ndarray: -var x = new ndarray( 'generic', xbuf, [ 5, 5 ], [ 5, 1 ], 0, 'row-major' ); +var x = uniform( [ 5, 5 ], -10.0, 10.0 ); console.log( ndarray2array( x ) ); // Perform a reduction: diff --git a/lib/node_modules/@stdlib/stats/maxabs/examples/index.js b/lib/node_modules/@stdlib/stats/maxabs/examples/index.js index 915caa1bdd81..74762ea3338f 100644 --- a/lib/node_modules/@stdlib/stats/maxabs/examples/index.js +++ b/lib/node_modules/@stdlib/stats/maxabs/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 maxabs = require( './../lib' ); // Generate an array of random numbers: -var xbuf = discreteUniform( 25, -10, 10, { - 'dtype': 'generic' -}); - -// Wrap in an ndarray: -var x = new ndarray( 'generic', xbuf, [ 5, 5 ], [ 5, 1 ], 0, 'row-major' ); +var x = uniform( [ 5, 5 ], -10.0, 10.0 ); console.log( ndarray2array( x ) ); // Perform a reduction: