From b907636b2e9ecee7d67d1fada4ebaeec1fb608e3 Mon Sep 17 00:00:00 2001 From: LokeshRanjan Date: Mon, 26 Jan 2026 15:41:26 +0530 Subject: [PATCH 1/2] bench: add opts for halfnormal-mode --- 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: na - 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 --- --- .../base/dists/halfnormal/mode/benchmark/benchmark.js | 10 ++++++---- .../halfnormal/mode/benchmark/benchmark.native.js | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mode/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mode/benchmark/benchmark.js index 5a46bc0b6b3e..b61c219661f4 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mode/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mode/benchmark/benchmark.js @@ -32,16 +32,18 @@ var mode = require( './../lib' ); bench( pkg, function benchmark( b ) { var sigma; - var len; + var opts; var y; var i; - len = 100; - sigma = uniform( len, EPS, 20.0 ); + opts = { + 'dtype': 'float64' + }; + sigma = uniform( 100, EPS, 20.0, opts ); b.tic(); for ( i = 0; i < b.iterations; i++ ) { - y = mode( sigma[ i % len ] ); + y = mode( sigma[ i%sigma.length ] ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); } diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mode/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mode/benchmark/benchmark.native.js index f66312bd0d86..44be98aa9f52 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mode/benchmark/benchmark.native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mode/benchmark/benchmark.native.js @@ -41,16 +41,18 @@ var opts = { bench( pkg+'::native', opts, function benchmark( b ) { var sigma; - var len; + var opts; var y; var i; - len = 100; - sigma = uniform( len, EPS, 20.0 ); + opts = { + 'dtype': 'float64' + }; + sigma = uniform( 100, EPS, 20.0, opts ); b.tic(); for ( i = 0; i < b.iterations; i++ ) { - y = mode( sigma[ i % len ] ); + y = mode( sigma[ i%sigma.length ] ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); } From 62b509d6933172455b83706c3b67dcc65c7cb9a4 Mon Sep 17 00:00:00 2001 From: LokeshRanjan Date: Mon, 26 Jan 2026 15:47:26 +0530 Subject: [PATCH 2/2] bench: use string interpolation --- 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: na - 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 --- --- .../base/dists/halfnormal/mode/benchmark/benchmark.native.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mode/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mode/benchmark/benchmark.native.js index 44be98aa9f52..ae44ff7118e7 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mode/benchmark/benchmark.native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mode/benchmark/benchmark.native.js @@ -25,6 +25,7 @@ var bench = require( '@stdlib/bench' ); var uniform = require( '@stdlib/random/array/uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var tryRequire = require( '@stdlib/utils/try-require' ); +var format = require( '@stdlib/string/format' ); var EPS = require( '@stdlib/constants/float64/eps' ); var pkg = require( './../package.json' ).name; @@ -39,7 +40,7 @@ var opts = { // MAIN // -bench( pkg+'::native', opts, function benchmark( b ) { +bench( format( '%s::native', pkg ), opts, function benchmark( b ) { var sigma; var opts; var y;