From 352f7a0e3ae67f2b60f65a46d2b38265a849efb7 Mon Sep 17 00:00:00 2001 From: Kartikeya Date: Sun, 29 Mar 2026 12:09:03 +0530 Subject: [PATCH] chore: fix JavaScript lint errors (issue #11193) --- .../stats/ztest2/benchmark/benchmark.js | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/ztest2/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/ztest2/benchmark/benchmark.js index 18e953ee43bc..58cdd1b62f4a 100644 --- a/lib/node_modules/@stdlib/stats/ztest2/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/ztest2/benchmark/benchmark.js @@ -39,14 +39,14 @@ bench( pkg, function benchmark( b ) { var i; sigma = stdev( 1.0, 51.0 ); - x = new Array( 100 ); - for ( i = 0; i < x.length; i++ ) { - x[ i ] = ( randu()*50.0 ) + 1.0; + x = []; + for ( i = 0; i < 100; i++ ) { + x.push( ( randu()*50.0 ) + 1.0 ); } - y = new Array( 120 ); - for ( i = 0; i < y.length; i++ ) { - y[ i ] = ( randu()*50.0 ) + 1.0; + y = []; + for ( i = 0; i < 120; i++ ) { + y.push( ( randu()*50.0 ) + 1.0 ); } b.tic(); @@ -74,13 +74,13 @@ bench( pkg+'::one-sided', function benchmark( b ) { var i; sigma = stdev( 1.0, 51.0 ); - x = new Array( 100 ); - for ( i = 0; i < x.length; i++ ) { - x[ i ] = ( randu()*50.0 ) + 1.0; + x = []; + for ( i = 0; i < 100; i++ ) { + x.push( ( randu()*50.0 ) + 1.0 ); } - y = new Array( 120 ); - for ( i = 0; i < y.length; i++ ) { - y[ i ] = ( randu()*50.0 ) + 1.0; + y = []; + for ( i = 0; i < 120; i++ ) { + y.push( ( randu()*50.0 ) + 1.0 ); } opts = { 'alternative': 'less' @@ -112,13 +112,13 @@ bench( pkg+':print', function benchmark( b ) { var i; sigma = stdev( 1.0, 51.0 ); - x = new Array( 100 ); - for ( i = 0; i < x.length; i++ ) { - x[ i ] = ( randu()*50.0 ) + 1.0; + x = []; + for ( i = 0; i < 100; i++ ) { + x.push( ( randu()*50.0 ) + 1.0 ); } - y = new Array( 120 ); - for ( i = 0; i < y.length; i++ ) { - y[ i ] = ( randu()*50.0 ) + 1.0; + y = []; + for ( i = 0; i < 120; i++ ) { + y.push( ( randu()*50.0 ) + 1.0 ); } result = ztest2( x, y, sigma, sigma );