Skip to content

Commit dd84fbc

Browse files
committed
fix: apply suggestions from code review
--- 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: missing_dependencies - 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 ---
1 parent 04a4694 commit dd84fbc

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

lib/node_modules/@stdlib/blas/ext/base/ddiff/lib/ndarray.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function ddiff( N, k, x, strideX, offsetX, N1, prepend, strideP, offsetP, N2, ap
7777
return out;
7878
}
7979

80-
// If k >= total number of elements, the k-th forward difference results in an empty array, so this function is a no-op.
80+
// If k >= total number of elements, the k-th forward difference results in an empty array, so this function is a no-op...
8181
if ( k >= total ) {
8282
return out;
8383
}

lib/node_modules/@stdlib/blas/ext/base/ddiff/src/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,8 @@ void API_SUFFIX(stdlib_strided_ddiff_ndarray)( const CBLAS_INT N, const CBLAS_IN
202202
CBLAS_INT i;
203203

204204
total = N + N1 + N2;
205+
206+
// If k >= total number of elements, the k-th forward difference results in an empty array, so this function is a no-op...
205207
if ( total <= 1 || k >= total ) {
206208
return;
207209
}

0 commit comments

Comments
 (0)