Skip to content

Commit e9c2f87

Browse files
committed
Fix JSDoc doctest: add variable assignment before returns comment
1 parent 78c612a commit e9c2f87

File tree

1 file changed

+4
-15
lines changed
  • lib/node_modules/@stdlib/blas/ext/base/ndarray/dapx/lib

1 file changed

+4
-15
lines changed

lib/node_modules/@stdlib/blas/ext/base/ndarray/dapx/lib/main.js

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,27 +48,16 @@ var ndarraylike2scalar = require( '@stdlib/ndarray/base/ndarraylike2scalar' );
4848
* 'dtype': 'float64'
4949
* });
5050
*
51-
* dapx( [ x, alpha ] );
51+
* var out = dapx( [ x, alpha ] );
5252
* // returns <ndarray>
5353
*/
5454
function dapx( arrays ) {
55-
var buf;
56-
var sx;
57-
var ox;
58-
var N;
59-
var x;
55+
var x = arrays[ 0 ];
6056

61-
x = arrays[ 0 ];
62-
63-
N = numelDimension( x, 0 );
64-
if ( N <= 0 ) {
57+
if ( numelDimension( x, 0 ) <= 0 ) {
6558
return x;
6659
}
67-
buf = getData( x );
68-
sx = getStride( x, 0 );
69-
ox = getOffset( x );
70-
71-
strided( N, ndarraylike2scalar( arrays[ 1 ] ), buf, sx, ox );
60+
strided( numelDimension( x, 0 ), ndarraylike2scalar( arrays[ 1 ] ), getData( x ), getStride( x, 0 ), getOffset( x ) ); // eslint-disable-line max-len
7261
return x;
7362
}
7463

0 commit comments

Comments
 (0)