@@ -233,11 +233,11 @@ <h1><a href="../../../index.html">All files</a> / <a href="index.html">ndarray/s
233233< span class ="cline-any cline-yes "> 58x</ span >
234234< span class ="cline-any cline-yes "> 58x</ span >
235235< span class ="cline-any cline-yes "> 58x</ span >
236- < span class ="cline-any cline-yes "> 58x</ span >
237- < span class ="cline-any cline-yes "> 58x</ span >
238- < span class ="cline-any cline-yes "> 58x</ span >
239236< span class ="cline-any cline-yes "> 20x</ span >
240237< span class ="cline-any cline-yes "> 20x</ span >
238+ < span class ="cline-any cline-yes "> 38x</ span >
239+ < span class ="cline-any cline-yes "> 38x</ span >
240+ < span class ="cline-any cline-yes "> 38x</ span >
241241< span class ="cline-any cline-yes "> 58x</ span >
242242< span class ="cline-any cline-yes "> 34x</ span >
243243< span class ="cline-any cline-yes "> 34x</ span >
@@ -294,7 +294,7 @@ <h1><a href="../../../index.html">All files</a> / <a href="index.html">ndarray/s
294294*
295295* @param {ndarray} x - input array
296296* @param {Object} [options] - function options
297- * @param {integer} [options.dim=0 ] - dimension along which to perform the operation
297+ * @param {integer} [options.dim=-1 ] - dimension along which to perform the operation
298298* @throws {TypeError} first argument must be an ndarray having one or more dimensions
299299* @throws {RangeError} dimension index exceeds the number of dimensions
300300* @throws {TypeError} options argument must be an object
@@ -329,20 +329,20 @@ <h1><a href="../../../index.html">All files</a> / <a href="index.html">ndarray/s
329329 var options;
330330 var opts;
331331
332- opts = {
333- 'dim': -1
334- };
335332 if ( !isndarrayLike( x ) ) {
336333 throw new TypeError( format( 'invalid argument. First argument must be an ndarray. Value: `%s`.', x ) );
337334 }
335+ opts = {
336+ 'dim': -1
337+ };
338338 if ( arguments.length > 1 ) {
339339 options = arguments[ 1 ];
340340 if ( !isPlainObject( options ) ) {
341341 throw new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );
342342 }
343343 if ( hasOwnProp( options, 'dim' ) ) {
344344 if ( !isInteger( options.dim ) ) {
345- throw new TypeError( format( 'invalid option. `%s` option must be an integer. Option: `%s`.', 'strict', options.strict ) );
345+ throw new TypeError( format( 'invalid option. `%s` option must be an integer. Option: `%s`.', 'strict', options.dim ) );
346346 }
347347 opts.dim = options.dim;
348348 }
@@ -361,7 +361,7 @@ <h1><a href="../../../index.html">All files</a> / <a href="index.html">ndarray/s
361361 < div class ='footer quiet pad2 space-top1 center small '>
362362 Code coverage generated by
363363 < a href ="https://istanbul.js.org/ " target ="_blank " rel ="noopener noreferrer "> istanbul</ a >
364- at 2025-09-29T15:01:51.118Z
364+ at 2025-09-29T23:37:53.374Z
365365 </ div >
366366 < script src ="../../../prettify.js "> </ script >
367367 < script >
0 commit comments