Skip to content

Commit f10dd8c

Browse files
committed
fix: use resolved order when computing loop variables
--- 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 6c09182 commit f10dd8c

File tree

18 files changed

+36
-18
lines changed

18 files changed

+36
-18
lines changed

lib/node_modules/@stdlib/ndarray/base/for-each/lib/10d.js

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

2323
// MODULES //
2424

25+
var strides2order = require( '@stdlib/ndarray/base/strides2order' );
2526
var zeroTo = require( '@stdlib/array/base/zero-to' );
2627
var reverse = require( '@stdlib/array/base/reverse' );
2728
var take = require( '@stdlib/array/base/take-indexed' );
@@ -119,7 +120,7 @@ function forEach10d( x, fcn, thisArg ) { // eslint-disable-line max-statements
119120
sh = x.shape;
120121
sx = x.strides;
121122
idx = zeroTo( sh.length );
122-
if ( x.order === 'row-major' ) {
123+
if ( strides2order( sx ) === 1 ) {
123124
// For row-major ndarrays, the last dimensions have the fastest changing indices...
124125
S0 = sh[ 9 ];
125126
S1 = sh[ 8 ];

lib/node_modules/@stdlib/ndarray/base/for-each/lib/10d_accessors.js

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

2323
// MODULES //
2424

25+
var strides2order = require( '@stdlib/ndarray/base/strides2order' );
2526
var zeroTo = require( '@stdlib/array/base/zero-to' );
2627
var reverse = require( '@stdlib/array/base/reverse' );
2728
var take = require( '@stdlib/array/base/take-indexed' );
@@ -134,7 +135,7 @@ function forEach10d( x, fcn, thisArg ) { // eslint-disable-line max-statements
134135
sh = x.shape;
135136
sx = x.strides;
136137
idx = zeroTo( sh.length );
137-
if ( x.order === 'row-major' ) {
138+
if ( strides2order( sx ) === 1 ) {
138139
// For row-major ndarrays, the last dimensions have the fastest changing indices...
139140
S0 = sh[ 9 ];
140141
S1 = sh[ 8 ];

lib/node_modules/@stdlib/ndarray/base/for-each/lib/2d.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
// MODULES //
2222

23+
var strides2order = require( '@stdlib/ndarray/base/strides2order' );
2324
var zeroTo = require( '@stdlib/array/base/zero-to' );
2425
var reverse = require( '@stdlib/array/base/reverse' );
2526
var take = require( '@stdlib/array/base/take-indexed' );
@@ -93,7 +94,7 @@ function forEach2d( x, fcn, thisArg ) {
9394
sh = x.shape;
9495
sx = x.strides;
9596
idx = zeroTo( sh.length );
96-
if ( x.order === 'row-major' ) {
97+
if ( strides2order( sx ) === 1 ) {
9798
// For row-major ndarrays, the last dimensions have the fastest changing indices...
9899
S0 = sh[ 1 ];
99100
S1 = sh[ 0 ];

lib/node_modules/@stdlib/ndarray/base/for-each/lib/2d_accessors.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
// MODULES //
2222

23+
var strides2order = require( '@stdlib/ndarray/base/strides2order' );
2324
var zeroTo = require( '@stdlib/array/base/zero-to' );
2425
var reverse = require( '@stdlib/array/base/reverse' );
2526
var take = require( '@stdlib/array/base/take-indexed' );
@@ -108,7 +109,7 @@ function forEach2d( x, fcn, thisArg ) {
108109
sh = x.shape;
109110
sx = x.strides;
110111
idx = zeroTo( sh.length );
111-
if ( x.order === 'row-major' ) {
112+
if ( strides2order( sx ) === 1 ) {
112113
// For row-major ndarrays, the last dimensions have the fastest changing indices...
113114
S0 = sh[ 1 ];
114115
S1 = sh[ 0 ];

lib/node_modules/@stdlib/ndarray/base/for-each/lib/3d.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
// MODULES //
2222

23+
var strides2order = require( '@stdlib/ndarray/base/strides2order' );
2324
var zeroTo = require( '@stdlib/array/base/zero-to' );
2425
var reverse = require( '@stdlib/array/base/reverse' );
2526
var take = require( '@stdlib/array/base/take-indexed' );
@@ -96,7 +97,7 @@ function forEach3d( x, fcn, thisArg ) {
9697
sh = x.shape;
9798
sx = x.strides;
9899
idx = zeroTo( sh.length );
99-
if ( x.order === 'row-major' ) {
100+
if ( strides2order( sx ) === 1 ) {
100101
// For row-major ndarrays, the last dimensions have the fastest changing indices...
101102
S0 = sh[ 2 ];
102103
S1 = sh[ 1 ];

lib/node_modules/@stdlib/ndarray/base/for-each/lib/3d_accessors.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
// MODULES //
2222

23+
var strides2order = require( '@stdlib/ndarray/base/strides2order' );
2324
var zeroTo = require( '@stdlib/array/base/zero-to' );
2425
var reverse = require( '@stdlib/array/base/reverse' );
2526
var take = require( '@stdlib/array/base/take-indexed' );
@@ -111,7 +112,7 @@ function forEach3d( x, fcn, thisArg ) {
111112
sh = x.shape;
112113
sx = x.strides;
113114
idx = zeroTo( sh.length );
114-
if ( x.order === 'row-major' ) {
115+
if ( strides2order( sx ) === 1 ) {
115116
// For row-major ndarrays, the last dimensions have the fastest changing indices...
116117
S0 = sh[ 2 ];
117118
S1 = sh[ 1 ];

lib/node_modules/@stdlib/ndarray/base/for-each/lib/4d.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
// MODULES //
2222

23+
var strides2order = require( '@stdlib/ndarray/base/strides2order' );
2324
var zeroTo = require( '@stdlib/array/base/zero-to' );
2425
var reverse = require( '@stdlib/array/base/reverse' );
2526
var take = require( '@stdlib/array/base/take-indexed' );
@@ -99,7 +100,7 @@ function forEach4d( x, fcn, thisArg ) {
99100
sh = x.shape;
100101
sx = x.strides;
101102
idx = zeroTo( sh.length );
102-
if ( x.order === 'row-major' ) {
103+
if ( strides2order( sx ) === 1 ) {
103104
// For row-major ndarrays, the last dimensions have the fastest changing indices...
104105
S0 = sh[ 3 ];
105106
S1 = sh[ 2 ];

lib/node_modules/@stdlib/ndarray/base/for-each/lib/4d_accessors.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
// MODULES //
2222

23+
var strides2order = require( '@stdlib/ndarray/base/strides2order' );
2324
var zeroTo = require( '@stdlib/array/base/zero-to' );
2425
var reverse = require( '@stdlib/array/base/reverse' );
2526
var take = require( '@stdlib/array/base/take-indexed' );
@@ -114,7 +115,7 @@ function forEach4d( x, fcn, thisArg ) {
114115
sh = x.shape;
115116
sx = x.strides;
116117
idx = zeroTo( sh.length );
117-
if ( x.order === 'row-major' ) {
118+
if ( strides2order( sx ) === 1 ) {
118119
// For row-major ndarrays, the last dimensions have the fastest changing indices...
119120
S0 = sh[ 3 ];
120121
S1 = sh[ 2 ];

lib/node_modules/@stdlib/ndarray/base/for-each/lib/5d.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
// MODULES //
2222

23+
var strides2order = require( '@stdlib/ndarray/base/strides2order' );
2324
var zeroTo = require( '@stdlib/array/base/zero-to' );
2425
var reverse = require( '@stdlib/array/base/reverse' );
2526
var take = require( '@stdlib/array/base/take-indexed' );
@@ -102,7 +103,7 @@ function forEach5d( x, fcn, thisArg ) {
102103
sh = x.shape;
103104
sx = x.strides;
104105
idx = zeroTo( sh.length );
105-
if ( x.order === 'row-major' ) {
106+
if ( strides2order( sx ) === 1 ) {
106107
// For row-major ndarrays, the last dimensions have the fastest changing indices...
107108
S0 = sh[ 4 ];
108109
S1 = sh[ 3 ];

lib/node_modules/@stdlib/ndarray/base/for-each/lib/5d_accessors.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
// MODULES //
2222

23+
var strides2order = require( '@stdlib/ndarray/base/strides2order' );
2324
var zeroTo = require( '@stdlib/array/base/zero-to' );
2425
var reverse = require( '@stdlib/array/base/reverse' );
2526
var take = require( '@stdlib/array/base/take-indexed' );
@@ -117,7 +118,7 @@ function forEach5d( x, fcn, thisArg ) {
117118
sh = x.shape;
118119
sx = x.strides;
119120
idx = zeroTo( sh.length );
120-
if ( x.order === 'row-major' ) {
121+
if ( strides2order( sx ) === 1 ) {
121122
// For row-major ndarrays, the last dimensions have the fastest changing indices...
122123
S0 = sh[ 4 ];
123124
S1 = sh[ 3 ];

0 commit comments

Comments
 (0)