Skip to content

Commit 7a2753c

Browse files
chore: fix JavaScript lint errors
PR-URL: #11199 Closes: #11193 Ref: #5377 Reviewed-by: Athan Reines <kgryte@gmail.com>
1 parent 114a601 commit 7a2753c

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

lib/node_modules/@stdlib/stats/ztest2/benchmark/benchmark.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ bench( pkg, function benchmark( b ) {
3939
var i;
4040

4141
sigma = stdev( 1.0, 51.0 );
42-
x = new Array( 100 );
43-
for ( i = 0; i < x.length; i++ ) {
44-
x[ i ] = ( randu()*50.0 ) + 1.0;
42+
x = [];
43+
for ( i = 0; i < 100; i++ ) {
44+
x.push( ( randu()*50.0 ) + 1.0 );
4545
}
4646

47-
y = new Array( 120 );
48-
for ( i = 0; i < y.length; i++ ) {
49-
y[ i ] = ( randu()*50.0 ) + 1.0;
47+
y = [];
48+
for ( i = 0; i < 120; i++ ) {
49+
y.push( ( randu()*50.0 ) + 1.0 );
5050
}
5151

5252
b.tic();
@@ -74,13 +74,13 @@ bench( pkg+'::one-sided', function benchmark( b ) {
7474
var i;
7575

7676
sigma = stdev( 1.0, 51.0 );
77-
x = new Array( 100 );
78-
for ( i = 0; i < x.length; i++ ) {
79-
x[ i ] = ( randu()*50.0 ) + 1.0;
77+
x = [];
78+
for ( i = 0; i < 100; i++ ) {
79+
x.push( ( randu()*50.0 ) + 1.0 );
8080
}
81-
y = new Array( 120 );
82-
for ( i = 0; i < y.length; i++ ) {
83-
y[ i ] = ( randu()*50.0 ) + 1.0;
81+
y = [];
82+
for ( i = 0; i < 120; i++ ) {
83+
y.push( ( randu()*50.0 ) + 1.0 );
8484
}
8585
opts = {
8686
'alternative': 'less'
@@ -112,13 +112,13 @@ bench( pkg+':print', function benchmark( b ) {
112112
var i;
113113

114114
sigma = stdev( 1.0, 51.0 );
115-
x = new Array( 100 );
116-
for ( i = 0; i < x.length; i++ ) {
117-
x[ i ] = ( randu()*50.0 ) + 1.0;
115+
x = [];
116+
for ( i = 0; i < 100; i++ ) {
117+
x.push( ( randu()*50.0 ) + 1.0 );
118118
}
119-
y = new Array( 120 );
120-
for ( i = 0; i < y.length; i++ ) {
121-
y[ i ] = ( randu()*50.0 ) + 1.0;
119+
y = [];
120+
for ( i = 0; i < 120; i++ ) {
121+
y.push( ( randu()*50.0 ) + 1.0 );
122122
}
123123
result = ztest2( x, y, sigma, sigma );
124124

0 commit comments

Comments
 (0)