Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ tape( 'the function returns `true` if provided a value which is Node duplex stre
t.end();
});

tape( 'the function returns `false` if not provided a value which is Node duplex stream-like', function test( t ) {
tape( 'the function returns `false` if not provided a value which is Node duplex stream-like', function test( t ) {
var values;
var i;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ tape( 'the function returns `true` if provided a value which is Node readable st
t.end();
});

tape( 'the function returns `false` if not provided a value which is Node readable stream-like', function test( t ) {
tape( 'the function returns `false` if not provided a value which is Node readable stream-like', function test( t ) {
var values;
var i;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ tape( 'the function returns `true` if provided a value which is Node stream-like
t.end();
});

tape( 'the function returns `false` if not provided a value which is Node stream-like', function test( t ) {
tape( 'the function returns `false` if not provided a value which is Node stream-like', function test( t ) {
var values;
var i;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ tape( 'the function returns `true` if provided a value which is Node transform s
t.end();
});

tape( 'the function returns `false` if not provided a value which is Node transform stream-like', function test( t ) {
tape( 'the function returns `false` if not provided a value which is Node transform stream-like', function test( t ) {
var values;
var i;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ tape( 'the function returns `true` if provided a value which is Node writable st
t.end();
});

tape( 'the function returns `false` if not provided a value which is Node writable stream-like', function test( t ) {
tape( 'the function returns `false` if not provided a value which is Node writable stream-like', function test( t ) {
var values;
var i;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ tape( 'the function has an arity of 3', function test( t ) {
t.end();
});

tape( 'the function counts the number of non-`NaN` elements in a strided array', function test( t ) {
tape( 'the function counts the number of non-`NaN` elements in a strided array', function test( t ) {
var x;
var v;

Expand All @@ -62,7 +62,7 @@ tape( 'the function counts the number of non-`NaN` elements in a strided array'
t.end();
});

tape( 'the function counts the number of non-`NaN` elements in a strided array (accessors)', function test( t ) {
tape( 'the function counts the number of non-`NaN` elements in a strided array (accessors)', function test( t ) {
var x;
var v;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var numelDimension = require( '@stdlib/ndarray/base/numel-dimension' );
var getStride = require( '@stdlib/ndarray/base/stride' );
var getOffset = require( '@stdlib/ndarray/base/offset' );
var getData = require( '@stdlib/ndarray/base/data-buffer' );
var clipIndex = require( '@stdlib/ndarray/base/clip-index' );
var clipUpperIndex = require( '@stdlib/ndarray/base/clip-upper-index' );
var strided = require( '@stdlib/blas/ext/base/dlast-index-equal' ).ndarray;


Expand Down Expand Up @@ -72,9 +72,9 @@ function dlastIndexEqual( arrays ) {
fromIndex = ndarraylike2scalar( arrays[ 2 ] );

N = numelDimension( x, 0 );
fromIndex = clipIndex( fromIndex, N );
if ( fromIndex >= N ) {
fromIndex = N - 1;
fromIndex = clipUpperIndex( fromIndex, ( fromIndex < 0 ) ? N : N-1 );
if ( fromIndex < 0 ) {
return -1;
}
return strided( fromIndex+1, getData( x ), getStride( x, 0 ), getOffset( x ), getData( y ), getStride( y, 0 ), getOffset( y ) ); // eslint-disable-line max-len
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
});

x = vector( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ), 6, 1, 0 );
y = vector( new Float64Array( [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ), 6, 1, 0 );

Check warning on line 112 in lib/node_modules/@stdlib/blas/ext/base/ndarray/dlast-index-equal/test/test.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

This line has a length of 83. Maximum allowed is 80

actual = dlastIndexEqual( [ x, y, fromIndex ] );
t.strictEqual( actual, -1, 'returns expected value' );
Expand Down Expand Up @@ -148,7 +148,7 @@
8.0
]);

actual = dlastIndexEqual( [ vector( x, 4, 2, 0 ), vector( y, 4, 2, 0 ), fromIndex ] );

Check warning on line 151 in lib/node_modules/@stdlib/blas/ext/base/ndarray/dlast-index-equal/test/test.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

This line has a length of 90. Maximum allowed is 80

t.strictEqual( actual, 3, 'returns expected value' );
t.end();
Expand Down Expand Up @@ -185,7 +185,7 @@
8.0
]);

actual = dlastIndexEqual( [ vector( x, 4, -2, 6 ), vector( y, 4, -2, 6 ), fromIndex ] );

Check warning on line 188 in lib/node_modules/@stdlib/blas/ext/base/ndarray/dlast-index-equal/test/test.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

This line has a length of 92. Maximum allowed is 80

t.strictEqual( actual, 2, 'returns expected value' );
t.end();
Expand Down Expand Up @@ -222,7 +222,7 @@
4.0 // 3
]);

actual = dlastIndexEqual( [ vector( x, 4, 2, 1 ), vector( y, 4, 2, 1 ), fromIndex ] );

Check warning on line 225 in lib/node_modules/@stdlib/blas/ext/base/ndarray/dlast-index-equal/test/test.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

This line has a length of 90. Maximum allowed is 80
t.strictEqual( actual, 3, 'returns expected value' );

t.end();
Expand Down Expand Up @@ -345,7 +345,7 @@
'dtype': 'generic'
});
actual = dlastIndexEqual( [ x, y, fromIndex ] );
t.strictEqual( actual, 0, 'returns expected value' );
t.strictEqual( actual, -1, 'returns expected value' );

t.end();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
var getStride = require( '@stdlib/ndarray/base/stride' );
var getOffset = require( '@stdlib/ndarray/base/offset' );
var getData = require( '@stdlib/ndarray/base/data-buffer' );
var clipIndex = require( '@stdlib/ndarray/base/clip-index' );
var clipUpperIndex = require( '@stdlib/ndarray/base/clip-upper-index' );
var strided = require( '@stdlib/blas/ext/base/dlast-index-of-truthy' ).ndarray;


Expand Down Expand Up @@ -66,11 +66,11 @@
fromIndex = ndarraylike2scalar( arrays[ 1 ] );

N = numelDimension( x, 0 );
fromIndex = clipIndex( fromIndex, N );
if ( fromIndex >= N ) {
fromIndex = N - 1;
fromIndex = clipUpperIndex( fromIndex, ( fromIndex < 0 ) ? N : N-1 );
if ( fromIndex < 0 ) {
return -1;
}
return strided( fromIndex+1, getData( x ), getStride( x, 0 ), getOffset( x ) );

Check warning on line 73 in lib/node_modules/@stdlib/blas/ext/base/ndarray/dlast-index-of-truthy/lib/main.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

This line has a length of 83. Maximum allowed is 80
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
t.strictEqual( actual, 2, 'returns expected value' );

// Negative stride...
x = vector( new Float64Array( [ 0.0, 0.0, 1.0, 0.0, 1.0, 0.0 ] ), 6, -1, 5 );

Check warning on line 85 in lib/node_modules/@stdlib/blas/ext/base/ndarray/dlast-index-of-truthy/test/test.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

This line has a length of 81. Maximum allowed is 80
fromIndex = scalar2ndarray( 5, {
'dtype': 'generic'
});
Expand Down Expand Up @@ -170,7 +170,7 @@
'dtype': 'generic'
});
actual = dlastIndexOfTruthy( [ x, fromIndex ] );
t.strictEqual( actual, 0, 'returns expected value' );
t.strictEqual( actual, -1, 'returns expected value' );

t.end();
});
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/iter/filter-map/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ tape( 'the function returns an iterator protocol-compliant object which filters
}
});

tape( 'the function returns an iterator protocol-compliant object which filters and maps iterated values according to a callback function (none succeed)', function test( t ) {
tape( 'the function returns an iterator protocol-compliant object which filters and maps iterated values according to a callback function (none succeed)', function test( t ) {
var expected;
var actual;
var values;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ tape( 'the function throws an error if degrees of freedom `k` is not a positive
}
});

tape( 'the function throws an error if provided an options argument which is not an object (no other arguments)', function test( t ) {
tape( 'the function throws an error if provided an options argument which is not an object (no other arguments)', function test( t ) {
var values;
var i;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ tape( 'the function throws an error if degrees of freedom `k` is not a positive
}
});

tape( 'the function throws an error if provided an options argument which is not an object (no other arguments)', function test( t ) {
tape( 'the function throws an error if provided an options argument which is not an object (no other arguments)', function test( t ) {
var values;
var i;

Expand Down
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/stats/array/mskrange/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,13 +314,13 @@ tape( 'if provided an empty array, the function returns `NaN` (accessors)', func
t.end();
});

tape( 'if provided an array containing a single element, the function returns `0`', function test( t ) {
tape( 'if provided an array containing a single element, the function returns `0`', function test( t ) {
var v = mskrange( [ 1.0 ], [ 0 ] );
t.strictEqual( v, 0.0, 'returns expected value' );
t.end();
});

tape( 'if provided an array containing a single element, the function returns `0` (accessors)', function test( t ) {
tape( 'if provided an array containing a single element, the function returns `0` (accessors)', function test( t ) {
var v = mskrange( toAccessorArray( [ 1.0 ] ), toAccessorArray( [ 0 ] ) );
t.strictEqual( v, 0.0, 'returns expected value' );
t.end();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ tape( 'if provided a negative `alpha`, the function returns `NaN`', function tes
t.end();
});

tape( 'if provided a nonpositive`beta`, the function returns `NaN`', function test( t ) {
tape( 'if provided a nonpositive `beta`, the function returns `NaN`', function test( t ) {
var y;

y = quantile( 2.0, 2.0, 0.0 );
Expand All @@ -112,7 +112,7 @@ tape( 'if provided a nonpositive`beta`, the function returns `NaN`', function te
t.end();
});

tape( 'if provided `alpha` equal to `0.0`, the function returns `0.0` for a valid `p`', function test( t ) {
tape( 'if provided `alpha` equal to `0.0`, the function returns `0.0` for a valid `p`', function test( t ) {
var y = quantile( 0.2, 0.0, 2.0 );
t.strictEqual( y, 0.0, 'returns expected value' );
y = quantile( 0.9, 0.0, 2.0 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ tape( 'if provided a positive `lambda` and `k` equal to one, the created functio
t.end();
});

tape( 'if provided a positive `lambda` and `k` not equal to one, the created function returns `-infinity` for `x=0`', function test( t ) {
tape( 'if provided a positive `lambda` and `k` not equal to one, the created function returns `-infinity` for `x=0`', function test( t ) {
var logpdf;
var y;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ tape( 'if provided a positive `lambda` and `k` equal to one, the created functio
t.end();
});

tape( 'if provided a positive `lambda` and `k` not equal to one, the created function returns `0` for `x=0`', function test( t ) {
tape( 'if provided a positive `lambda` and `k` not equal to one, the created function returns `0` for `x=0`', function test( t ) {
var pdf;
var y;

Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/stats/ranks/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ tape( 'the function calculates the ranks for an array with tied values (putting
t.end();
});

tape( 'the function calculates the ranks for an array with tied values (putting missing values last)', function test( t ) {
tape( 'the function calculates the ranks for an array with tied values (putting missing values last)', function test( t ) {
var expected;
var actual;
var data;
Expand Down
Loading