Skip to content

Commit 81e2b19

Browse files
committed
repl
1 parent 5bad41c commit 81e2b19

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

lib/node_modules/@stdlib/stats/base/range/docs/repl.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
> var N = {{alias:@stdlib/math/base/special/floor}}( 3 / 2 );
3939
> var stride = 2;
4040
> {{alias}}( N, x, stride )
41-
NaN
41+
0
4242

4343
// Using view offsets:
4444
> var x0 = new {{alias:@stdlib/array/float64}}
@@ -48,7 +48,7 @@
4848
> N = {{alias:@stdlib/math/base/special/floor}}( x0.length / 2 );
4949
> stride = 2;
5050
> {{alias}}( N, x1, stride )
51-
NaN
51+
0
5252

5353

5454
{{alias}}.ndarray( N, x, strideX, offsetX )

lib/node_modules/@stdlib/stats/base/range/test/test.range.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,17 @@ tape( 'the function calculates the range of a strided array', function test( t )
7070
});
7171

7272
tape( 'the function calculates the range value of a sorted strided array (accessor)', function test( t ) {
73+
var v = range( x.length, x, accessor, 1 );
74+
var x = toAccessorArray( new Float64Array( [ -5.0, -2.0, 0.0, 1.0, 3.0, 5.0 ] ) );
75+
7376
function accessor( arr, idx ) {
7477
return arr.get( idx );
7578
}
7679

77-
var x = toAccessorArray( new Float64Array( [ -5.0, -2.0, 0.0, 1.0, 3.0, 5.0 ] ) );
78-
var v = range( x.length, x, accessor, 1 );
79-
8080
t.strictEqual(isnan(v), true, 'returns expected value');
8181
t.end();
8282
});
8383

84-
8584
tape( 'if provided an `N` parameter less than or equal to `0`, the function returns `NaN`', function test( t ) {
8685
var x;
8786
var v;
@@ -190,7 +189,6 @@ tape( 'if provided a `stride` parameter equal to `0`, the function returns the f
190189
tape( 'the function supports view offsets', function test( t ) {
191190
var x0;
192191
var x1;
193-
var N;
194192
var v;
195193

196194
x0 = new Float64Array([
@@ -212,4 +210,3 @@ tape( 'the function supports view offsets', function test( t ) {
212210

213211
t.end();
214212
});
215-

0 commit comments

Comments
 (0)