Skip to content

Commit 3c6dcbd

Browse files
committed
Auto-generated commit
1 parent a69558a commit 3c6dcbd

File tree

10 files changed

+92
-34
lines changed

10 files changed

+92
-34
lines changed

.editorconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ indent_style = tab
8686
[*.{f,f.txt}]
8787
indent_style = space
8888
indent_size = 2
89-
insert_final_newline = false
9089

9190
# Set properties for shell files:
9291
[*.{sh,sh.txt}]
@@ -121,7 +120,7 @@ indent_style = tab
121120
[*.{md,md.txt}]
122121
indent_style = space
123122
indent_size = 4
124-
trim_trailing_whitespace = false
123+
trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim.
125124
126125
# Set properties for `usage.txt` files:
127126
[usage.txt]

.github/.keepalive

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/workflows/test_install.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ jobs:
5050
env:
5151
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
5252

53-
# Run workflow job if `publish` workflow run is successful or when the workflow is manually run:
54-
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
53+
# Run workflow job if `publish` workflow run is successful or when the workflow is manually triggered or on a schedule:
54+
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }}
5555

5656
# Define the sequence of job steps...
5757
steps:

.github/workflows/test_published_package.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ jobs:
4747
env:
4848
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
4949

50-
# Run workflow job if `publish` workflow run is successful or when the workflow is manually run:
51-
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
50+
# Run workflow job if `publish` workflow run is successful or when the workflow is manually triggered or on a schedule:
51+
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }}
5252

5353
# Define the job's steps:
5454
steps:

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,40 @@
22

