File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
lib/node_modules/@stdlib/ndarray/base/shape2strides/lib Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 18
18
19
19
'use strict' ;
20
20
21
+ // MODULES //
22
+
23
+ var isColumnMajor = require ( '@stdlib/ndarray/base/assert/is-column-major-string' ) ;
24
+
25
+
21
26
// FUNCTIONS //
22
27
23
28
/**
@@ -86,7 +91,7 @@ function columnmajor( shape, out ) {
86
91
* // returns [ 1, 3 ]
87
92
*/
88
93
function shape2strides ( shape , order , out ) {
89
- if ( order === 'column-major' ) {
94
+ if ( isColumnMajor ( order ) ) {
90
95
return columnmajor ( shape , out ) ;
91
96
}
92
97
return rowmajor ( shape , out ) ;
Original file line number Diff line number Diff line change 18
18
19
19
'use strict' ;
20
20
21
+ // MODULES //
22
+
23
+ var isColumnMajor = require ( '@stdlib/ndarray/base/assert/is-column-major-string' ) ;
24
+
25
+
21
26
// FUNCTIONS //
22
27
23
28
/**
@@ -85,7 +90,7 @@ function columnmajor( shape ) {
85
90
* // returns [ 1, 3 ]
86
91
*/
87
92
function shape2strides ( shape , order ) {
88
- if ( order === 'column-major' ) {
93
+ if ( isColumnMajor ( order ) ) {
89
94
return columnmajor ( shape ) ;
90
95
}
91
96
return rowmajor ( shape ) ;
You can’t perform that action at this time.
0 commit comments