Skip to content

Commit aa86262

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 71e6a7f commit aa86262

File tree

1 file changed

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

1 file changed

+2
-1
lines changed

lib/node_modules/@stdlib/ndarray/base/assign/lib/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ var isRealDataType = require( '@stdlib/ndarray/base/assert/is-real-data-type' );
2525
var isComplexArray = require( '@stdlib/array/base/assert/is-complex-typed-array' );
2626
var isBooleanArray = require( '@stdlib/array/base/assert/is-booleanarray' );
2727
var iterationOrder = require( '@stdlib/ndarray/base/iteration-order' );
28+
var strides2order = require( '@stdlib/ndarray/base/strides2order' );
2829
var castReturn = require( '@stdlib/complex/base/cast-return' );
2930
var complexCtors = require( '@stdlib/complex/ctors' );
3031
var minmaxViewBufferIndex = require( '@stdlib/ndarray/base/minmax-view-buffer-index' );
@@ -351,7 +352,7 @@ function assign( arrays ) {
351352
ioy = iterationOrder( sy ); // +/-1
352353

353354
// Determine whether we can avoid blocked iteration...
354-
if ( iox !== 0 && ioy !== 0 && iox === ioy ) {
355+
if ( iox !== 0 && ioy !== 0 && strides2order( sx ) === strides2order( sy ) ) {
355356
// Determine the minimum and maximum linear indices which are accessible by the array views:
356357
xmmv = minmaxViewBufferIndex( shx, sx, x.offset );
357358
ymmv = minmaxViewBufferIndex( shy, sy, y.offset );

0 commit comments

Comments
 (0)