Skip to content

Commit 0939737

Browse files
committed
Auto-generated commit
1 parent 8e47b07 commit 0939737

File tree

10 files changed

+139
-16
lines changed

10 files changed

+139
-16
lines changed

.editorconfig

Lines changed: 0 additions & 1 deletion
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}]

.github/.keepalive

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-12-30T03:05:15.937Z
1+
2025-05-12T00:52:26.557Z

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/stats/base/dists/chisquare/cdf) of the main repository where we’ll review and provide feedback.
44

5-
If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib.
5+
If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib.
66

77
We look forward to receiving your contribution! :smiley:

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,3 +188,7 @@ jsconfig.json
188188
# Other editor files #
189189
######################
190190
.idea/
191+
192+
# Cursor #
193+
##########
194+
.cursorignore

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-05-12)
8+
9+
<section class="commits">
10+
11+
### Commits
12+
13+
<details>
14+
15+
- [`02b9077`](https://github.com/stdlib-js/stdlib/commit/02b907765ad6a6ebcc884f16f2128475ab866814) - **bench:** refactor random number generation in `stats/base/dists/chisquare` [(#4860)](https://github.com/stdlib-js/stdlib/pull/4860) _(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: 74 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,31 @@
33
# Contributors listed in alphabetical order.
44

55
Aadish Jain <[email protected]>
6+
Aarya Balwadkar <[email protected]>
67
Aayush Khanna <[email protected]>
8+
Abdelrahman Samir <[email protected]>
9+
Abdul Kaium <[email protected]>
10+
Abhay Punia <[email protected]>
711
Abhijit Raut <[email protected]>
12+
Abhishek Jain <[email protected]>
813
Adarsh Palaskar <[email protected]>
914
Aditya Sapra <[email protected]>
1015
Ahmed Atwa <[email protected]>
1116
Ahmed Kashkoush <[email protected]>
1217
Ahmed Khaled <[email protected]>
18+
Aksshay Balasubramanian <[email protected]>
1319
Aleksandr <[email protected]>
1420
Ali Salesi <[email protected]>
21+
AlyAbdelmoneim <[email protected]>
1522
Aman Bhansali <[email protected]>
23+
AmanBhadkariya <[email protected]>
1624
Amit Jimiwal <[email protected]>
25+
Anshu Kumar <[email protected]>
26+
Anshu Kumar <[email protected]>
1727
Anudeep Sanapala <[email protected]>
1828
Athan Reines <[email protected]>
1929
30+
Bhavishy Agrawal <[email protected]>
2031
Brendan Graetz <[email protected]>
2132
Bruno Fenzl <[email protected]>
2233
Bryan Elee <[email protected]>
@@ -26,21 +37,39 @@ Dan Rose <[email protected]>
2637
Daniel Killenberger <[email protected]>
2738
Daniel Yu <[email protected]>
2839
Debashis Maharana <[email protected]>
40+
Deep Trivedi <[email protected]>
2941
Desh Deepak Kant <[email protected]>
42+
43+
Dhanyabad behera <[email protected]>
44+
Dhruv Arvind Singh <[email protected]>
45+
Dhruvil Mehta <[email protected]>
46+
Dipjyoti Das <[email protected]>
3047
Divyansh Seth <[email protected]>
3148
Dominic Lim <[email protected]>
3249
Dominik Moritz <[email protected]>
3350
Dorrin Sotoudeh <[email protected]>
3451
EuniceSim142 <[email protected]>
3552
Frank Kovacs <[email protected]>
53+
GK Bishnoi <[email protected]>
54+
GURU PRASAD SHARMA <[email protected]>
55+
56+
Gautam sharma <[email protected]>
57+
Girish Garg <[email protected]>
3658
Golden Kumar <[email protected]>
3759
Gunj Joshi <[email protected]>
38-
Gururaj Gurram <[email protected]>
60+
Gururaj Gurram <[email protected]>
61+
Haroon Rasheed <[email protected]>
62+
3963
4064
Harshita Kalani <[email protected]>
65+
Hemang Choudhary <[email protected]>
66+
Hemant M Mehta <[email protected]>
4167
Hridyanshu <[email protected]>
4268
Jaimin Godhani <[email protected]>
69+
Jaison D Souza <[email protected]>
70+
Jalaj Kumar <[email protected]>
4371
James Gelok <[email protected]>
72+
4473
Jaysukh Makvana <[email protected]>
4574
Jenish Thapa <[email protected]>
4675
Jithin KS <[email protected]>
@@ -49,54 +78,82 @@ Joey Reed <[email protected]>
4978
Jordan Gallivan <[email protected]>
5079
Joris Labie <[email protected]>
5180
Justin Dennison <[email protected]>
81+
Justyn Shelby <[email protected]>
82+
Karan Anand <[email protected]>
83+
Karan Yadav <[email protected]>
5284
Karthik Prakash <[email protected]>
85+
Kaushikgtm <[email protected]>
86+
Kavyansh-Bagdi <[email protected]>
5387
Kohantika Nath <[email protected]>
88+
Krishnam Agarwal <[email protected]>
5489
Krishnendu Das <[email protected]>
5590
Kshitij-Dale <[email protected]>
91+
Lalit Narayan Yadav <[email protected]>
5692
Lovelin Dhoni J B <[email protected]>
93+
94+
Mahfuza Humayra Mohona <[email protected]>
5795
Manik Sharma <[email protected]>
5896
Manvith M <[email protected]>
5997
Marcus Fantham <[email protected]>
6098
Matt Cochrane <[email protected]>
6199
Mihir Pandit <[email protected]>
62100
Milan Raj <[email protected]>
101+
Mohammad Bin Aftab <[email protected]>
63102
Mohammad Kaif <[email protected]>
64103
Momtchil Momtchev <[email protected]>
65104
Muhammad Haris <[email protected]>
105+
Muhammad Taaha Tariq <[email protected]>
106+
Muhmmad Saad <[email protected]>
66107
Naresh Jagadeesan <[email protected]>
67108
Naveen Kumar <[email protected]>
68109
Neeraj Pathak <[email protected]>
110+
NirvedMishra <[email protected]>
69111
Nishant Shinde <[email protected]>
112+
Nishant singh <[email protected]>
113+
Nishchay Rajput <[email protected]>
70114
Nithin Katta <[email protected]>
71115
Nourhan Hasan <[email protected]>
72116
Ognjen Jevremović <[email protected]>
73117
Oneday12323 <[email protected]>
74118
Ori Miles <[email protected]>
75119
Philipp Burckhardt <[email protected]>
120+
Prajjwal Bajpai <[email protected]>
76121
Prajwal Kulkarni <[email protected]>
77-
Pranav Goswami <[email protected]>
122+
Pranav Goswami <[email protected]>
78123
Pranjal Jha <[email protected]>
79124
Prashant Kumar Yadav <[email protected]>
125+
PrathamBhamare <[email protected]>
80126
Pratik Singh <[email protected]>
81127
Pratyush Kumar Chouhan <[email protected]>
128+
Pravesh Kunwar <[email protected]>
82129
Priyansh Prajapati <[email protected]>
83130
Priyanshu Agarwal <[email protected]>
131+
Pulkit Gupta <[email protected]>
84132
Pushpendra Chandravanshi <[email protected]>
133+
Rahul Kumar <[email protected]>
85134
Raunak Kumar Gupta <[email protected]>
86135
Rejoan Sardar <[email protected]>
87136
Ricky Reusser <[email protected]>
88137
Ridam Garg <[email protected]>
89138
139+
Rishav Tarway <[email protected]>
90140
Robert Gislason <[email protected]>
91141
Roman Stetsyk <[email protected]>
142+
92143
Rutam Kathale <[email protected]>
93144
Ruthwik Chikoti <[email protected]>
94145
Ryan Seal <[email protected]>
95146
Rylan Yang <[email protected]>
147+
SAHIL KUMAR <[email protected]>
148+
SHIVAM YADAV <[email protected]>
149+
Sahil Goyal <[email protected]>
150+
Sai Avinash <[email protected]>
96151
Sai Srikar Dumpeti <[email protected]>
152+
Sanchay Ketan Sinha <[email protected]>
97153
Sarthak Paandey <[email protected]>
98154
Saurabh Singh <[email protected]>
99155
Seyyed Parsa Neshaei <[email protected]>
156+
Shabareesh Shetty <[email protected]>
100157
Shashank Shekhar Singh <[email protected]>
101158
Shivam Ahir <[email protected]>
102159
Shraddheya Shendre <[email protected]>
@@ -107,20 +164,34 @@ Snehil Shah <[email protected]>
107164
Soumajit Chatterjee <[email protected]>
108165
Spandan Barve <[email protected]>
109166
Stephannie Jiménez Gacha <[email protected]>
167+
Suhaib Ilahi <[email protected]>
110168
Suraj Kumar <[email protected]>
169+
Tanishq Ahuja <[email protected]>
111170
Tirtadwipa Manunggal <[email protected]>
112171
Tudor Pagu <[email protected]>
113172
Tufailahmed Bargir <[email protected]>
114173
Utkarsh <http://[email protected]>
115174
Utkarsh Raj <[email protected]>
116175
UtkershBasnet <[email protected]>
117176
Vaibhav Patel <[email protected]>
177+
Vara Rahul Rajana <[email protected]>
118178
Varad Gupta <[email protected]>
119179
Vinit Pandit <[email protected]>
120-
Vivek maurya <[email protected].com>
180+
Vivek Maurya <vm8118134@gmail.com>
121181
Xiaochuan Ye <[email protected]>
122182
Yaswanth Kosuru <[email protected]>
123183
Yernar Yergaziyev <[email protected]>
184+
Yugal Kaushik <[email protected]>
185+
Yuvi Mittal <[email protected]>
186+
devshree-bhati <[email protected]>
187+
188+
ekambains <[email protected]>
189+
fadiothman22 <[email protected]>
190+
iraandrushko <[email protected]>
191+
lohithganni <[email protected]>
124192
olenkabilonizhka <[email protected]>
193+
pranav-1720 <[email protected]>
194+
rahulrangers <[email protected]>
125195
126196
197+

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
@@ -220,7 +220,7 @@ See [LICENSE][stdlib-license].
220220

221221
## Copyright
222222

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

225225
</section>
226226

benchmark/benchmark.js

Lines changed: 20 additions & 7 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,16 +32,23 @@ var cdf = require( './../lib' );
3132
// MAIN //
3233

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

41+
len = 100;
42+
x = new Float64Array( len );
43+
k = new Float64Array( len );
44+
for ( i = 0; i < len; i++ ) {
45+
x[ i ] = uniform( 0.0, 100.0 );
46+
k[ i ] = discreteUniform( 1, 100 );
47+
}
48+
3949
b.tic();
4050
for ( i = 0; i < b.iterations; i++ ) {
41-
x = randu() * 100.0;
42-
k = ceil( randu()*100.0 );
43-
y = cdf( x, k );
51+
y = cdf( x[ i % len ], k[ i % len ] );
4452
if ( isnan( y ) ) {
4553
b.fail( 'should not return NaN' );
4654
}
@@ -55,18 +63,23 @@ bench( pkg, function benchmark( b ) {
5563

5664
bench( pkg+':factory', function benchmark( b ) {
5765
var mycdf;
66+
var len;
5867
var k;
5968
var x;
6069
var y;
6170
var i;
6271

6372
k = 10.0;
6473
mycdf = cdf.factory( k );
74+
len = 100;
75+
x = new Float64Array( len );
76+
for ( i = 0; i < len; i++ ) {
77+
x[ i ] = uniform( 0.0, 100.0 );
78+
}
6579

6680
b.tic();
6781
for ( i = 0; i < b.iterations; i++ ) {
68-
x = randu() * 100.0;
69-
y = mycdf( x );
82+
y = mycdf( x[ i % len ] );
7083
if ( isnan( y ) ) {
7184
b.fail( 'should not return NaN' );
7285
}

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,16 @@
4141
"@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2"
4242
},
4343
"devDependencies": {
44+
"@stdlib/array-float64": "^0.2.2",
4445
"@stdlib/constants-float64-eps": "^0.2.2",
4546
"@stdlib/constants-float64-ninf": "^0.2.2",
4647
"@stdlib/constants-float64-pinf": "^0.2.2",
4748
"@stdlib/math-base-assert-is-nan": "^0.2.2",
4849
"@stdlib/math-base-special-abs": "^0.2.2",
49-
"@stdlib/math-base-special-ceil": "^0.2.2",
5050
"@stdlib/math-base-special-round": "^0.3.0",
51+
"@stdlib/random-base-discrete-uniform": "^0.2.1",
5152
"@stdlib/random-base-randu": "^0.2.1",
53+
"@stdlib/random-base-uniform": "^0.2.1",
5254
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
5355
"istanbul": "^0.4.1",
5456
"tap-min": "git+https://github.com/Planeshifter/tap-min.git",

0 commit comments

Comments
 (0)