2222
2323// MODULES //
2424
25- var strides2order = require ( '@stdlib/ndarray/base/strides2order' ) ;
2625var zeroTo = require ( '@stdlib/array/base/zero-to' ) ;
2726var reverse = require ( '@stdlib/array/base/reverse' ) ;
2827var take = require ( '@stdlib/array/base/take-indexed' ) ;
@@ -49,6 +48,7 @@ var take = require( '@stdlib/array/base/take-indexed' );
4948* @param {IntegerArray } y.strides - stride lengths
5049* @param {NonNegativeInteger } y.offset - index offset
5150* @param {string } y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
51+ * @param {boolean } isRowMajor - boolean indicating if provided arrays are in row-major order
5252* @param {Callback } fcn - callback function
5353* @param {* } thisArg - callback execution context
5454* @returns {void }
@@ -95,12 +95,12 @@ var take = require( '@stdlib/array/base/take-indexed' );
9595* };
9696*
9797* // Apply the map function:
98- * map10d( x, y, scale, {} );
98+ * map10d( x, y, true, scale, {} );
9999*
100100* console.log( y.data );
101101* // => <Float64Array>[ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]
102102*/
103- function map10d ( x , y , fcn , thisArg ) { // eslint-disable-line max-statements
103+ function map10d ( x , y , isRowMajor , fcn , thisArg ) { // eslint-disable-line max-statements
104104 var xbuf ;
105105 var ybuf ;
106106 var dx0 ;
@@ -157,7 +157,7 @@ function map10d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements
157157 sx = x . strides ;
158158 sy = y . strides ;
159159 idx = zeroTo ( sh . length ) ;
160- if ( strides2order ( sx ) === 1 ) {
160+ if ( isRowMajor ) {
161161 // For row-major ndarrays, the last dimensions have the fastest changing indices...
162162 S0 = sh [ 9 ] ;
163163 S1 = sh [ 8 ] ;
0 commit comments