@@ -31,21 +31,26 @@ var isPositiveZero = require( '@stdlib/math/base/assert/is-positive-zero' );
3131*
3232* @private
3333* @param {PositiveInteger } N - number of indexed elements
34- * @param {NumericArray } x - input array
35- * @param {integer } strideX - `x` stride length
34+ * @param {Object } x - input array object
35+ * @param {Collection } x.data - input array data
36+ * @param {Array<Function> } x.accessors - array element accessors
37+ * @param {integer } strideX - stride length for `x`
3638* @param {NonNegativeInteger } offsetX - starting index for `x`
37- * @param {NumericArray } y - output array
38- * @param {integer } strideY - `y` stride length
39+ * @param {Object } y - output array object
40+ * @param {Collection } y.data - output array data
41+ * @param {Array<Function> } y.accessors - array element accessors
42+ * @param {integer } strideY - stride length for `y`
3943* @param {NonNegativeInteger } offsetY - starting index for `y`
40- * @returns {NumericArray } output array
44+ * @returns {Object } output array object
4145*
4246* @example
4347* var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
48+ * var arraylike2object = require( '@stdlib/array/base/arraylike2object' );
4449*
4550* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];
4651* var y = [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ];
4752*
48- * cumax( 4, toAccessorArray( x ), 2, 1, toAccessorArray( y ), 1, 0 );
53+ * cumax( 4, arraylike2object( toAccessorArray( x ) ) , 2, 1, arraylike2object( toAccessorArray( y ) ), 1, 0 );
4954* // y => [ 1.0, 1.0, 2.0, 4.0, 0.0, 0.0, 0.0, 0.0 ];
5055*/
5156function cumax ( N , x , strideX , offsetX , y , strideY , offsetY ) {
@@ -59,16 +64,12 @@ function cumax( N, x, strideX, offsetX, y, strideY, offsetY ) {
5964 var v ;
6065 var i ;
6166
62- // Cache reference to input array data:
67+ // Cache reference to array data:
6368 xbuf = x . data ;
64-
65- // Cache reference to output array data:
6669 ybuf = y . data ;
6770
6871 // Cache a reference to the element accessor:
6972 get = x . accessors [ 0 ] ;
70-
71- // Cache a reference to the element accessor:
7273 set = y . accessors [ 1 ] ;
7374
7475 ix = offsetX ;
0 commit comments