diff --git a/lib/node_modules/@stdlib/random/array/README.md b/lib/node_modules/@stdlib/random/array/README.md index 72f89475a39f..4e4468408c81 100644 --- a/lib/node_modules/@stdlib/random/array/README.md +++ b/lib/node_modules/@stdlib/random/array/README.md @@ -95,15 +95,46 @@ The namespace contains the following: ## Examples - - ```javascript -var objectKeys = require( '@stdlib/utils/keys' ); var ns = require( '@stdlib/random/array' ); -console.log( objectKeys( ns ) ); +// Generate arrays with ten random numbers drawn from the respective distributions: +var out = ns.arcsine( 10, 2.0, 5.0 ); +// returns + +out = ns.weibull( 10, 2.0, 5.0 ); +// returns + +out = ns.laplace( 10, 2.0, 5.0 ); +// returns + +// Factory methods: + +// 1. Basic factory usage (no parameters): +var random = ns.arcsine.factory(); +out = random( 10, 2.0, 5.0 ); +// returns + +// 2. Factory with options (e.g., seed): +random = ns.arcsine.factory({ + 'seed': 1234 +}); +out = random( 10, 2.0, 5.0 ); +// returns + +// 3. Factory with distribution parameters: +random = ns.arcsine.factory( 2.0, 5.0 ); +out = random( 10 ); +// returns + +// 4. Factory with both distribution parameters and options: +random = ns.arcsine.factory( 2.0, 5.0, { + 'dtype': 'float32' +}); +out = random( 10 ); +// returns ``` diff --git a/lib/node_modules/@stdlib/random/array/examples/index.js b/lib/node_modules/@stdlib/random/array/examples/index.js index c876063831b1..f8f172e8a2a5 100644 --- a/lib/node_modules/@stdlib/random/array/examples/index.js +++ b/lib/node_modules/@stdlib/random/array/examples/index.js @@ -18,7 +18,47 @@ 'use strict'; -var objectKeys = require( '@stdlib/utils/keys' ); var ns = require( './../lib' ); -console.log( objectKeys( ns ) ); +// Generate arrays with ten random numbers drawn from the respective distributions: +var out = ns.arcsine( 10, 2.0, 5.0 ); +console.log( out ); +// => + +out = ns.weibull( 10, 2.0, 5.0 ); +console.log( out ); +// => + +out = ns.laplace( 10, 2.0, 5.0 ); +console.log( out ); +// => + +// Factory methods: + +// 1. Basic factory usage (no parameters): +var random = ns.arcsine.factory(); +out = random( 10, 2.0, 5.0 ); +console.log( out ); +// => + +// 2. Factory with options (e.g., seed): +random = ns.arcsine.factory({ + 'seed': 1234 +}); +out = random( 10, 2.0, 5.0 ); +console.log( out ); +// => + +// 3. Factory with distribution parameters: +random = ns.arcsine.factory( 2.0, 5.0 ); +out = random( 10 ); +console.log( out ); +// => + +// 4. Factory with both distribution parameters and options: +random = ns.arcsine.factory( 2.0, 5.0, { + 'dtype': 'float32' +}); +out = random( 10 ); +console.log( out ); +// =>