Skip to content

Commit 446b4cb

Browse files
committed
bench: fix value range
1 parent ca9cb28 commit 446b4cb

File tree

1 file changed

+2
-2
lines changed
  • lib/node_modules/@stdlib/ndarray/base/sub2ind/benchmark

1 file changed

+2
-2
lines changed

lib/node_modules/@stdlib/ndarray/base/sub2ind/benchmark/benchmark.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ bench( pkg+':mode=[normalize]', function benchmark( b ) {
280280

281281
b.tic();
282282
for ( i = 0; i < b.iterations; i++ ) {
283-
s2 = floor( randu()*2000.0 ) - 1000.0;
283+
s2 = floor( randu()*20.0 ) - 10.0;
284284
out = sub2ind( shape, strides, offset, s0, s1, s2, mode );
285285
if ( out !== out ) {
286286
b.fail( 'should not return NaN' );
@@ -319,7 +319,7 @@ bench( pkg+':mode=[normalize],offset=0', function benchmark( b ) {
319319

320320
b.tic();
321321
for ( i = 0; i < b.iterations; i++ ) {
322-
s2 = floor( randu()*2000.0 ) - 1000.0;
322+
s2 = floor( randu()*20.0 ) - 10.0;
323323
out = sub2ind( shape, strides, offset, s0, s1, s2, mode );
324324
if ( out !== out ) {
325325
b.fail( 'should not return NaN' );

0 commit comments

Comments
 (0)