Skip to content

Commit f52c7d3

Browse files
committed
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 ---
1 parent 385ab25 commit f52c7d3

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

lib/node_modules/@stdlib/ml/incr/kmeans/lib/normalize.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,22 @@ var sqrt = require( '@stdlib/math/base/special/sqrt' );
2828
/**
2929
* Normalizes a vector.
3030
*
31+
* ## Notes
32+
*
33+
* - This is a temporary implementation. This function should eventually be
34+
* replaced once the project has implemented comparable functionality as a
35+
* standalone package (e.g., BLAS), which may avoid the naive approach
36+
* susceptible to overflow/underflow due to summing squares and computing
37+
* the square root.
38+
*
3139
* @private
3240
* @param {NonNegativeInteger} N - number of elements
3341
* @param {NumericArray} X - strided array
3442
* @param {integer} strideX - stride
3543
* @param {NonNegativeInteger} offsetX - index offset
3644
* @returns {NumericArray} input array
3745
*/
38-
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)
46+
function normalize( N, X, strideX, offsetX ) {
3947
var xi;
4048
var m;
4149
var v;

0 commit comments

Comments
 (0)