33
> Package changelog.
44
5+
<section class="release" id="unreleased">
6+
7+
## Unreleased (2025-01-21)
8+
9+
<section class="commits">
10+
11+
### Commits
12+
13+
<details>
14+
15+
- [`af55f0d`](https://github.com/stdlib-js/stdlib/commit/af55f0d6d6b4d06c36f46357740ea89a4639ab5b) - **bench:** refactor random number generation in `stats/base/dists/binomial` [(#4841)](https://github.com/stdlib-js/stdlib/pull/4841) _(by Karan Anand)_
16+
17+
</details>
18+
19+
</section>
20+
21+
<!-- /.commits -->
22+
23+
<section class="contributors">
24+
25+
### Contributors
26+
27+
A total of 1 person contributed to this release. Thank you to this contributor:
28+
29+
- Karan Anand
30+
31+
</section>
32+
33+
<!-- /.contributors -->
34+
35+
</section>
36+
37+
<!-- /.release -->
38+
539
<section class="release" id="v0.2.2">
640

741
## 0.2.2 (2024-07-28)

CONTRIBUTORS

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22
#
33
# Contributors listed in alphabetical order.
44

5+
Aadish Jain <jain.aadishj@gmail.com>
56
Aayush Khanna <aayushiitbhu23@gmail.com>
67
Abhijit Raut <abhijitmraut8010@gmail.com>
78
Adarsh Palaskar <adarshpalaskar99@gmail.com>
89
Aditya Sapra <adityaework@gmail.com>
9-
AgPriyanshu18 <113460573+AgPriyanshu18@users.noreply.github.com>
10+
Ahmed Atwa <Ahmedatwa866@yahoo.com>
11+
Ahmed Kashkoush <ahmedkashkoush464@gmail.com>
12+
Ahmed Khaled <kahmd1444@gmail.com>
1013
Aleksandr <112382387+alextes90@users.noreply.github.com>
1114
Ali Salesi <ali_sal1381@yahoo.com>
1215
Aman Bhansali <bhansali.1@iitj.ac.in>
@@ -23,6 +26,10 @@ Dan Rose <danoftheroses@gmail.com>
2326
Daniel Killenberger <daniel.killenberger@gmail.com>
2427
Daniel Yu <40680511+Daniel777y@users.noreply.github.com>
2528
Debashis Maharana <debashismaharana7854@gmail.com>
29+
Desh Deepak Kant <118960904+DeshDeepakKant@users.noreply.github.com>
30+
Dev Goel <135586571+corsairier@users.noreply.github.com>
31+
Dhruv Arvind Singh <154677013+DhruvArvindSingh@users.noreply.github.com>
32+
Divyansh Seth <59174836+sethdivyansh@users.noreply.github.com>
2633
Dominic Lim <46486515+domlimm@users.noreply.github.com>
2734
Dominik Moritz <domoritz@gmail.com>
2835
Dorrin Sotoudeh <dorrinsotoudeh123@gmail.com>
@@ -44,13 +51,14 @@ Joey Reed <joeyrreed@gmail.com>
4451
Jordan Gallivan <115050475+Jordan-Gallivan@users.noreply.github.com>
4552
Joris Labie <joris.labie1@gmail.com>
4653
Justin Dennison <justin1dennison@gmail.com>
54+
Karan Anand <119553199+anandkaranubc@users.noreply.github.com>
4755
Karthik Prakash <116057817+skoriop@users.noreply.github.com>
48-
Khaldon <kahmd1444@gmail.com>
4956
Kohantika Nath <145763549+kohantikanath@users.noreply.github.com>
5057
Krishnendu Das <86651039+itskdhere@users.noreply.github.com>
5158
Kshitij-Dale <152467202+Kshitij-Dale@users.noreply.github.com>
52-
Lovelin <100030865+lovelindhoni@users.noreply.github.com>
59+
Lovelin Dhoni J B <100030865+lovelindhoni@users.noreply.github.com>
5360
Manik Sharma <maniksharma.rke@gmail.com>
61+
Manvith M <148960168+manvith2003@users.noreply.github.com>
5462
Marcus Fantham <mfantham@users.noreply.github.com>
5563
Matt Cochrane <matthew.cochrane.eng@gmail.com>
5664
Mihir Pandit <129577900+MSP20086@users.noreply.github.com>
@@ -59,37 +67,41 @@ Mohammad Kaif <mdkaifprofession@gmail.com>
5967
Momtchil Momtchev <momtchil@momtchev.com>
6068
Muhammad Haris <harriskhan047@outlook.com>
6169
Naresh Jagadeesan <naresh.naresh000@gmail.com>
70+
Naveen Kumar <stupiddint@gmail.com>
6271
Neeraj Pathak <neerajrpathak710@gmail.com>
63-
NightKnight <Ahmedatwa866@yahoo.com>
72+
Nishant Shinde <97207366+nishant-s7@users.noreply.github.com>
6473
Nithin Katta <88046362+nithinkatta@users.noreply.github.com>
6574
Nourhan Hasan <109472010+TheNourhan@users.noreply.github.com>
6675
Ognjen Jevremović <ognjenjevremovic@users.noreply.github.com>
6776
Oneday12323 <107678750+Oneday12323@users.noreply.github.com>
77+
Ori Miles <97595296+orimiles5@users.noreply.github.com>
6878
Philipp Burckhardt <pburckhardt@outlook.com>
6979
Prajwal Kulkarni <prajwalkulkarni76@gmail.com>
7080
Pranav Goswami <goswami.4@iitj.ac.in>
71-
Praneki <97080887+PraneGIT@users.noreply.github.com>
72-
Pratik <97464067+Pratik772846@users.noreply.github.com>
81+
Pranjal Jha <97080887+PraneGIT@users.noreply.github.com>
82+
Prashant Kumar Yadav <144602492+0PrashantYadav0@users.noreply.github.com>
83+
Pratik Singh <97464067+Pratik772846@users.noreply.github.com>
7384
Pratyush Kumar Chouhan <pratyushkumar0308@gmail.com>
74-
Priyansh <88396544+itsspriyansh@users.noreply.github.com>
85+
Priyansh Prajapati <88396544+itsspriyansh@users.noreply.github.com>
86+
Priyanshu Agarwal <113460573+AgPriyanshu18@users.noreply.github.com>
7587
Pushpendra Chandravanshi <pushpendrachandravanshi4@gmail.com>
76-
RISHAV <115060907+rishav2404@users.noreply.github.com>
7788
Raunak Kumar Gupta <raunakmodanwal321@gmail.com>
7889
Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
7990
Ricky Reusser <rsreusser@gmail.com>
8091
Ridam Garg <67867319+RidamGarg@users.noreply.github.com>
92+
Rishav <115060907+rishav2404@users.noreply.github.com>
8193
Robert Gislason <gztown2216@yahoo.com>
8294
Roman Stetsyk <25715951+romanstetsyk@users.noreply.github.com>
83-
Rutam <138517416+performant23@users.noreply.github.com>
95+
Rutam Kathale <138517416+performant23@users.noreply.github.com>
8496
Ruthwik Chikoti <145591715+ruthwikchikoti@users.noreply.github.com>
8597
Ryan Seal <splrk@users.noreply.github.com>
8698
Rylan Yang <137365285+rylany27@users.noreply.github.com>
8799
Sai Srikar Dumpeti <80447788+the-r3aper7@users.noreply.github.com>
88-
SarthakPaandey <145528240+SarthakPaandey@users.noreply.github.com>
100+
Sarthak Paandey <145528240+SarthakPaandey@users.noreply.github.com>
89101
Saurabh Singh <saurabhsraghuvanshi@gmail.com>
90102
Seyyed Parsa Neshaei <spneshaei@users.noreply.github.com>
91103
Shashank Shekhar Singh <shashankshekharsingh1205@gmail.com>
92-
Shivam <11shivam00@gmail.com>
104+
Shivam Ahir <11shivam00@gmail.com>
93105
Shraddheya Shendre <shendreshraddheya@gmail.com>
94106
Shubh Mehta <93862397+Shubh942@users.noreply.github.com>
95107
Shubham Mishra <shubh622005@gmail.com>
@@ -98,7 +110,7 @@ Snehil Shah <snehilshah.989@gmail.com>
98110
Soumajit Chatterjee <121816890+soumajit23@users.noreply.github.com>
99111
Spandan Barve <contact@marsian.dev>
100112
Stephannie Jiménez Gacha <steff456@hotmail.com>
101-
Suraj kumar <125961509+kumarsuraj212003@users.noreply.github.com>
113+
Suraj Kumar <125961509+kumarsuraj212003@users.noreply.github.com>
102114
Tirtadwipa Manunggal <tirtadwipa.manunggal@gmail.com>
103115
Tudor Pagu <104032457+tudor-pagu@users.noreply.github.com>
104116
Tufailahmed Bargir <142114244+Tufailahmed-Bargir@users.noreply.github.com>
@@ -108,12 +120,10 @@ UtkershBasnet <119008923+UtkershBasnet@users.noreply.github.com>
108120
Vaibhav Patel <98279986+noobCoderVP@users.noreply.github.com>
109121
Varad Gupta <varadgupta21@gmail.com>
110122
Vinit Pandit <106718914+MeastroZI@users.noreply.github.com>
123+
Vivek Maurya <vm8118134@gmail.com>
111124
Xiaochuan Ye <tap91624@gmail.com>
125+
Yaswanth Kosuru <116426380+yaswanthkosuru@users.noreply.github.com>
112126
Yernar Yergaziyev <yernar.yergaziyev@erg.kz>
113-
naveen <stupiddint@gmail.com>
114-
nishant-s7 <97207366+nishant-s7@users.noreply.github.com>
115127
olenkabilonizhka <62379231+olenkabilonizhka@users.noreply.github.com>
116-
orimiles5 <97595296+orimiles5@users.noreply.github.com>
117128
rainn <88160429+AmCodesLame@users.noreply.github.com>
118129
rei2hu <reimu@reimu.ws>
119-
yaswanth <116426380+yaswanthkosuru@users.noreply.github.com>

NOTICE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Copyright (c) 2016-2024 The Stdlib Authors.
1+
Copyright (c) 2016-2025 The Stdlib Authors.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ See [LICENSE][stdlib-license].
234234

235235
## Copyright
236236

237-
Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
237+
Copyright &copy; 2016-2025. The Stdlib [Authors][stdlib-authors].
238238

239239
</section>
240240

benchmark/benchmark.js

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@
2121
// MODULES //
2222

2323
var bench = require( '@stdlib/bench-harness' );
24-
var ceil = require( '@stdlib/math-base-special-ceil' );
25-
var randu = require( '@stdlib/random-base-randu' );
24+
var Float64Array = require( '@stdlib/array-float64' );
25+
var uniform = require( '@stdlib/random-base-uniform' );
26+
var discreteUniform = require( '@stdlib/random-base-discrete-uniform' );
2627
var isnan = require( '@stdlib/math-base-assert-is-nan' );
2728
var pkg = require( './../package.json' ).name;
2829
var cdf = require( './../lib' );
@@ -31,18 +32,26 @@ var cdf = require( './../lib' );
3132
// MAIN //
3233

3334
bench( pkg, function benchmark( b ) {
35+
var len;
3436
var n;
3537
var p;
3638
var x;
3739
var y;
3840
var i;
3941

42+
len = 100;
43+
x = new Float64Array( len );
44+
n = new Float64Array( len );
45+
p = new Float64Array( len );
46+
for ( i = 0; i < len; i++ ) {
47+
x[ i ] = uniform( 0.0, 100.0 );
48+
n[ i ] = discreteUniform( 1, 100 );
49+
p[ i ] = uniform( 0.0, 1.0 );
50+
}
51+
4052
b.tic();
4153
for ( i = 0; i < b.iterations; i++ ) {
42-
x = randu() * 100.0;
43-
n = ceil( randu()*100.0 );
44-
p = randu();
45-
y = cdf( x, n, p );
54+
y = cdf( x[ i % len ], n[ i % len ], p[ i % len ] );
4655
if ( isnan( y ) ) {
4756
b.fail( 'should not return NaN' );
4857
}
@@ -57,6 +66,7 @@ bench( pkg, function benchmark( b ) {
5766

5867
bench( pkg+':factory', function benchmark( b ) {
5968
var mycdf;
69+
var len;
6070
var n;
6171
var p;
6272
var x;
@@ -66,11 +76,15 @@ bench( pkg+':factory', function benchmark( b ) {
6676
n = 80;
6777
p = 0.4;
6878
mycdf = cdf.factory( n, p );
79+
len = 100;
80+
x = new Float64Array( len );
81+
for ( i = 0; i < len; i++ ) {
82+
x[ i ] = uniform( 0.0, 80.0 );
83+
}
6984

7085
b.tic();
7186
for ( i = 0; i < b.iterations; i++ ) {
72-
x = randu() * 80.0;
73-
y = mycdf( x );
87+
y = mycdf( x[ i % len ] );
7488
if ( isnan( y ) ) {
7589
b.fail( 'should not return NaN' );
7690
}

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,14 @@
4646
"@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2"
4747
},
4848
"devDependencies": {
49+
"@stdlib/array-float64": "^0.2.2",
4950
"@stdlib/constants-float64-eps": "^0.2.2",
5051
"@stdlib/constants-float64-ninf": "^0.2.2",
5152
"@stdlib/math-base-special-abs": "^0.2.2",
52-
"@stdlib/math-base-special-ceil": "^0.2.2",
5353
"@stdlib/math-base-special-round": "^0.3.0",
54+
"@stdlib/random-base-discrete-uniform": "^0.2.1",
5455
"@stdlib/random-base-randu": "^0.2.1",
56+
"@stdlib/random-base-uniform": "^0.2.1",
5557
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
5658
"istanbul": "^0.4.1",
5759
"tap-min": "git+https://github.com/Planeshifter/tap-min.git",

0 commit comments

Comments
 (0)