Skip to content

Commit 117f26e

Browse files
authored
chore: update implementation
Signed-off-by: Shabareesh Shetty <[email protected]>
1 parent eb6d0b0 commit 117f26e

File tree

1 file changed

+4
-4
lines changed
  • lib/node_modules/@stdlib/blas/base/icamax/lib

1 file changed

+4
-4
lines changed

lib/node_modules/@stdlib/blas/base/icamax/lib/ndarray.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,17 @@ function icamax( N, x, strideX, offsetX ) {
4949
var y;
5050
var i;
5151

52-
if ( N < 1 ) {
53-
return -1;
52+
if ( N < 1 || strideX <= 0 ) {
53+
return y;
5454
}
5555
y = 0;
5656
if ( N === 1 ) {
5757
return y;
5858
}
59-
cmax = scabs1( x.get( offsetX ) );
59+
cmax = scabs1( x[ offsetX ] );
6060
ix = offsetX + strideX;
6161
for ( i = 1; i < N; i++ ) {
62-
v = scabs1( x.get( ix ) );
62+
v = scabs1( x[ ix ] );
6363
if ( v > cmax ) {
6464
y = i;
6565
cmax = v;

0 commit comments

Comments
 (0)