Skip to content

Commit 4c9b9c1

Browse files
committed
fix: use correct indices
--- 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 a9d961f commit 4c9b9c1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/node_modules/@stdlib/ndarray/base/every-by/lib/1d.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ function every1d( x, clbk, thisArg ) {
9191

9292
// Iterate over the ndarray dimensions...
9393
for ( i0 = 0; i0 < S0; i0++ ) {
94-
if ( !clbk.call( thisArg, xbuf[ ix ], ix, x.ref ) ) {
94+
if ( !clbk.call( thisArg, xbuf[ ix ], [ i0 ], x.ref ) ) {
9595
return false;
9696
}
9797
ix += dx0;

lib/node_modules/@stdlib/ndarray/base/every-by/lib/1d_accessors.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
* var shape = [ 4 ];
5353
*
5454
* // Define the array strides:
55-
* var sx = [ 1 ];
55+
* var sx = [ 2 ];
5656
*
5757
* // Define the index offset:
5858
* var ox = 0;
@@ -98,7 +98,7 @@ function every1d( x, clbk, thisArg ) {
9898

9999
// Iterate over the ndarray dimensions...
100100
for ( i0 = 0; i0 < S0; i0++ ) {
101-
if ( !clbk.call( thisArg, get( xbuf, ix ), ix, x.ref) ) {
101+
if ( !clbk.call( thisArg, get( xbuf, ix ), [ i0 ], x.ref) ) {
102102
return false;
103103
}
104104
ix += dx0;

0 commit comments

Comments
 (0)