Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Dec 3, 2023
1 parent 9bf8dcd commit c3c6366
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 17 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,13 @@ gscal.ndarray( 3, 5.0, x, 1, x.length-3 );
<!-- eslint no-undef: "error" -->

```javascript
var discreteUniform = require( '@stdlib/random-base-discrete-uniform' ).factory;
var filledarrayBy = require( '@stdlib/array-filled-by' );
var discreteUniform = require( '@stdlib/random-array-discrete-uniform' );
var gscal = require( '@stdlib/blas-base-gscal' );

var x = filledarrayBy( 10, 'float64', discreteUniform( -100, 100 ) );
var opts = {
'dtype': 'float64'
};
var x = discreteUniform( 10, -100, 100, opts );
console.log( x );

gscal( x.length, 5.0, x, 1 );
Expand Down
9 changes: 5 additions & 4 deletions benchmark/benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
// MODULES //

var bench = require( '@stdlib/bench' );
var uniform = require( '@stdlib/random-base-uniform' ).factory;
var filledarrayBy = require( '@stdlib/array-filled-by' );
var uniform = require( '@stdlib/random-array-uniform' );
var isnan = require( '@stdlib/math-base-assert-is-nan' );
var pow = require( '@stdlib/math-base-special-pow' );
var pkg = require( './../package.json' ).name;
Expand All @@ -31,7 +30,9 @@ var gscal = require( './../lib' );

// VARIABLES //

var rand = uniform( -100.0, 100.0 );
var options = {
'dtype': 'generic'
};


// FUNCTIONS //
Expand All @@ -44,7 +45,7 @@ var rand = uniform( -100.0, 100.0 );
* @returns {Function} benchmark function
*/
function createBenchmark( len ) {
var x = filledarrayBy( len, 'generic', rand );
var x = uniform( len, -100.0, 100.0, options );
return benchmark;

function benchmark( b ) {
Expand Down
9 changes: 5 additions & 4 deletions benchmark/benchmark.ndarray.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
// MODULES //

var bench = require( '@stdlib/bench' );
var uniform = require( '@stdlib/random-base-uniform' ).factory;
var filledarrayBy = require( '@stdlib/array-filled-by' );
var uniform = require( '@stdlib/random-array-uniform' );
var isnan = require( '@stdlib/math-base-assert-is-nan' );
var pow = require( '@stdlib/math-base-special-pow' );
var pkg = require( './../package.json' ).name;
Expand All @@ -31,7 +30,9 @@ var gscal = require( './../lib' ).ndarray;

// VARIABLES //

var rand = uniform( -100.0, 100.0 );
var options = {
'dtype': 'generic'
};


// FUNCTIONS //
Expand All @@ -44,7 +45,7 @@ var rand = uniform( -100.0, 100.0 );
* @returns {Function} benchmark function
*/
function createBenchmark( len ) {
var x = filledarrayBy( len, 'generic', rand );
var x = uniform( len, -100.0, 100.0, options );
return benchmark;

function benchmark( b ) {
Expand Down
8 changes: 5 additions & 3 deletions examples/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@

'use strict';

var discreteUniform = require( '@stdlib/random-base-discrete-uniform' ).factory;
var filledarrayBy = require( '@stdlib/array-filled-by' );
var discreteUniform = require( '@stdlib/random-array-discrete-uniform' );
var gscal = require( './../lib' );

var x = filledarrayBy( 10, 'float64', discreteUniform( -100, 100 ) );
var opts = {
'dtype': 'float64'
};
var x = discreteUniform( 10, -100, 100, opts );
console.log( x );

gscal( x.length, 5.0, x, 1 );
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,12 @@
"@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1"
},
"devDependencies": {
"@stdlib/array-filled-by": "^0.1.0",
"@stdlib/array-float64": "^0.1.1",
"@stdlib/bench": "^0.2.1",
"@stdlib/math-base-assert-is-nan": "^0.1.1",
"@stdlib/math-base-special-pow": "^0.1.0",
"@stdlib/random-base-discrete-uniform": "^0.1.0",
"@stdlib/random-base-uniform": "^0.1.0",
"@stdlib/random-array-discrete-uniform": "^0.1.0",
"@stdlib/random-array-uniform": "^0.1.0",
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
"istanbul": "^0.4.1",
"tap-min": "git+https://github.com/Planeshifter/tap-min.git"
Expand Down

0 comments on commit c3c6366

Please sign in to comment.