From b139df68c5b245fb40e7ae29e0f1cf0ba86915d3 Mon Sep 17 00:00:00 2001 From: Philipp Burckhardt Date: Mon, 20 Apr 2026 01:34:34 -0500 Subject: [PATCH] bench: fix swapped dtypes in `ndarray/{ones,zeros,empty}` size benchmarks The per-size float32 and float64 benchmark files had their `opts.dtype` values swapped relative to the filename and bench label, so each file benchmarked the opposite dtype from the one it advertised. --- 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 --- --- .../@stdlib/ndarray/empty/benchmark/benchmark.size.float32.js | 2 +- .../@stdlib/ndarray/empty/benchmark/benchmark.size.float64.js | 2 +- .../@stdlib/ndarray/ones/benchmark/benchmark.size.float32.js | 2 +- .../@stdlib/ndarray/ones/benchmark/benchmark.size.float64.js | 2 +- .../@stdlib/ndarray/zeros/benchmark/benchmark.size.float32.js | 2 +- .../@stdlib/ndarray/zeros/benchmark/benchmark.size.float64.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/node_modules/@stdlib/ndarray/empty/benchmark/benchmark.size.float32.js b/lib/node_modules/@stdlib/ndarray/empty/benchmark/benchmark.size.float32.js index 192594305d2f..bc93c734bc0a 100644 --- a/lib/node_modules/@stdlib/ndarray/empty/benchmark/benchmark.size.float32.js +++ b/lib/node_modules/@stdlib/ndarray/empty/benchmark/benchmark.size.float32.js @@ -52,7 +52,7 @@ function createBenchmark( len ) { var i; opts = { - 'dtype': 'float64' + 'dtype': 'float32' }; b.tic(); diff --git a/lib/node_modules/@stdlib/ndarray/empty/benchmark/benchmark.size.float64.js b/lib/node_modules/@stdlib/ndarray/empty/benchmark/benchmark.size.float64.js index f6392453c363..19f9cec04e73 100644 --- a/lib/node_modules/@stdlib/ndarray/empty/benchmark/benchmark.size.float64.js +++ b/lib/node_modules/@stdlib/ndarray/empty/benchmark/benchmark.size.float64.js @@ -52,7 +52,7 @@ function createBenchmark( len ) { var i; opts = { - 'dtype': 'float32' + 'dtype': 'float64' }; b.tic(); diff --git a/lib/node_modules/@stdlib/ndarray/ones/benchmark/benchmark.size.float32.js b/lib/node_modules/@stdlib/ndarray/ones/benchmark/benchmark.size.float32.js index 7f82abc018d0..031d5ca6e488 100644 --- a/lib/node_modules/@stdlib/ndarray/ones/benchmark/benchmark.size.float32.js +++ b/lib/node_modules/@stdlib/ndarray/ones/benchmark/benchmark.size.float32.js @@ -52,7 +52,7 @@ function createBenchmark( len ) { var i; opts = { - 'dtype': 'float64' + 'dtype': 'float32' }; b.tic(); diff --git a/lib/node_modules/@stdlib/ndarray/ones/benchmark/benchmark.size.float64.js b/lib/node_modules/@stdlib/ndarray/ones/benchmark/benchmark.size.float64.js index 634662442585..dc4ef8431666 100644 --- a/lib/node_modules/@stdlib/ndarray/ones/benchmark/benchmark.size.float64.js +++ b/lib/node_modules/@stdlib/ndarray/ones/benchmark/benchmark.size.float64.js @@ -52,7 +52,7 @@ function createBenchmark( len ) { var i; opts = { - 'dtype': 'float32' + 'dtype': 'float64' }; b.tic(); diff --git a/lib/node_modules/@stdlib/ndarray/zeros/benchmark/benchmark.size.float32.js b/lib/node_modules/@stdlib/ndarray/zeros/benchmark/benchmark.size.float32.js index 08d374b11441..f51cd1da0c0b 100644 --- a/lib/node_modules/@stdlib/ndarray/zeros/benchmark/benchmark.size.float32.js +++ b/lib/node_modules/@stdlib/ndarray/zeros/benchmark/benchmark.size.float32.js @@ -52,7 +52,7 @@ function createBenchmark( len ) { var i; opts = { - 'dtype': 'float64' + 'dtype': 'float32' }; b.tic(); diff --git a/lib/node_modules/@stdlib/ndarray/zeros/benchmark/benchmark.size.float64.js b/lib/node_modules/@stdlib/ndarray/zeros/benchmark/benchmark.size.float64.js index 064e21158977..8290d4d018cd 100644 --- a/lib/node_modules/@stdlib/ndarray/zeros/benchmark/benchmark.size.float64.js +++ b/lib/node_modules/@stdlib/ndarray/zeros/benchmark/benchmark.size.float64.js @@ -52,7 +52,7 @@ function createBenchmark( len ) { var i; opts = { - 'dtype': 'float32' + 'dtype': 'float64' }; b.tic();