From d9b40a056b43445d3c8017267cfdfdcef494ea1b Mon Sep 17 00:00:00 2001 From: Om-A-osc Date: Sat, 24 Jan 2026 13:29:07 +0530 Subject: [PATCH 1/3] chore: array literal with push --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- lib/node_modules/@stdlib/stats/ranks/benchmark/benchmark.js | 6 +++--- lib/node_modules/@stdlib/stats/ranks/lib/order.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/ranks/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/ranks/benchmark/benchmark.js index d6ef7b0a6ff8..05acdbfde97d 100644 --- a/lib/node_modules/@stdlib/stats/ranks/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/ranks/benchmark/benchmark.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2026 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,10 +35,10 @@ bench( pkg, function benchmark( b ) { var len; var i; - arr = new Array( 100 ); + arr = []; len = arr.length; for ( i = 0; i < len; i++ ) { - arr[ i ] = ( randu()*100.0 ) - 50.0; + arr.push( ( randu()*100.0 ) - 50.0 ); } b.tic(); diff --git a/lib/node_modules/@stdlib/stats/ranks/lib/order.js b/lib/node_modules/@stdlib/stats/ranks/lib/order.js index d4cbee935782..742818b77c67 100644 --- a/lib/node_modules/@stdlib/stats/ranks/lib/order.js +++ b/lib/node_modules/@stdlib/stats/ranks/lib/order.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2026 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -52,9 +52,9 @@ function order( x ) { var arr; var i; - arr = new Array( x.length ); + arr = []; for ( i = 0; i < x.length; i++ ) { - arr[ i ] = i; + arr.push( i ); } return arr.sort( compare ); From cbc3262ca73e179aa3f79e38595dce0b3c390b9b Mon Sep 17 00:00:00 2001 From: Athan Date: Sun, 25 Jan 2026 18:37:58 -0800 Subject: [PATCH 2/3] chore: clean-up Signed-off-by: Athan --- .../@stdlib/stats/ranks/benchmark/benchmark.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/ranks/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/ranks/benchmark/benchmark.js index 05acdbfde97d..b92c7f37e228 100644 --- a/lib/node_modules/@stdlib/stats/ranks/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/ranks/benchmark/benchmark.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2026 The Stdlib Authors. +* Copyright (c) 2018 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ // MODULES // var bench = require( '@stdlib/bench' ); -var randu = require( '@stdlib/random/base/randu' ); +var uniform = require( '@stdlib/random/array/uniform' ); var isArray = require( '@stdlib/assert/is-array' ); var pkg = require( './../package.json' ).name; var ranks = require( './../lib' ); @@ -32,18 +32,15 @@ var ranks = require( './../lib' ); bench( pkg, function benchmark( b ) { var result; var arr; - var len; var i; - arr = []; - len = arr.length; - for ( i = 0; i < len; i++ ) { - arr.push( ( randu()*100.0 ) - 50.0 ); - } + arr = uniform( 100, -50.0, 50.0, { + 'dtype': 'generic' + }); b.tic(); for ( i = 0; i < b.iterations; i++ ) { - arr[ 0 ] = ( randu()*100.0 ) - 50.0; + arr[ 0 ] = i; result = ranks( arr ); if ( typeof result !== 'object' ) { b.fail( 'should return an object' ); From 25027016fa7c02f6c9823a1ddfb914f87cc2aaca Mon Sep 17 00:00:00 2001 From: Athan Date: Sun, 25 Jan 2026 18:38:41 -0800 Subject: [PATCH 3/3] docs: fix copyright Signed-off-by: Athan --- lib/node_modules/@stdlib/stats/ranks/lib/order.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/stats/ranks/lib/order.js b/lib/node_modules/@stdlib/stats/ranks/lib/order.js index 742818b77c67..118effdd9687 100644 --- a/lib/node_modules/@stdlib/stats/ranks/lib/order.js +++ b/lib/node_modules/@stdlib/stats/ranks/lib/order.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2026 The Stdlib Authors. +* Copyright (c) 2018 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.