Skip to content

Commit dcad010

Browse files
committed
Auto-generated commit
1 parent 1a827fc commit dcad010

4 files changed

Lines changed: 11 additions & 23 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
<section class="release" id="unreleased">
66

7-
## Unreleased (2025-04-25)
7+
## Unreleased (2025-04-29)
88

99
<section class="features">
1010

@@ -22,6 +22,7 @@
2222

2323
<details>
2424

25+
- [`9832ef4`](https://github.com/stdlib-js/stdlib/commit/9832ef44d25da27f865073661bde886af90cc9b4) - **docs:** update examples to use `random/array` utilities [(#6836)](https://github.com/stdlib-js/stdlib/pull/6836) _(by Gururaj Gurram)_
2526
- [`5d94f92`](https://github.com/stdlib-js/stdlib/commit/5d94f9213500163957b30ea3ad36df4c141a5d41) - **feat:** add C ndarray interface and refactor implementation for `stats/base/dsempn` [(#6785)](https://github.com/stdlib-js/stdlib/pull/6785) _(by Gururaj Gurram, Athan Reines, stdlib-bot)_
2627
- [`4b639f0`](https://github.com/stdlib-js/stdlib/commit/4b639f0bfee0b847a562dca5dd9e79a5c5b090fe) - **refactor:** update paths _(by Aayush Khanna)_
2728
- [`4df836a`](https://github.com/stdlib-js/stdlib/commit/4df836acfee5e6f359fc5d15a31ee9f6ef4237f0) - **refactor:** update paths _(by Aayush Khanna)_

README.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -198,18 +198,12 @@ var v = dsempn.ndarray( 4, 1, x, 2, 1 );
198198
<!-- eslint no-undef: "error" -->
199199

200200
```javascript
201-
var randu = require( '@stdlib/random-base-randu' );
202-
var round = require( '@stdlib/math-base-special-round' );
203-
var Float64Array = require( '@stdlib/array-float64' );
201+
var discreteUniform = require( '@stdlib/random-array-discrete-uniform' );
204202
var dsempn = require( '@stdlib/stats-base-dsempn' );
205203

206-
var x;
207-
var i;
208-
209-
x = new Float64Array( 10 );
210-
for ( i = 0; i < x.length; i++ ) {
211-
x[ i ] = round( (randu()*100.0) - 50.0 );
212-
}
204+
var x = discreteUniform( 10, -50, 50, {
205+
'dtype': 'float64'
206+
});
213207
console.log( x );
214208

215209
var v = dsempn( x.length, 1, x, 1 );

examples/index.js

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,12 @@
1818

1919
'use strict';
2020

21-
var randu = require( '@stdlib/random-base-randu' );
22-
var round = require( '@stdlib/math-base-special-round' );
23-
var Float64Array = require( '@stdlib/array-float64' );
21+
var discreteUniform = require( '@stdlib/random-array-discrete-uniform' );
2422
var dsempn = require( './../lib' );
2523

26-
var x;
27-
var i;
28-
29-
x = new Float64Array( 10 );
30-
for ( i = 0; i < x.length; i++ ) {
31-
x[ i ] = round( (randu()*100.0) - 50.0 );
32-
}
24+
var x = discreteUniform( 10, -50, 50, {
25+
'dtype': 'float64'
26+
});
3327
console.log( x );
3428

3529
var v = dsempn( x.length, 1, x, 1 );

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,8 @@
6363
"@stdlib/math-base-assert-is-nan": "^0.2.2",
6464
"@stdlib/math-base-special-abs": "^0.2.2",
6565
"@stdlib/math-base-special-pow": "^0.3.0",
66-
"@stdlib/math-base-special-round": "^0.3.0",
66+
"@stdlib/random-array-discrete-uniform": "^0.2.1",
6767
"@stdlib/random-array-uniform": "^0.2.1",
68-
"@stdlib/random-base-randu": "^0.2.1",
6968
"proxyquire": "^2.0.0",
7069
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
7170
"istanbul": "^0.4.1",

0 commit comments

Comments
 (0)