Skip to content

Commit 1457ba4

Browse files
committed
Refactor based on updates to ndarraylike2object
1 parent a7673e9 commit 1457ba4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • lib/node_modules/@stdlib/utils/reduce/lib

lib/node_modules/@stdlib/utils/reduce/lib/ndarray.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ var MODE = 'throw';
4343
* @param {IntegerArray} x.strides - stride lengths
4444
* @param {NonNegativeInteger} x.offset - index offset
4545
* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
46-
* @param {Function} x.getter - callback for accessing `x` data buffer elements
46+
* @param {Array<Function>} x.accessors - accessors for accessing data buffer elements
4747
* @param {*} initial - initial value
4848
* @param {Function} fcn - function to apply
4949
* @param {*} thisArg - function execution context
@@ -84,7 +84,7 @@ var MODE = 'throw';
8484
* 'strides': sx,
8585
* 'offset': ox,
8686
* 'order': 'row-major',
87-
* 'getter': getter
87+
* 'accessors': [ getter ]
8888
* };
8989
* x.ref = x;
9090
*
@@ -129,7 +129,7 @@ function reduce( x, initial, fcn, thisArg ) {
129129
ordx = x.order;
130130

131131
// Cache the element accessor:
132-
get = x.getter;
132+
get = x.accessors[ 0 ];
133133

134134
// Cache the reference to the original input array:
135135
ref = x.ref;

0 commit comments

Comments
 (0)