Skip to content

Commit 23f47b4

Browse files
committed
fix: use computed order
--- 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 1473377 commit 23f47b4

File tree

1 file changed

+2
-1
lines changed
  • lib/node_modules/@stdlib/ndarray/base/unary-by/lib

1 file changed

+2
-1
lines changed

lib/node_modules/@stdlib/ndarray/base/unary-by/lib/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
// MODULES //
2222

2323
var iterationOrder = require( '@stdlib/ndarray/base/iteration-order' );
24+
var strides2order = require( '@stdlib/ndarray/base/strides2order' );
2425
var minmaxViewBufferIndex = require( '@stdlib/ndarray/base/minmax-view-buffer-index' );
2526
var ndarray2object = require( '@stdlib/ndarray/base/ndarraylike2object' );
2627
var blockedaccessorunary2d = require( './2d_blocked_accessors.js' );
@@ -282,7 +283,7 @@ function unaryBy( arrays, fcn, clbk, thisArg ) {
282283
ioy = iterationOrder( sy ); // +/-1
283284

284285
// Determine whether we can avoid blocked iteration...
285-
if ( iox !== 0 && ioy !== 0 && iox === ioy ) {
286+
if ( iox !== 0 && ioy !== 0 && strides2order( sx ) === strides2order( sy ) ) { // eslint-disable-line max-len
286287
// Determine the minimum and maximum linear indices which are accessible by the array views:
287288
xmmv = minmaxViewBufferIndex( shx, sx, x.offset );
288289
ymmv = minmaxViewBufferIndex( shy, sy, y.offset );

0 commit comments

Comments
 (0)