Skip to content

Commit 4efca05

Browse files
committed
Auto-generated commit
1 parent 5b4085c commit 4efca05

7 files changed

Lines changed: 45 additions & 40 deletions

File tree

.github/.keepalive

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

CHANGELOG.md

Lines changed: 4 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-08-11)
7+
## Unreleased (2025-08-20)
88

99
<section class="features">
1010

@@ -34,6 +34,9 @@ A total of 2 issues were closed in this release:
3434

3535
<details>
3636

37+
- [`e678757`](https://github.com/stdlib-js/stdlib/commit/e678757c9a62631a907278ec13a5d7b27c0f1e15) - **docs:** fix return annotation values _(by Philipp Burckhardt)_
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
- [`b6ca4b7`](https://github.com/stdlib-js/stdlib/commit/b6ca4b794ee6a139616ef2115e7ba38bdede2f85) - **docs:** fix capitalization [(#7763)](https://github.com/stdlib-js/stdlib/pull/7763) _(by Abhishek G, Athan Reines)_
3841
- [`394df9c`](https://github.com/stdlib-js/stdlib/commit/394df9cbfe1e319625331814813bfffb5113d8d6) - **feat:** add C implementation for `stats/base/dists/binomial/entropy` [(#4016)](https://github.com/stdlib-js/stdlib/pull/4016) _(by Divyansh Seth, Philipp Burckhardt, stdlib-bot)_
3942
- [`c1df69c`](https://github.com/stdlib-js/stdlib/commit/c1df69ccf92f1ce80f08883226dd4252644f0324) - **docs:** replace manual `for` loop in examples [(#6848)](https://github.com/stdlib-js/stdlib/pull/6848) _(by Harsh, Athan Reines)_

CONTRIBUTORS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Abhishek G <166795493+AbhishekG-Codes@users.noreply.github.com>
1313
Abhishek Jain <40913033+abhishekblue@users.noreply.github.com>
1414
Adarsh Palaskar <adarshpalaskar99@gmail.com>
1515
Aditya Sapra <adityaework@gmail.com>
16+
Aditya Singh <adityasinghk099@gmail.com>
1617
Ahmed Atwa <Ahmedatwa866@yahoo.com>
1718
Ahmed Kashkoush <ahmedkashkoush464@gmail.com>
1819
Ahmed Khaled <kahmd1444@gmail.com>
@@ -121,6 +122,7 @@ Muhammad Haris <harriskhan047@outlook.com>
121122
Muhammad Taaha Tariq <166188821+Taaha-Tariq@users.noreply.github.com>
122123
Muhmmad Saad <106260977+saad-imran-dev@users.noreply.github.com>
123124
NEEKUorAAYUSH <aayush10072004@gmail.com>
125+
Nakul Krishnakumar <nakulkrishnakumar86@gmail.com>
124126
Naresh Jagadeesan <naresh.naresh000@gmail.com>
125127
Naveen Kumar <stupiddint@gmail.com>
126128
Neeraj Pathak <neerajrpathak710@gmail.com>
@@ -164,6 +166,7 @@ Ruthwik Chikoti <145591715+ruthwikchikoti@users.noreply.github.com>
164166
Ryan Seal <splrk@users.noreply.github.com>
165167
Rylan Yang <137365285+rylany27@users.noreply.github.com>
166168
SAHIL KUMAR <168997976+sahilk45@users.noreply.github.com>
169+
SAUJANYA MAGARDE <162047941+SaujanyaMagarde@users.noreply.github.com>
167170
SHIVAM YADAV <120725381+Shivam-1827@users.noreply.github.com>
168171
Sachin Raj <120590207+schnrj@users.noreply.github.com>
169172
Sahil Goyal <87982509+sahil20021008@users.noreply.github.com>

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
* var entropy = require( '@stdlib/stats-base-dists-binomial-entropy' );
2828
*
2929
* var v = entropy( 100, 0.1 );
30-
* // returns ~0.051
30+
* // returns ~2.511
3131
*
3232
* v = entropy( 20, 0.5 );
33-
* // returns ~-0.1
33+
* // returns ~2.223
3434
*/
3535

3636
// MODULES //

test/test.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ 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 = entropy( NaN, 0.5 );
47-
t.equal( isnan( v ), true, 'returns expected value' );
47+
t.strictEqual( isnan( v ), true, 'returns expected value' );
4848

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

5252
v = entropy( NaN, NaN );
53-
t.equal( isnan( v ), true, 'returns expected value' );
53+
t.strictEqual( isnan( v ), true, 'returns expected value' );
5454

5555
t.end();
5656
});
@@ -59,19 +59,19 @@ tape( 'if provided an `n` which is not a nonnegative integer, the function retur
5959
var v;
6060

6161
v = entropy( 1.5, 0.5 );
62-
t.equal( isnan( v ), true, 'returns expected value' );
62+
t.strictEqual( isnan( v ), true, 'returns expected value' );
6363

6464
v = entropy( -2, 0.5 );
65-
t.equal( isnan( v ), true, 'returns expected value' );
65+
t.strictEqual( isnan( v ), true, 'returns expected value' );
6666

6767
v = entropy( -1, 0.5 );
68-
t.equal( isnan( v ), true, 'returns expected value' );
68+
t.strictEqual( isnan( v ), true, 'returns expected value' );
6969

7070
v = entropy( 2.5, 0.5 );
71-
t.equal( isnan( v ), true, 'returns expected value' );
71+
t.strictEqual( isnan( v ), true, 'returns expected value' );
7272

7373
v = entropy( PINF, 0.5 );
74-
t.equal( isnan( v ), true, 'returns expected value' );
74+
t.strictEqual( isnan( v ), true, 'returns expected value' );
7575

7676
t.end();
7777
});
@@ -80,35 +80,35 @@ tape( 'if provided a success probability `p` outside of `[0,1]`, the function re
8080
var v;
8181

8282
v = entropy( 20, -1.0 );
83-
t.equal( isnan( v ), true, 'returns expected value' );
83+
t.strictEqual( isnan( v ), true, 'returns expected value' );
8484

8585
v = entropy( 20, 1.5 );
86-
t.equal( isnan( v ), true, 'returns expected value' );
86+
t.strictEqual( isnan( v ), true, 'returns expected value' );
8787

8888
v = entropy( 20, NINF );
89-
t.equal( isnan( v ), true, 'returns expected value' );
89+
t.strictEqual( isnan( v ), true, 'returns expected value' );
9090

9191
v = entropy( 20, PINF );
92-
t.equal( isnan( v ), true, 'returns expected value' );
92+
t.strictEqual( isnan( v ), true, 'returns expected value' );
9393

9494
t.end();
9595
});
9696

