Skip to content

Commit 87283c8

Browse files
committed
Auto-generated commit
1 parent e181c28 commit 87283c8

File tree

8 files changed

+97
-63
lines changed

8 files changed

+97
-63
lines changed

.gitignore

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,12 @@ jsconfig.json
188188
# Other editor files #
189189
######################
190190
.idea/
191-
192-
# Cursor #
193-
##########
191+
.cursor
194192
.cursorignore
193+
.windsurfrules
194+
.clinerules
195+
196+
# AI coding agents #
197+
####################
198+
CLAUDE.md
199+
GEMINI.md

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-07-01)
7+
## Unreleased (2025-10-13)
88

99
<section class="features">
1010

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

3535
<details>
3636

37+
- [`4a599d7`](https://github.com/stdlib-js/stdlib/commit/4a599d7672902faa05e6dfbe3822a27422337278) - **docs:** replace manual `for` loop in examples [(#8230)](https://github.com/stdlib-js/stdlib/pull/8230) _(by Harsh)_
38+
- [`fc438e0`](https://github.com/stdlib-js/stdlib/commit/fc438e0edbad0689d6923d6f3edb959b96597662) - **test:** use standardized assertion messages and fix lint errors _(by Philipp Burckhardt)_
39+
- [`9c21fd2`](https://github.com/stdlib-js/stdlib/commit/9c21fd20ef8b8a6a88abb96d80ea6d8e4c5434eb) - **test:** use .strictEqual() instead of .equal() _(by Philipp Burckhardt)_
3740
- [`83af59d`](https://github.com/stdlib-js/stdlib/commit/83af59de17b7e0db3d95fb5959ec0f38cf63c88e) - **test:** increase needed tolerances for tests to pass _(by Philipp Burckhardt)_
3841
- [`9d9f653`](https://github.com/stdlib-js/stdlib/commit/9d9f653d3c57620043aa6b0d1e6103ea3b7a5e28) - **chore:** clean-up _(by Athan Reines)_
3942
- [`5271c7a`](https://github.com/stdlib-js/stdlib/commit/5271c7a1ad270bb7c4031bcdf270b9caee547be6) - **style:** use tabs instead of spaces _(by Philipp Burckhardt)_
@@ -50,9 +53,10 @@ This release closes the following issue:
5053

5154
### Contributors
5255

53-
A total of 3 people contributed to this release. Thank you to the following contributors:
56+
A total of 4 people contributed to this release. Thank you to the following contributors:
5457

5558
- Athan Reines
59+
- Harsh
5660
- Philipp Burckhardt
5761
- Shabareesh Shetty
5862

CONTRIBUTORS

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,40 +9,49 @@ Abdelrahman Samir <[email protected]>
99
Abdul Kaium <[email protected]>
1010
Abhay Punia <[email protected]>
1111
Abhijit Raut <[email protected]>
12+
Abhishek G <[email protected]>
1213
Abhishek Jain <[email protected]>
1314
Adarsh Palaskar <[email protected]>
1415
Aditya Sapra <[email protected]>
16+
Aditya Singh <[email protected]>
1517
Ahmed Atwa <[email protected]>
1618
Ahmed Kashkoush <[email protected]>
1719
Ahmed Khaled <[email protected]>
1820
Aksshay Balasubramanian <[email protected]>
1921
Aleksandr <[email protected]>
2022
Ali Salesi <[email protected]>
21-
AlyAbdelmoneim <[email protected]>
23+
Aly Abdelmoneim <[email protected]>
2224
Aman Bhansali <[email protected]>
2325
AmanBhadkariya <[email protected]>
2426
Amisha Chhajed <[email protected]>
2527
Amit Jimiwal <[email protected]>
28+
Anmol Sah <[email protected]>
2629
Annamalai Prabu <[email protected]>
2730
Anshu Kumar <[email protected]>
2831
Anshu Kumar <[email protected]>
32+
Anshuman Singh <[email protected]>
2933
Anudeep Sanapala <[email protected]>
34+
Arihant Pal <[email protected]>
3035
Aryan Bhirud <[email protected]>
36+
3137
Athan Reines <[email protected]>
38+
Atharva Patil <[email protected]>
3239
3340
Bhavishy Agrawal <[email protected]>
3441
Brendan Graetz <[email protected]>
3542
Bruno Fenzl <[email protected]>
3643
Bryan Elee <[email protected]>
3744
Chinmay Joshi <[email protected]>
3845
Christopher Dambamuromo <[email protected]>
46+
DUDHAT HEMIL PRAVINKUMAR <[email protected]>
3947
4048
Daniel Hernandez Gomez <[email protected]>
4149
Daniel Killenberger <[email protected]>
4250
Daniel Yu <[email protected]>
4351
Debashis Maharana <[email protected]>
4452
Deep Trivedi <[email protected]>
4553
Deepak Singh <[email protected]>
54+
Deepak Singh <[email protected]>
4655
Desh Deepak Kant <[email protected]>
4756
4857
Dhanyabad behera <[email protected]>
@@ -58,8 +67,10 @@ Frank Kovacs <[email protected]>
5867
GK Bishnoi <[email protected]>
5968
GURU PRASAD SHARMA <[email protected]>
6069
70+
Gaurav Kaushik <[email protected]>
6171
Gautam Kaushik <[email protected]>
6272
Gautam sharma <[email protected]>
73+
6374
Girish Garg <[email protected]>
6475
Golden Kumar <[email protected]>
6576
Gunj Joshi <[email protected]>
@@ -113,8 +124,11 @@ Momtchil Momtchev <[email protected]>
113124
Muhammad Haris <[email protected]>
114125
Muhammad Taaha Tariq <[email protected]>
115126
Muhmmad Saad <[email protected]>
127+
NEEKUorAAYUSH <[email protected]>
128+
Nakul Krishnakumar <[email protected]>
116129
Naresh Jagadeesan <[email protected]>
117130
Naveen Kumar <[email protected]>
131+
Navyansh Kesarwani <[email protected]>
118132
Neeraj Pathak <[email protected]>
119133
NirvedMishra <[email protected]>
120134
Nishant Shinde <[email protected]>
@@ -125,8 +139,11 @@ Nourhan Hasan <[email protected]>
125139
Ognjen Jevremović <[email protected]>
126140
Oneday12323 <[email protected]>
127141
Ori Miles <[email protected]>
142+
Payal Goswami <[email protected]>
128143
Philipp Burckhardt <[email protected]>
129144
Pierre Forstmann <[email protected]>
145+
Piyush Goel <[email protected]>
146+
Pradyumn Prasad <[email protected]>
130147
Prajjwal Bajpai <[email protected]>
131148
Prajwal Kulkarni <[email protected]>
132149
Pranav Goswami <[email protected]>
@@ -155,25 +172,33 @@ Ruthwik Chikoti <[email protected]>
155172
Ryan Seal <[email protected]>
156173
Rylan Yang <[email protected]>
157174
SAHIL KUMAR <[email protected]>
175+
SAUJANYA MAGARDE <[email protected]>
158176
SHIVAM YADAV <[email protected]>
159177
Sachin Raj <[email protected]>
160178
Sahil Goyal <[email protected]>
161179
Sai Avinash <[email protected]>
162180
Sai Srikar Dumpeti <[email protected]>
163181
Sanchay Ketan Sinha <[email protected]>
164182
Sarthak Paandey <[email protected]>
183+
Satyajeet Chavan <[email protected]>
165184
Saurabh Singh <[email protected]>
185+
Seth-Banker <[email protected]>
166186
Seyyed Parsa Neshaei <[email protected]>
167187
Shabareesh Shetty <[email protected]>
168188
Shashank Shekhar Singh <[email protected]>
189+
Shaswata Panda <[email protected]>
169190
Shivam Ahir <[email protected]>
191+
170192
Shraddheya Shendre <[email protected]>
171193
Shubh Mehta <[email protected]>
194+
172195
Shubham Mishra <[email protected]>
196+
Siddhesh waje <[email protected]>
173197
Sivam Das <[email protected]>
174198
Snehil Shah <[email protected]>
175199
Soumajit Chatterjee <[email protected]>
176200
Spandan Barve <[email protected]>
201+
Srinivas Batthula <[email protected]>
177202
Stephannie Jiménez Gacha <[email protected]>
178203
Suhaib Ilahi <[email protected]>
179204
Suraj Kumar <[email protected]>
@@ -183,21 +208,25 @@ Tirtadwipa Manunggal <[email protected]>
183208
Tudor Pagu <[email protected]>
184209
Tufailahmed Bargir <[email protected]>
185210
Tushar Bhardwaj <[email protected]>
211+
Tyson Cung <[email protected]>
186212
Uday Kakade <[email protected]>
187213
Ujjwal Kirti <[email protected]>
188214
Utkarsh <http://[email protected]>
189215
Utkarsh Raj <[email protected]>
190216
UtkershBasnet <[email protected]>
191217
Vaibhav Patel <[email protected]>
218+
Vansh Choudhary <[email protected]>
192219
Vara Rahul Rajana <[email protected]>
193220
Varad Gupta <[email protected]>
194221
Vinit Pandit <[email protected]>
195222
Vivek Maurya <[email protected]>
223+
Wendy Yuchen Sun <[email protected]>
196224
Xiaochuan Ye <[email protected]>
197225
Yaswanth Kosuru <[email protected]>
198226
Yernar Yergaziyev <[email protected]>
199227
Yugal Kaushik <[email protected]>
200228
Yuvi Mittal <[email protected]>
229+
Zuhair Ahmad <[email protected]>
201230
deepak427 <[email protected]>
202231
devshree-bhati <[email protected]>
203232
@@ -206,6 +235,7 @@ fadiothman22 <[email protected]>
206235
iraandrushko <[email protected]>
207236
208237
lohithganni <[email protected]>
238+
navyansh007 <[email protected]>
209239
olenkabilonizhka <[email protected]>
210240
pranav-1720 <[email protected]>
211241
rahulrangers <[email protected]>

README.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -171,20 +171,17 @@ y = variance( 0.5, 0.0 );
171171
<!-- eslint no-undef: "error" -->
172172

173173
```javascript
174-
var randu = require( '@stdlib/random-base-randu' );
174+
var uniform = require( '@stdlib/random-array-uniform' );
175+
var logEachMap = require( '@stdlib/console-log-each-map' );
175176
var variance = require( '@stdlib/stats-base-dists-kumaraswamy-variance' );
176177

177-
var a;
178-
var b;
179-
var v;
180-
var i;
178+
var opts = {
179+
'dtype': 'float64'
180+
};
181+
var a = uniform( 10, 0.0, 10.0, opts );
182+
var b = uniform( 10, 0.0, 10.0, opts );
181183

182-
for ( i = 0; i < 10; i++ ) {
183-
a = randu() * 10.0;
184-
b = randu() * 10.0;
185-
v = variance( a, b );
186-
console.log( 'a: %d, b: %d, Var(X;a,b): %d', a.toFixed( 4 ), b.toFixed( 4 ), v.toFixed( 4 ) );
187-
}
184+
logEachMap( 'a: %0.4f, b: %0.4f, Var(X;a,b): %0.4f', a, b, variance );
188185
```
189186

190187
</section>

examples/index.js

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

1919
'use strict';
2020

21-
var randu = require( '@stdlib/random-base-randu' );
21+
var uniform = require( '@stdlib/random-array-uniform' );
22+
var logEachMap = require( '@stdlib/console-log-each-map' );
2223
var variance = require( './../lib' );
2324

24-
var a;
25-
var b;
26-
var v;
27-
var i;
25+
var opts = {
26+
'dtype': 'float64'
27+
};
28+
var a = uniform( 10, 0.0, 10.0, opts );
29+
var b = uniform( 10, 0.0, 10.0, opts );
2830

29-
for ( i = 0; i < 10; i++ ) {
30-
a = randu() * 10.0;
31-
b = randu() * 10.0;
32-
v = variance( a, b );
33-
console.log( 'a: %d, b: %d, Var(X;a,b): %d', a.toFixed( 4 ), b.toFixed( 4 ), v.toFixed( 4 ) );
34-
}
31+
logEachMap( 'a: %0.4f, b: %0.4f, Var(X;a,b): %0.4f', a, b, variance );

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,12 @@
4747
},
4848
"devDependencies": {
4949
"@stdlib/array-float64": "^0.2.2",
50+
"@stdlib/console-log-each-map": "github:stdlib-js/console-log-each-map#main",
5051
"@stdlib/constants-float64-eps": "^0.2.2",
5152
"@stdlib/constants-float64-ninf": "^0.2.2",
5253
"@stdlib/constants-float64-pinf": "^0.2.2",
5354
"@stdlib/math-base-special-abs": "^0.2.2",
54-
"@stdlib/random-base-randu": "^0.2.1",
55+
"@stdlib/random-array-uniform": "^0.2.1",
5556
"@stdlib/random-base-uniform": "^0.2.1",
5657
"@stdlib/utils-try-require": "^0.2.2",
5758
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",

test/test.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ tape( 'main export is a function', function test( t ) {
4444

4545
tape( 'if provided `NaN` for any parameter, the function returns `NaN`', function test( t ) {
4646
var v = variance( NaN, 0.5 );
47-
t.equal( isnan( v ), true, 'returns NaN' );
47+
t.strictEqual( isnan( v ), true, 'returns expected value' );
4848

4949
v = variance( 10.0, NaN );
50-
t.equal( isnan( v ), true, 'returns NaN' );
50+
t.strictEqual( isnan( v ), true, 'returns expected value' );
5151

5252
t.end();
5353
});
@@ -56,25 +56,25 @@ tape( 'if provided a nonpositive `a`, the function returns `NaN`', function test
5656
var y;
5757

5858
y = variance( 0.0, 2.0 );
59-
t.equal( isnan( y ), true, 'returns NaN' );
59+
t.strictEqual( isnan( y ), true, 'returns expected value' );
6060

6161
y = variance( -1.0, 2.0 );
62-
t.equal( isnan( y ), true, 'returns NaN' );
62+
t.strictEqual( isnan( y ), true, 'returns expected value' );
6363

6464
y = variance( -1.0, 2.0 );
65-
t.equal( isnan( y ), true, 'returns NaN' );
65+
t.strictEqual( isnan( y ), true, 'returns expected value' );
6666

6767
y = variance( NINF, 1.0 );
68-
t.equal( isnan( y ), true, 'returns NaN' );
68+
t.strictEqual( isnan( y ), true, 'returns expected value' );
6969

7070
y = variance( NINF, PINF );
71-
t.equal( isnan( y ), true, 'returns NaN' );
71+
t.strictEqual( isnan( y ), true, 'returns expected value' );
7272

7373
y = variance( NINF, NINF );
74-
t.equal( isnan( y ), true, 'returns NaN' );
74+
t.strictEqual( isnan( y ), true, 'returns expected value' );
7575

7676
y = variance( NINF, NaN );
77-
t.equal( isnan( y ), true, 'returns NaN' );
77+
t.strictEqual( isnan( y ), true, 'returns expected value' );
7878

7979
t.end();
8080
});
@@ -83,25 +83,25 @@ tape( 'if provided a nonpositive `b`, the function returns `NaN`', function test
8383
var y;
8484

8585
y = variance( 2.0, 0.0 );
86-
t.equal( isnan( y ), true, 'returns NaN' );
86+
t.strictEqual( isnan( y ), true, 'returns expected value' );
8787

8888
y = variance( 2.0, -1.0 );
89-
t.equal( isnan( y ), true, 'returns NaN' );
89+
t.strictEqual( isnan( y ), true, 'returns expected value' );
9090

9191
y = variance( 2.0, -1/0 );
92-
t.equal( isnan( y ), true, 'returns NaN' );
92+
t.strictEqual( isnan( y ), true, 'returns expected value' );
9393

9494
y = variance( 1.0, NINF );
95-
t.equal( isnan( y ), true, 'returns NaN' );
95+
t.strictEqual( isnan( y ), true, 'returns expected value' );
9696

9797
y = variance( PINF, NINF );
98-
t.equal( isnan( y ), true, 'returns NaN' );
98+
t.strictEqual( isnan( y ), true, 'returns expected value' );
9999

100100
y = variance( NINF, NINF );
101-
t.equal( isnan( y ), true, 'returns NaN' );
101+
t.strictEqual( isnan( y ), true, 'returns expected value' );
102102

103103
y = variance( NaN, NINF );
104-
t.equal( isnan( y ), true, 'returns NaN' );
104+
t.strictEqual( isnan( y ), true, 'returns expected value' );
105105

106106
t.end();
107107
});
@@ -121,7 +121,7 @@ tape( 'the function returns the variance of a Kumaraswamy\'s double bounded dist
121121
for ( i = 0; i < expected.length; i++ ) {
122122
y = variance( a[i], b[i] );
123123
if ( y === expected[i] ) {
124-
t.equal( y, expected[i], 'a: '+a[i]+', b: '+b[i]+', y: '+y+', expected: '+expected[i] );
124+
t.strictEqual( y, expected[i], 'a: '+a[i]+', b: '+b[i]+', y: '+y+', expected: '+expected[i] );
125125
} else {
126126
delta = abs( y - expected[ i ] );
127127
tol = 15000.0 * EPS * abs( expected[ i ] );

0 commit comments

Comments
 (0)