From f52c7d36e836f13e84be190febcdcae28db882b1 Mon Sep 17 00:00:00 2001 From: Dev Agarwalla <80046464+devag7@users.noreply.github.com> Date: Sat, 31 May 2025 21:40:46 +0000 Subject: [PATCH] docs: update normalization function documentation to clarify temporary implementation --- 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: na - 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: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../@stdlib/ml/incr/kmeans/lib/normalize.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/ml/incr/kmeans/lib/normalize.js b/lib/node_modules/@stdlib/ml/incr/kmeans/lib/normalize.js index 492aeb665948..1820c921bbeb 100644 --- a/lib/node_modules/@stdlib/ml/incr/kmeans/lib/normalize.js +++ b/lib/node_modules/@stdlib/ml/incr/kmeans/lib/normalize.js @@ -28,6 +28,14 @@ var sqrt = require( '@stdlib/math/base/special/sqrt' ); /** * Normalizes a vector. * +* ## Notes +* +* - This is a temporary implementation. This function should eventually be +* replaced once the project has implemented comparable functionality as a +* standalone package (e.g., BLAS), which may avoid the naive approach +* susceptible to overflow/underflow due to summing squares and computing +* the square root. +* * @private * @param {NonNegativeInteger} N - number of elements * @param {NumericArray} X - strided array @@ -35,7 +43,7 @@ var sqrt = require( '@stdlib/math/base/special/sqrt' ); * @param {NonNegativeInteger} offsetX - index offset * @returns {NumericArray} input array */ -function normalize( N, X, strideX, offsetX ) { // TODO: eventually remove this function once project has implemented comparable functionality as a standalone package (e.g., BLAS, which may avoid the naive approach susceptible to overflow/overflow due to summing squares and computing the square root) +function normalize( N, X, strideX, offsetX ) { var xi; var m; var v;