9797
tape( 'the function returns `0` for `p` equal to `1` or `0`', function test( t ) {
9898
var y;
9999
y = entropy( 3, 1.0 );
100-
t.equal( y, 0.0, 'returns expected value' );
100+
t.strictEqual( y, 0.0, 'returns expected value' );
101101

102102
y = entropy( 3, 0.0 );
103-
t.equal( y, 0.0, 'returns expected value' );
103+
t.strictEqual( y, 0.0, 'returns expected value' );
104104

105105
t.end();
106106
});
107107

108108
tape( 'the function returns `0` for `n` equal to `0`', function test( t ) {
109109
var y;
110110
y = entropy( 0, 0.5 );
111-
t.equal( y, 0.0, 'returns expected value' );
111+
t.strictEqual( y, 0.0, 'returns expected value' );
112112
t.end();
113113
});
114114

@@ -127,7 +127,7 @@ tape( 'the function returns the entropy of a binomial distribution', function te
127127
for ( i = 0; i < n.length; i++ ) {
128128
y = entropy( n[i], p[i] );
129129
if ( y === expected[i] ) {
130-
t.equal( y, expected[i], 'n: '+n[i]+', p: '+p[i]+', y: '+y+', expected: '+expected[i] );
130+
t.strictEqual( y, expected[i], 'n: '+n[i]+', p: '+p[i]+', y: '+y+', expected: '+expected[i] );
131131
}
132132
else {
133133
delta = abs( y - expected[i] );

test/test.native.js

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -53,26 +53,26 @@ tape( 'main export is a function', opts, function test( t ) {
5353

5454
tape( 'if provided `NaN` for any parameter, the function returns `NaN`', opts, function test( t ) {
5555
var v = entropy( NaN, 0.5 );
56-
t.equal( isnan( v ), true, 'returns NaN' );
56+
t.strictEqual( isnan( v ), true, 'returns expected value' );
5757

5858
v = entropy( 10, NaN );
59-
t.equal( isnan( v ), true, 'returns NaN' );
59+
t.strictEqual( isnan( v ), true, 'returns expected value' );
6060

6161
v = entropy( NaN, NaN );
62-
t.equal( isnan( v ), true, 'returns NaN' );
62+
t.strictEqual( isnan( v ), true, 'returns expected value' );
6363

6464
t.end();
6565
});
6666

6767
tape( 'if provided `NaN` for any parameter, the function returns `NaN`, the function returns `NaN`', opts, function test( t ) {
6868
var v = entropy( NaN, 0.5 );
69-
t.equal( isnan( v ), true, 'returns NaN' );
69+
t.strictEqual( isnan( v ), true, 'returns expected value' );
7070

7171
v = entropy( 10, NaN );
72-
t.equal( isnan( v ), true, 'returns NaN' );
72+
t.strictEqual( isnan( v ), true, 'returns expected value' );
7373

7474
v = entropy( NaN, NaN );
75-
t.equal( isnan( v ), true, 'returns NaN' );
75+
t.strictEqual( isnan( v ), true, 'returns expected value' );
7676

7777
t.end();
7878
});
@@ -81,19 +81,19 @@ tape( 'if provided an `n` which is not a nonnegative integer, the function retur
8181
var v;
8282

8383
v = entropy( 1.5, 0.5 );
84-
t.equal( isnan( v ), true, 'returns NaN' );
84+
t.strictEqual( isnan( v ), true, 'returns expected value' );
8585

8686
v = entropy( -2, 0.5 );
87-
t.equal( isnan( v ), true, 'returns NaN' );
87+
t.strictEqual( isnan( v ), true, 'returns expected value' );
8888

8989
v = entropy( -1, 0.5 );
90-
t.equal( isnan( v ), true, 'returns NaN' );
90+
t.strictEqual( isnan( v ), true, 'returns expected value' );
9191

9292
v = entropy( 2.5, 0.5 );
93-
t.equal( isnan( v ), true, 'returns NaN' );
93+
t.strictEqual( isnan( v ), true, 'returns expected value' );
9494

9595
v = entropy( PINF, 0.5 );
96-
t.equal( isnan( v ), true, 'returns NaN' );
96+
t.strictEqual( isnan( v ), true, 'returns expected value' );
9797

9898
t.end();
9999
});
@@ -102,35 +102,35 @@ tape( 'if provided a success probability `p` outside of `[0,1]`, the function re
102102
var v;
103103

104104
v = entropy( 20, -1.0 );
105-
t.equal( isnan( v ), true, 'returns NaN' );
105+
t.strictEqual( isnan( v ), true, 'returns expected value' );
106106

107107
v = entropy( 20, 1.5 );
108-
t.equal( isnan( v ), true, 'returns NaN' );
108+
t.strictEqual( isnan( v ), true, 'returns expected value' );
109109

110110
v = entropy( 20, NINF );
111-
t.equal( isnan( v ), true, 'returns NaN' );
111+
t.strictEqual( isnan( v ), true, 'returns expected value' );
112112

113113
v = entropy( 20, PINF );
114-
t.equal( isnan( v ), true, 'returns NaN' );
114+
t.strictEqual( isnan( v ), true, 'returns expected value' );
115115

116116
t.end();
117117
});
118118

119119
tape( 'the function returns `0` for `p` equal to `1` or `0`', opts, function test( t ) {
120120
var y;
121121
y = entropy( 3, 1.0 );
122-
t.equal( y, 0.0, 'returns 0' );
122+
t.strictEqual( y, 0.0, 'returns expected value' );
123123

124124
y = entropy( 3, 0.0 );
125-
t.equal( y, 0.0, 'returns 0' );
125+
t.strictEqual( y, 0.0, 'returns expected value' );
126126

127127
t.end();
128128
});
129129

130130
tape( 'the function returns `0` for `n` equal to `0`', opts, function test( t ) {
131131
var y;
132132
y = entropy( 0, 0.5 );
133-
t.equal( y, 0.0, 'returns 0' );
133+
t.strictEqual( y, 0.0, 'returns expected value' );
134134
t.end();
135135
});
136136

@@ -149,7 +149,7 @@ tape( 'the function returns the entropy of a binomial distribution', opts, funct
149149
for ( i = 0; i < n.length; i++ ) {
150150
y = entropy( n[i], p[i] );
151151
if ( y === expected[i] ) {
152-
t.equal( y, expected[i], 'n: '+n[i]+', p: '+p[i]+', y: '+y+', expected: '+expected[i] );
152+
t.strictEqual( y, expected[i], 'n: '+n[i]+', p: '+p[i]+', y: '+y+', expected: '+expected[i] );
153153
}
154154
else {
155155
delta = abs( y - expected[i] );

0 commit comments

Comments
 (0)