Skip to content

Commit 70947df

Browse files
committed
Auto-generated commit
1 parent ea72497 commit 70947df

File tree

5 files changed

+19
-19
lines changed

5 files changed

+19
-19
lines changed

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-03-29)
7+
## Unreleased (2025-04-01)
88

99
<section class="reverts">
1010

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

2323
<details>
2424

25+
- [`bb378ff`](https://github.com/stdlib-js/stdlib/commit/bb378ffa3c07f4acce9504440d26db9d2d97e091) - **docs:** replace manual `for` loop in examples [(#6472)](https://github.com/stdlib-js/stdlib/pull/6472) _(by Harsh)_
2526
- [`3a6a913`](https://github.com/stdlib-js/stdlib/commit/3a6a913fe41d3ffbbb4f73837fc6aa8396cdccce) - **bench:** update random value generation [(#6377)](https://github.com/stdlib-js/stdlib/pull/6377) _(by Harsh)_
2627
- [`a644ffe`](https://github.com/stdlib-js/stdlib/commit/a644ffeba579430f342444b80fa9d21cc4a635f4) - **chore:** remove obsolete accuracy and precision scripts [(#6435)](https://github.com/stdlib-js/stdlib/pull/6435) _(by Karan Anand)_
2728
- [`5b71452`](https://github.com/stdlib-js/stdlib/commit/5b71452bd40811341a2e4eaab018c3cc17c5feac) - **docs:** update related packages sections [(#4135)](https://github.com/stdlib-js/stdlib/pull/4135) _(by stdlib-bot, Athan Reines)_

CONTRIBUTORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ Ryan Seal <[email protected]>
132132
Rylan Yang <[email protected]>
133133
SAHIL KUMAR <[email protected]>
134134
SHIVAM YADAV <[email protected]>
135+
Sahil Goyal <[email protected]>
135136
Sai Srikar Dumpeti <[email protected]>
136137
Sanchay Ketan Sinha <[email protected]>
137138
Sarthak Paandey <[email protected]>

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -123,17 +123,16 @@ var v = log10( -4.0 );
123123
<!-- eslint no-undef: "error" -->
124124

125125
```javascript
126-
var randu = require( '@stdlib/random-base-randu' );
127-
var round = require( '@stdlib/math-base-special-round' );
126+
var discreteUniform = require( '@stdlib/random-array-discrete-uniform' );
127+
var logEachMap = require( '@stdlib/console-log-each-map' );
128128
var log10 = require( '@stdlib/math-base-special-log10' );
129129

130-
var x;
131-
var i;
130+
var opts = {
131+
'dtype': 'float64'
132+
};
133+
var x = discreteUniform( 100, 0, 100, opts );
132134

133-
for ( i = 0; i < 100; i++ ) {
134-
x = round( randu() * 100.0 );
135-
console.log( 'log10(%d) = %d', x, log10( x ) );
136-
}
135+
logEachMap( 'log10(%0.4f) = %0.4f', x, log10 );
137136
```
138137

139138
</section>

examples/index.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,13 @@
1818

1919
'use strict';
2020

21-
var randu = require( '@stdlib/random-base-randu' );
22-
var round = require( '@stdlib/math-base-special-round' );
21+
var discreteUniform = require( '@stdlib/random-array-discrete-uniform' );
22+
var logEachMap = require( '@stdlib/console-log-each-map' );
2323
var log10 = require( './../lib' );
2424

25-
var x;
26-
var i;
25+
var opts = {
26+
'dtype': 'float64'
27+
};
28+
var x = discreteUniform( 100, 0, 100, opts );
2729

28-
for ( i = 0; i < 100; i++ ) {
29-
x = round( randu() * 100.0 );
30-
console.log( 'log10(%d) = %d', x, log10( x ) );
31-
}
30+
logEachMap( 'log10(%0.4f) = %0.4f', x, log10 );

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,16 @@
5555
"@stdlib/utils-library-manifest": "^0.2.2"
5656
},
5757
"devDependencies": {
58+
"@stdlib/console-log-each-map": "github:stdlib-js/console-log-each-map#main",
5859
"@stdlib/constants-float64-eps": "^0.2.2",
5960
"@stdlib/constants-float64-pinf": "^0.2.2",
6061
"@stdlib/fs-read-file": "^0.2.2",
6162
"@stdlib/fs-write-file": "^0.2.2",
6263
"@stdlib/math-base-assert-is-positive-zero": "^0.2.2",
6364
"@stdlib/math-base-special-abs": "^0.2.2",
64-
"@stdlib/math-base-special-round": "^0.3.0",
6565
"@stdlib/math-base-tools-evalpoly-compile-c": "^0.1.1",
66+
"@stdlib/random-array-discrete-uniform": "^0.2.1",
6667
"@stdlib/random-array-uniform": "^0.2.1",
67-
"@stdlib/random-base-randu": "^0.2.1",
6868
"@stdlib/string-format": "^0.2.2",
6969
"@stdlib/string-substring-after": "^0.2.2",
7070
"@stdlib/string-substring-before": "^0.2.2",

0 commit comments

Comments
 (0)