Skip to content

Commit e8c5455

Browse files
committed
Auto-generated commit
1 parent 4627057 commit e8c5455

File tree

6 files changed

+28
-13
lines changed

6 files changed

+28
-13
lines changed

CHANGELOG.md

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

7-
## Unreleased (2025-01-20)
7+
## Unreleased (2025-02-09)
88

99
<section class="features">
1010

@@ -34,6 +34,8 @@ This release closes the following issue:
3434

3535
<details>
3636

37+
- [`d53a818`](https://github.com/stdlib-js/stdlib/commit/d53a8184c029c3df7c45a7a1a2da9ff90b4f883e) - **docs:** fix errors in the structure of READMEs in `stats/base/*` [(#5138)](https://github.com/stdlib-js/stdlib/pull/5138) _(by Aayush Khanna)_
38+
- [`247af42`](https://github.com/stdlib-js/stdlib/commit/247af42a6ec69194b9d251be4785c120155d7fd8) - **bench:** refactor random number generation in `stats/base/dists/cosine` [(#4861)](https://github.com/stdlib-js/stdlib/pull/4861) _(by Karan Anand)_
3739
- [`33a4af8`](https://github.com/stdlib-js/stdlib/commit/33a4af8ea02d79120618cb4d50edb87d8aeab6a0) - **chore:** remove extra spaces _(by Philipp Burckhardt)_
3840
- [`895313e`](https://github.com/stdlib-js/stdlib/commit/895313e08f1006053fd6d995494bdf546002694e) - **docs:** update descriptions _(by Athan Reines)_
3941
- [`5f6bc87`](https://github.com/stdlib-js/stdlib/commit/5f6bc87d96a21664aeb7f4b097f03ba45ebb90ab) - **feat:** add C implementation for `stats/base/dists/cosine/logcdf` [(#4499)](https://github.com/stdlib-js/stdlib/pull/4499) _(by Prashant Kumar Yadav)_
@@ -48,9 +50,11 @@ This release closes the following issue:
4850

4951
### Contributors
5052

51-
A total of 3 people contributed to this release. Thank you to the following contributors:
53+
A total of 5 people contributed to this release. Thank you to the following contributors:
5254

55+
- Aayush Khanna
5356
- Athan Reines
57+
- Karan Anand
5458
- Philipp Burckhardt
5559
- Prashant Kumar Yadav
5660

CONTRIBUTORS

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ EuniceSim142 <77243938+EuniceSim142@users.noreply.github.com>
3737
Frank Kovacs <fran70kk@gmail.com>
3838
Golden Kumar <103646877+AuenKr@users.noreply.github.com>
3939
Gunj Joshi <gunjjoshi8372@gmail.com>
40-
Gururaj Gurram <143020143+gururaj1512@users.noreply.github.com>
40+
Gururaj Gurram <gururajgurram1512@gmail.com>
4141
HarshaNP <96897754+GittyHarsha@users.noreply.github.com>
4242
Harshita Kalani <harshitakalani02@gmail.com>
4343
Hridyanshu <124202756+HRIDYANSHU054@users.noreply.github.com>
@@ -63,6 +63,7 @@ Marcus Fantham <mfantham@users.noreply.github.com>
6363
Matt Cochrane <matthew.cochrane.eng@gmail.com>
6464
Mihir Pandit <129577900+MSP20086@users.noreply.github.com>
6565
Milan Raj <rajsite@users.noreply.github.com>
66+
Mohammad Bin Aftab <48010758+MohammadBinAftab@users.noreply.github.com>
6667
Mohammad Kaif <mdkaifprofession@gmail.com>
6768
Momtchil Momtchev <momtchil@momtchev.com>
6869
Muhammad Haris <harriskhan047@outlook.com>
@@ -124,6 +125,8 @@ Vivek Maurya <vm8118134@gmail.com>
124125
Xiaochuan Ye <tap91624@gmail.com>
125126
Yaswanth Kosuru <116426380+yaswanthkosuru@users.noreply.github.com>
126127
Yernar Yergaziyev <yernar.yergaziyev@erg.kz>
128+
ekambains <bainsinbusiness@gmail.com>
127129
olenkabilonizhka <62379231+olenkabilonizhka@users.noreply.github.com>
130+
pranav-1720 <123018993+pranav-1720@users.noreply.github.com>
128131
rainn <88160429+AmCodesLame@users.noreply.github.com>
129132
rei2hu <reimu@reimu.ws>

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,8 @@ for ( i = 0; i < 10; i++ ) {
196196

197197
<!-- C interface documentation. -->
198198

199+
* * *
200+
199201
<section class="c">
200202

201203
## C APIs

benchmark/benchmark.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
var bench = require( '@stdlib/bench-harness' );
2424
var Float64Array = require( '@stdlib/array-float64' );
25-
var randu = require( '@stdlib/random-base-randu' );
25+
var uniform = require( '@stdlib/random-base-uniform' );
2626
var isnan = require( '@stdlib/math-base-assert-is-nan' );
2727
var EPS = require( '@stdlib/constants-float64-eps' );
2828
var pkg = require( './../package.json' ).name;
@@ -44,9 +44,9 @@ bench( pkg, function benchmark( b ) {
4444
mu = new Float64Array( len );
4545
s = new Float64Array( len );
4646
for ( i = 0; i < len; i++ ) {
47-
x[ i ] = ( randu()*100.0 ) - 50.0;
48-
mu[ i ] = ( randu()*20.0 ) - 10.0;
49-
s[ i ] = ( randu()*5.0 ) + EPS;
47+
x[ i ] = uniform( -50.0, 50.0 );
48+
mu[ i ] = uniform( -10.0, 10.0 );
49+
s[ i ] = uniform( EPS, 5.0 );
5050
}
5151

5252
b.tic();
@@ -66,6 +66,7 @@ bench( pkg, function benchmark( b ) {
6666

6767
bench( pkg+':factory', function benchmark( b ) {
6868
var mylogcdf;
69+
var len;
6970
var mu;
7071
var s;
7172
var x;
@@ -75,11 +76,15 @@ bench( pkg+':factory', function benchmark( b ) {
7576
mu = 10.0;
7677
s = 4.0;
7778
mylogcdf = logcdf.factory( mu, s );
79+
len = 100;
80+
x = new Float64Array( len );
81+
for ( i = 0; i < len; i++ ) {
82+
x[ i ] = uniform( 0.0, 50.0 );
83+
}
7884

7985
b.tic();
8086
for ( i = 0; i < b.iterations; i++ ) {
81-
x = ( randu()*50.0 );
82-
y = mylogcdf( x );
87+
y = mylogcdf( x[ i % len ] );
8388
if ( isnan( y ) ) {
8489
b.fail( 'should not return NaN' );
8590
}

benchmark/benchmark.native.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
var resolve = require( 'path' ).resolve;
2424
var bench = require( '@stdlib/bench-harness' );
2525
var Float64Array = require( '@stdlib/array-float64' );
26-
var randu = require( '@stdlib/random-base-randu' );
26+
var uniform = require( '@stdlib/random-base-uniform' );
2727
var EPS = require( '@stdlib/constants-float64-eps' );
2828
var isnan = require( '@stdlib/math-base-assert-is-nan' );
2929
var tryRequire = require( '@stdlib/utils-try-require' );
@@ -53,9 +53,9 @@ bench( pkg+'::native', opts, function benchmark( b ) {
5353
mu = new Float64Array( len );
5454
s = new Float64Array( len );
5555
for ( i = 0; i < len; i++ ) {
56-
x[ i ] = ( randu()*100.0 ) - 50.0;
57-
mu[ i ] = ( randu()*20.0 ) - 10.0;
58-
s[ i ] = ( randu()*5.0 ) + EPS;
56+
x[ i ] = uniform( -50.0, 50.0 );
57+
mu[ i ] = uniform( -10.0, 10.0 );
58+
s[ i ] = uniform( EPS, 5.0 );
5959
}
6060

6161
b.tic();

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
"@stdlib/constants-float64-pinf": "^0.2.2",
5858
"@stdlib/math-base-special-abs": "^0.2.2",
5959
"@stdlib/random-base-randu": "^0.2.1",
60+
"@stdlib/random-base-uniform": "^0.2.1",
6061
"@stdlib/utils-try-require": "^0.2.2",
6162
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
6263
"istanbul": "^0.4.1",

0 commit comments

Comments
 (0)