Skip to content

Commit 2fbaaf5

Browse files
committed
fix: addressing second round comments
--- 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: passed - 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 a7f7271 commit 2fbaaf5

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lib/node_modules/@stdlib/stats/strided/dnancumax/lib/ndarray.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,17 @@ function dnancumax( N, x, strideX, offsetX, y, strideY, offsetY ) {
7474
max = v;
7575
y[ iy ] = max;
7676
i += 1;
77+
ix += strideX;
7778
iy += strideY;
78-
for ( i; i < N; i++ ) {
79-
ix += strideX;
79+
for ( ; i < N; i++ ) {
8080
v = x[ ix ];
8181
if ( isnan( v ) === false ) {
8282
if ( v > max || ( v === max && isPositiveZero( v ) ) ) {
8383
max = v;
8484
}
8585
}
8686
y[ iy ] = max;
87+
ix += strideX;
8788
iy += strideY;
8889
}
8990
return y;

lib/node_modules/@stdlib/stats/strided/dnancumax/src/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,17 @@ void API_SUFFIX(stdlib_strided_dnancumax_ndarray)( const CBLAS_INT N, const doub
7676
max = v;
7777
Y[ iy ] = max;
7878
i += 1;
79+
ix += strideX;
7980
iy += strideY;
8081
for (; i < N; i++ ) {
81-
ix += strideX;
8282
v = X[ ix ];
8383
if ( !stdlib_base_is_nan( v ) ) {
8484
if ( v > max || ( v == max && stdlib_base_is_positive_zero( v ) ) ) {
8585
max = v;
8686
}
8787
}
8888
Y[ iy ] = max;
89+
ix += strideX;
8990
iy += strideY;
9091
}
9192
return;

0 commit comments

Comments
 (0)