diff --git a/lib/node_modules/@stdlib/assert/is-node-duplex-stream-like/test/test.js b/lib/node_modules/@stdlib/assert/is-node-duplex-stream-like/test/test.js index 068c17734908..166e976ceb8e 100644 --- a/lib/node_modules/@stdlib/assert/is-node-duplex-stream-like/test/test.js +++ b/lib/node_modules/@stdlib/assert/is-node-duplex-stream-like/test/test.js @@ -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; diff --git a/lib/node_modules/@stdlib/assert/is-node-readable-stream-like/test/test.js b/lib/node_modules/@stdlib/assert/is-node-readable-stream-like/test/test.js index abd48908bfff..948314279684 100644 --- a/lib/node_modules/@stdlib/assert/is-node-readable-stream-like/test/test.js +++ b/lib/node_modules/@stdlib/assert/is-node-readable-stream-like/test/test.js @@ -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; diff --git a/lib/node_modules/@stdlib/assert/is-node-stream-like/test/test.js b/lib/node_modules/@stdlib/assert/is-node-stream-like/test/test.js index c1b512366cb1..679a0af9c9cb 100644 --- a/lib/node_modules/@stdlib/assert/is-node-stream-like/test/test.js +++ b/lib/node_modules/@stdlib/assert/is-node-stream-like/test/test.js @@ -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; diff --git a/lib/node_modules/@stdlib/assert/is-node-transform-stream-like/test/test.js b/lib/node_modules/@stdlib/assert/is-node-transform-stream-like/test/test.js index 4be8d8f9120e..50753ef11001 100644 --- a/lib/node_modules/@stdlib/assert/is-node-transform-stream-like/test/test.js +++ b/lib/node_modules/@stdlib/assert/is-node-transform-stream-like/test/test.js @@ -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; diff --git a/lib/node_modules/@stdlib/assert/is-node-writable-stream-like/test/test.js b/lib/node_modules/@stdlib/assert/is-node-writable-stream-like/test/test.js index 4c53d4815c5b..cf2ea953191a 100644 --- a/lib/node_modules/@stdlib/assert/is-node-writable-stream-like/test/test.js +++ b/lib/node_modules/@stdlib/assert/is-node-writable-stream-like/test/test.js @@ -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; diff --git a/lib/node_modules/@stdlib/blas/ext/base/gnancount/test/test.main.js b/lib/node_modules/@stdlib/blas/ext/base/gnancount/test/test.main.js index fa5f5de60e30..a1867046bfd4 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/gnancount/test/test.main.js +++ b/lib/node_modules/@stdlib/blas/ext/base/gnancount/test/test.main.js @@ -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; @@ -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; diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dlast-index-equal/lib/main.js b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dlast-index-equal/lib/main.js index 7b76e680c5dc..e78c616ef2b4 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dlast-index-equal/lib/main.js +++ b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dlast-index-equal/lib/main.js @@ -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; @@ -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 } diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dlast-index-equal/test/test.js b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dlast-index-equal/test/test.js index d1a5261eb754..268b7ac0853a 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dlast-index-equal/test/test.js +++ b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dlast-index-equal/test/test.js @@ -345,7 +345,7 @@ tape( 'the function supports a negative starting search index', function test( t 'dtype': 'generic' }); actual = dlastIndexEqual( [ x, y, fromIndex ] ); - t.strictEqual( actual, 0, 'returns expected value' ); + t.strictEqual( actual, -1, 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dlast-index-of-truthy/lib/main.js b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dlast-index-of-truthy/lib/main.js index f5b6251c3d5f..9b4e1f203603 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dlast-index-of-truthy/lib/main.js +++ b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dlast-index-of-truthy/lib/main.js @@ -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-of-truthy' ).ndarray; @@ -66,9 +66,9 @@ function dlastIndexOfTruthy( arrays ) { 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 ) ); } diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dlast-index-of-truthy/test/test.js b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dlast-index-of-truthy/test/test.js index bf4417311fc8..f8e0a07ebc55 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dlast-index-of-truthy/test/test.js +++ b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dlast-index-of-truthy/test/test.js @@ -170,7 +170,7 @@ tape( 'the function supports a `fromIndex` parameter (negative)', function test( 'dtype': 'generic' }); actual = dlastIndexOfTruthy( [ x, fromIndex ] ); - t.strictEqual( actual, 0, 'returns expected value' ); + t.strictEqual( actual, -1, 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/iter/filter-map/test/test.js b/lib/node_modules/@stdlib/iter/filter-map/test/test.js index b6b952443142..6f881a589f6c 100644 --- a/lib/node_modules/@stdlib/iter/filter-map/test/test.js +++ b/lib/node_modules/@stdlib/iter/filter-map/test/test.js @@ -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; diff --git a/lib/node_modules/@stdlib/random/base/chi/test/test.factory.js b/lib/node_modules/@stdlib/random/base/chi/test/test.factory.js index 34ab375dfe89..fe651307298a 100644 --- a/lib/node_modules/@stdlib/random/base/chi/test/test.factory.js +++ b/lib/node_modules/@stdlib/random/base/chi/test/test.factory.js @@ -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; diff --git a/lib/node_modules/@stdlib/random/base/chisquare/test/test.factory.js b/lib/node_modules/@stdlib/random/base/chisquare/test/test.factory.js index 08e7ac60109f..780fb0ccd82a 100644 --- a/lib/node_modules/@stdlib/random/base/chisquare/test/test.factory.js +++ b/lib/node_modules/@stdlib/random/base/chisquare/test/test.factory.js @@ -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; diff --git a/lib/node_modules/@stdlib/stats/array/mskrange/test/test.js b/lib/node_modules/@stdlib/stats/array/mskrange/test/test.js index a4d448329fd9..b5dedd48b1ba 100644 --- a/lib/node_modules/@stdlib/stats/array/mskrange/test/test.js +++ b/lib/node_modules/@stdlib/stats/array/mskrange/test/test.js @@ -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(); diff --git a/lib/node_modules/@stdlib/stats/base/dists/gamma/quantile/test/test.quantile.js b/lib/node_modules/@stdlib/stats/base/dists/gamma/quantile/test/test.quantile.js index cf37ead92bd4..85f1642d5672 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/gamma/quantile/test/test.quantile.js +++ b/lib/node_modules/@stdlib/stats/base/dists/gamma/quantile/test/test.quantile.js @@ -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 ); @@ -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 ); diff --git a/lib/node_modules/@stdlib/stats/base/dists/weibull/logpdf/test/test.factory.js b/lib/node_modules/@stdlib/stats/base/dists/weibull/logpdf/test/test.factory.js index dd544ea93c7a..3a04bb3a42b8 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/weibull/logpdf/test/test.factory.js +++ b/lib/node_modules/@stdlib/stats/base/dists/weibull/logpdf/test/test.factory.js @@ -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; diff --git a/lib/node_modules/@stdlib/stats/base/dists/weibull/pdf/test/test.factory.js b/lib/node_modules/@stdlib/stats/base/dists/weibull/pdf/test/test.factory.js index b43f49a2f433..402e1172ab57 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/weibull/pdf/test/test.factory.js +++ b/lib/node_modules/@stdlib/stats/base/dists/weibull/pdf/test/test.factory.js @@ -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; diff --git a/lib/node_modules/@stdlib/stats/ranks/test/test.js b/lib/node_modules/@stdlib/stats/ranks/test/test.js index 4b71e382651f..aebf0e7bfbac 100644 --- a/lib/node_modules/@stdlib/stats/ranks/test/test.js +++ b/lib/node_modules/@stdlib/stats/ranks/test/test.js @@ -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;