Skip to content

Commit f7988d3

Browse files
bench: fix isnan checks in stats/base/dists
PR-URL: #5296 Reviewed-by: Athan Reines <[email protected]>
1 parent 072052b commit f7988d3

File tree

26 files changed

+47
-47
lines changed

26 files changed

+47
-47
lines changed

Diff for: lib/node_modules/@stdlib/stats/base/dists/arcsine/ctor/benchmark/benchmark.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ bench( pkg+'::set:a', function benchmark( bm ) {
112112
}
113113
}
114114
bm.toc();
115-
if ( isnan( y ) ) {
115+
if ( isnan( dist.a ) ) {
116116
bm.fail( 'should not return NaN' );
117117
}
118118
bm.pass( 'benchmark finished' );
@@ -170,7 +170,7 @@ bench( pkg+'::set:b', function benchmark( bm ) {
170170
}
171171
}
172172
bm.toc();
173-
if ( isnan( y ) ) {
173+
if ( isnan( dist.b ) ) {
174174
bm.fail( 'should not return NaN' );
175175
}
176176
bm.pass( 'benchmark finished' );

Diff for: lib/node_modules/@stdlib/stats/base/dists/bernoulli/ctor/benchmark/benchmark.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ bench( pkg+'::set:p', function benchmark( b ) {
106106
}
107107
}
108108
b.toc();
109-
if ( isnan( y ) ) {
109+
if ( isnan( dist.p ) ) {
110110
b.fail( 'should not return NaN' );
111111
}
112112
b.pass( 'benchmark finished' );

Diff for: lib/node_modules/@stdlib/stats/base/dists/beta/ctor/benchmark/benchmark.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ bench( pkg+'::set:alpha', function benchmark( b ) {
112112
}
113113
}
114114
b.toc();
115-
if ( isnan( y ) ) {
115+
if ( isnan( dist.alpha ) ) {
116116
b.fail( 'should not return NaN' );
117117
}
118118
b.pass( 'benchmark finished' );
@@ -170,7 +170,7 @@ bench( pkg+'::set:beta', function benchmark( b ) {
170170
}
171171
}
172172
b.toc();
173-
if ( isnan( y ) ) {
173+
if ( isnan( dist.beta ) ) {
174174
b.fail( 'should not return NaN' );
175175
}
176176
b.pass( 'benchmark finished' );

Diff for: lib/node_modules/@stdlib/stats/base/dists/betaprime/ctor/benchmark/benchmark.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ bench( pkg+'::set:alpha', function benchmark( b ) {
112112
}
113113
}
114114
b.toc();
115-
if ( isnan( y ) ) {
115+
if ( isnan( dist.alpha ) ) {
116116
b.fail( 'should not return NaN' );
117117
}
118118
b.pass( 'benchmark finished' );
@@ -170,7 +170,7 @@ bench( pkg+'::set:beta', function benchmark( b ) {
170170
}
171171
}
172172
b.toc();
173-
if ( isnan( y ) ) {
173+
if ( isnan( dist.beta ) ) {
174174
b.fail( 'should not return NaN' );
175175
}
176176
b.pass( 'benchmark finished' );

Diff for: lib/node_modules/@stdlib/stats/base/dists/binomial/ctor/benchmark/benchmark.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ bench( pkg+'::set:n', function benchmark( b ) {
113113
}
114114
}
115115
b.toc();
116-
if ( isnan( y ) ) {
116+
if ( isnan( dist.n ) ) {
117117
b.fail( 'should not return NaN' );
118118
}
119119
b.pass( 'benchmark finished' );
@@ -171,7 +171,7 @@ bench( pkg+'::set:p', function benchmark( b ) {
171171
}
172172
}
173173
b.toc();
174-
if ( isnan( y ) ) {
174+
if ( isnan( dist.p ) ) {
175175
b.fail( 'should not return NaN' );
176176
}
177177
b.pass( 'benchmark finished' );

Diff for: lib/node_modules/@stdlib/stats/base/dists/cauchy/ctor/benchmark/benchmark.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ bench( pkg+'::set:x0', function benchmark( b ) {
112112
}
113113
}
114114
b.toc();
115-
if ( isnan( y ) ) {
115+
if ( isnan( dist.x0 ) ) {
116116
b.fail( 'should not return NaN' );
117117
}
118118
b.pass( 'benchmark finished' );
@@ -170,7 +170,7 @@ bench( pkg+'::set:gamma', function benchmark( b ) {
170170
}
171171
}
172172
b.toc();
173-
if ( isnan( y ) ) {
173+
if ( isnan( dist.gamma ) ) {
174174
b.fail( 'should not return NaN' );
175175
}
176176
b.pass( 'benchmark finished' );

Diff for: lib/node_modules/@stdlib/stats/base/dists/chi/ctor/benchmark/benchmark.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ bench( pkg+'::set:k', function benchmark( b ) {
105105
}
106106
}
107107
b.toc();
108-
if ( isnan( y ) ) {
108+
if ( isnan( dist.k ) ) {
109109
b.fail( 'should not return NaN' );
110110
}
111111
b.pass( 'benchmark finished' );

Diff for: lib/node_modules/@stdlib/stats/base/dists/chisquare/ctor/benchmark/benchmark.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ bench( pkg+'::set:k', function benchmark( b ) {
105105
}
106106
}
107107
b.toc();
108-
if ( isnan( y ) ) {
108+
if ( isnan( dist.k ) ) {
109109
b.fail( 'should not return NaN' );
110110
}
111111
b.pass( 'benchmark finished' );

Diff for: lib/node_modules/@stdlib/stats/base/dists/cosine/ctor/benchmark/benchmark.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ bench( pkg+'::set:mu', function benchmark( bm ) {
112112
}
113113
}
114114
bm.toc();
115-
if ( isnan( y ) ) {
115+
if ( isnan( dist.mu ) ) {
116116
bm.fail( 'should not return NaN' );
117117
}
118118
bm.pass( 'benchmark finished' );
@@ -170,7 +170,7 @@ bench( pkg+'::set:s', function benchmark( bm ) {
170170
}
171171
}
172172
bm.toc();
173-
if ( isnan( y ) ) {
173+
if ( isnan( dist.s ) ) {
174174
bm.fail( 'should not return NaN' );
175175
}
176176
bm.pass( 'benchmark finished' );

Diff for: lib/node_modules/@stdlib/stats/base/dists/degenerate/ctor/benchmark/benchmark.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ bench( pkg+'::set:mu', function benchmark( b ) {
105105
}
106106
}
107107
b.toc();
108-
if ( isnan( y ) ) {
108+
if ( isnan( dist.mu ) ) {
109109
b.fail( 'should not return NaN' );
110110
}
111111
b.pass( 'benchmark finished' );

Diff for: lib/node_modules/@stdlib/stats/base/dists/discrete-uniform/ctor/benchmark/benchmark.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ bench( pkg+'::set:a', function benchmark( bm ) {
112112
}
113113
}
114114
bm.toc();
115-
if ( isnan( y ) ) {
115+
if ( isnan( dist.a ) ) {
116116
bm.fail( 'should not return NaN' );
117117
}
118118
bm.pass( 'benchmark finished' );
@@ -170,7 +170,7 @@ bench( pkg+'::set:b', function benchmark( bm ) {
170170
}
171171
}
172172
bm.toc();
173-
if ( isnan( y ) ) {
173+
if ( isnan( dist.b ) ) {
174174
bm.fail( 'should not return NaN' );
175175
}
176176
bm.pass( 'benchmark finished' );

Diff for: lib/node_modules/@stdlib/stats/base/dists/erlang/ctor/benchmark/benchmark.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ bench( pkg+'::set:k', function benchmark( b ) {
113113
}
114114
}
115115
b.toc();
116-
if ( isnan( y ) ) {
116+
if ( isnan( dist.k ) ) {
117117
b.fail( 'should not return NaN' );
118118
}
119119
b.pass( 'benchmark finished' );
@@ -171,7 +171,7 @@ bench( pkg+'::set:lambda', function benchmark( b ) {
171171
}
172172
}
173173
b.toc();
174-
if ( isnan( y ) ) {
174+
if ( isnan( dist.lambda ) ) {
175175
b.fail( 'should not return NaN' );
176176
}
177177
b.pass( 'benchmark finished' );

Diff for: lib/node_modules/@stdlib/stats/base/dists/exponential/ctor/benchmark/benchmark.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ bench( pkg+'::set:lambda', function benchmark( b ) {
105105
}
106106
}
107107
b.toc();
108-
if ( isnan( y ) ) {
108+
if ( isnan( dist.lambda ) ) {
109109
b.fail( 'should not return NaN' );
110110
}
111111
b.pass( 'benchmark finished' );

Diff for: lib/node_modules/@stdlib/stats/base/dists/f/ctor/benchmark/benchmark.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ bench( pkg+'::set:d1', function benchmark( b ) {
112112
}
113113
}
114114
b.toc();
115-
if ( isnan( y ) ) {
115+
if ( isnan( dist.d1 ) ) {
116116
b.fail( 'should not return NaN' );
117117
}
118118
b.pass( 'benchmark finished' );
@@ -170,7 +170,7 @@ bench( pkg+'::set:d2', function benchmark( b ) {
170170
}
171171
}
172172
b.toc();
173-
if ( isnan( y ) ) {
173+
if ( isnan( dist.d2 ) ) {
174174
b.fail( 'should not return NaN' );
175175
}
176176
b.pass( 'benchmark finished' );

Diff for: lib/node_modules/@stdlib/stats/base/dists/frechet/ctor/benchmark/benchmark.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ bench( pkg+'::set:alpha', function benchmark( bm ) {
119119
}
120120
}
121121
bm.toc();
122-
if ( isnan( y ) ) {
122+
if ( isnan( dist.a ) ) {
123123
bm.fail( 'should not return NaN' );
124124
}
125125
bm.pass( 'benchmark finished' );
@@ -181,7 +181,7 @@ bench( pkg+'::set:s', function benchmark( bm ) {
181181
}
182182
}
183183
bm.toc();
184-
if ( isnan( y ) ) {
184+
if ( isnan( dist.b ) ) {
185185
bm.fail( 'should not return NaN' );
186186
}
187187
bm.pass( 'benchmark finished' );
@@ -243,7 +243,7 @@ bench( pkg+'::set:m', function benchmark( bm ) {
243243
}
244244
}
245245
bm.toc();
246-
if ( isnan( y ) ) {
246+
if ( isnan( dist.c ) ) {
247247
bm.fail( 'should not return NaN' );
248248
}
249249
bm.pass( 'benchmark finished' );

Diff for: lib/node_modules/@stdlib/stats/base/dists/gamma/ctor/benchmark/benchmark.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ bench( pkg+'::set:alpha', function benchmark( b ) {
112112
}
113113
}
114114
b.toc();
115-
if ( isnan( y ) ) {
115+
if ( isnan( dist.alpha ) ) {
116116
b.fail( 'should not return NaN' );
117117
}
118118
b.pass( 'benchmark finished' );
@@ -170,7 +170,7 @@ bench( pkg+'::set:beta', function benchmark( b ) {
170170
}
171171
}
172172
b.toc();
173-
if ( isnan( y ) ) {
173+
if ( isnan( dist.beta ) ) {
174174
b.fail( 'should not return NaN' );
175175
}
176176
b.pass( 'benchmark finished' );

Diff for: lib/node_modules/@stdlib/stats/base/dists/geometric/ctor/benchmark/benchmark.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ bench( pkg+'::set:p', function benchmark( b ) {
106106
}
107107
}
108108
b.toc();
109-
if ( isnan( y ) ) {
109+
if ( isnan( dist.p ) ) {
110110
b.fail( 'should not return NaN' );
111111
}
112112
b.pass( 'benchmark finished' );

Diff for: lib/node_modules/@stdlib/stats/base/dists/gumbel/ctor/benchmark/benchmark.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ bench( pkg+'::set:mu', function benchmark( b ) {
112112
}
113113
}
114114
b.toc();
115-
if ( isnan( y ) ) {
115+
if ( isnan( dist.mu ) ) {
116116
b.fail( 'should not return NaN' );
117117
}
118118
b.pass( 'benchmark finished' );
@@ -170,7 +170,7 @@ bench( pkg+'::set:beta', function benchmark( b ) {
170170
}
171171
}
172172
b.toc();
173-
if ( isnan( y ) ) {
173+
if ( isnan( dist.beta ) ) {
174174
b.fail( 'should not return NaN' );
175175
}
176176
b.pass( 'benchmark finished' );

Diff for: lib/node_modules/@stdlib/stats/base/dists/hypergeometric/ctor/benchmark/benchmark.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ bench( pkg+'::set:N', function benchmark( b ) {
119119
}
120120
}
121121
b.toc();
122-
if ( isnan( y ) ) {
122+
if ( isnan( dist.N ) ) {
123123
b.fail( 'should not return NaN' );
124124
}
125125
b.pass( 'benchmark finished' );
@@ -181,7 +181,7 @@ bench( pkg+'::set:K', function benchmark( b ) {
181181
}
182182
}
183183
b.toc();
184-
if ( isnan( y ) ) {
184+
if ( isnan( dist.K ) ) {
185185
b.fail( 'should not return NaN' );
186186
}
187187
b.pass( 'benchmark finished' );
@@ -243,7 +243,7 @@ bench( pkg+'::set:n', function benchmark( b ) {
243243
}
244244
}
245245
b.toc();
246-
if ( isnan( y ) ) {
246+
if ( isnan( dist.n ) ) {
247247
b.fail( 'should not return NaN' );
248248
}
249249
b.pass( 'benchmark finished' );

Diff for: lib/node_modules/@stdlib/stats/base/dists/invgamma/ctor/benchmark/benchmark.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ bench( pkg+'::set:alpha', function benchmark( b ) {
112112
}
113113
}
114114
b.toc();
115-
if ( isnan( y ) ) {
115+
if ( isnan( dist.alpha ) ) {
116116
b.fail( 'should not return NaN' );
117117
}
118118
b.pass( 'benchmark finished' );
@@ -170,7 +170,7 @@ bench( pkg+'::set:beta', function benchmark( b ) {
170170
}
171171
}
172172
b.toc();
173-
if ( isnan( y ) ) {
173+
if ( isnan( dist.beta ) ) {
174174
b.fail( 'should not return NaN' );
175175
}
176176
b.pass( 'benchmark finished' );

Diff for: lib/node_modules/@stdlib/stats/base/dists/logistic/ctor/benchmark/benchmark.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ bench( pkg+'::set:mu', function benchmark( bm ) {
112112
}
113113
}
114114
bm.toc();
115-
if ( isnan( y ) ) {
115+
if ( isnan( dist.mu ) ) {
116116
bm.fail( 'should not return NaN' );
117117
}
118118
bm.pass( 'benchmark finished' );
@@ -170,7 +170,7 @@ bench( pkg+'::set:s', function benchmark( bm ) {
170170
}
171171
}
172172
bm.toc();
173-
if ( isnan( y ) ) {
173+
if ( isnan( dist.s ) ) {
174174
bm.fail( 'should not return NaN' );
175175
}
176176
bm.pass( 'benchmark finished' );

Diff for: lib/node_modules/@stdlib/stats/base/dists/lognormal/ctor/benchmark/benchmark.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ bench( pkg+'::set:mu', function benchmark( b ) {
112112
}
113113
}
114114
b.toc();
115-
if ( isnan( y ) ) {
115+
if ( isnan( dist.mu ) ) {
116116
b.fail( 'should not return NaN' );
117117
}
118118
b.pass( 'benchmark finished' );
@@ -170,7 +170,7 @@ bench( pkg+'::set:sigma', function benchmark( b ) {
170170
}
171171
}
172172
b.toc();
173-
if ( isnan( y ) ) {
173+
if ( isnan( dist.sigma ) ) {
174174
b.fail( 'should not return NaN' );
175175
}
176176
b.pass( 'benchmark finished' );

Diff for: lib/node_modules/@stdlib/stats/base/dists/negative-binomial/ctor/benchmark/benchmark.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ bench( pkg+'::set:r', function benchmark( b ) {
113113
}
114114
}
115115
b.toc();
116-
if ( isnan( y ) ) {
116+
if ( isnan( dist.r ) ) {
117117
b.fail( 'should not return NaN' );
118118
}
119119
b.pass( 'benchmark finished' );
@@ -171,7 +171,7 @@ bench( pkg+'::set:p', function benchmark( b ) {
171171
}
172172
}
173173
b.toc();
174-
if ( isnan( y ) ) {
174+
if ( isnan( dist.p ) ) {
175175
b.fail( 'should not return NaN' );
176176
}
177177
b.pass( 'benchmark finished' );

Diff for: lib/node_modules/@stdlib/stats/base/dists/pareto-type1/ctor/benchmark/benchmark.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ bench( pkg+'::set:alpha', function benchmark( b ) {
112112
}
113113
}
114114
b.toc();
115-
if ( isnan( y ) ) {
115+
if ( isnan( dist.alpha ) ) {
116116
b.fail( 'should not return NaN' );
117117
}
118118
b.pass( 'benchmark finished' );
@@ -170,7 +170,7 @@ bench( pkg+'::set:beta', function benchmark( b ) {
170170
}
171171
}
172172
b.toc();
173-
if ( isnan( y ) ) {
173+
if ( isnan( dist.beta ) ) {
174174
b.fail( 'should not return NaN' );
175175
}
176176
b.pass( 'benchmark finished' );

0 commit comments

Comments
 (0)