diff --git a/lib/node_modules/@stdlib/blas/ext/base/drev/README.md b/lib/node_modules/@stdlib/blas/ext/base/drev/README.md index cd96b556c81..886c15a9869 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/drev/README.md +++ b/lib/node_modules/@stdlib/blas/ext/base/drev/README.md @@ -49,16 +49,14 @@ The function has the following parameters: - **x**: input [`Float64Array`][@stdlib/array/float64]. - **stride**: index increment. -The `N` and `stride` parameters determine which elements in `x` are accessed at runtime. For example, to reverse every other element +The `N` and stride parameters determine which elements in the strided array are accessed at runtime. For example, to reverse every other element ```javascript var Float64Array = require( '@stdlib/array/float64' ); -var floor = require( '@stdlib/math/base/special/floor' ); var x = new Float64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] ); -var N = floor( x.length / 2 ); -drev( N, x, 2 ); +drev( 4, x, 2 ); // x => [ -1.0, 1.0, 4.0, -5.0, 3.0, 0.0, -2.0, -3.0 ] ``` @@ -66,17 +64,15 @@ Note that indexing is relative to the first index. To introduce an offset, use [ ```javascript var Float64Array = require( '@stdlib/array/float64' ); -var floor = require( '@stdlib/math/base/special/floor' ); // Initial array... var x0 = new Float64Array( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] ); // Create an offset view... var x1 = new Float64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element -var N = floor( x0.length/2 ); // Reverse every other element... -drev( N, x1, 2 ); +drev( 3, x1, 2 ); // x0 => [ 1.0, -6.0, 3.0, -4.0, 5.0, -2.0 ] ``` @@ -97,7 +93,7 @@ The function has the following additional parameters: - **offset**: starting index. -While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying `buffer`, the `offset` parameter supports indexing semantics based on a starting index. For example, to access only the last three elements of `x` +While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying `buffer`, the `offset` parameter supports indexing semantics based on a starting index. For example, to access only the last three elements of the strided array ```javascript var Float64Array = require( '@stdlib/array/float64' ); @@ -116,7 +112,7 @@ drev.ndarray( 3, x, 1, x.length-3 ); ## Notes -- If `N <= 0`, both functions return `x` unchanged. +- If `N <= 0`, both functions return the strided array unchanged. - Where possible, one should "reverse" a strided array by negating its stride, which is an `O(1)` operation, in contrast to performing an in-place reversal, which is `O(N)`. However, in certain circumstances, this is not tenable, particularly when interfacing with libraries which assume and/or expect a specific memory layout (e.g., strided array elements arranged in memory in ascending order). In general, when working with strided arrays, only perform an in-place reversal when strictly necessary. @@ -130,31 +126,15 @@ drev.ndarray( 3, x, 1, x.length-3 ); ```javascript -var round = require( '@stdlib/math/base/special/round' ); -var randu = require( '@stdlib/random/base/randu' ); -var Float64Array = require( '@stdlib/array/float64' ); +var discreteUniform = require( '@stdlib/random/base/discrete-uniform' ).factory; +var filledarrayBy = require( '@stdlib/array/filled-by' ); var drev = require( '@stdlib/blas/ext/base/drev' ); -var rand; -var sign; -var x; -var i; - -x = new Float64Array( 10 ); -for ( i = 0; i < x.length; i++ ) { - rand = round( randu()*100.0 ); - sign = randu(); - if ( sign < 0.5 ) { - sign = -1.0; - } else { - sign = 1.0; - } - x[ i ] = sign * rand; -} +var x = filledarrayBy( 10, 'float64', discreteUniform( -100, 100 ) ); console.log( x ); -drev( x.length, x, 1 ); -console.log( x ); +var y = drev( x.length, x, 1 ); +console.log( y ); ``` diff --git a/lib/node_modules/@stdlib/blas/ext/base/drev/benchmark/benchmark.js b/lib/node_modules/@stdlib/blas/ext/base/drev/benchmark/benchmark.js index ef6d4c5a25f..0c4825eade6 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/drev/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/blas/ext/base/drev/benchmark/benchmark.js @@ -21,14 +21,19 @@ // MODULES // var bench = require( '@stdlib/bench' ); -var randu = require( '@stdlib/random/base/randu' ); +var uniform = require( '@stdlib/random/base/uniform' ).factory; +var filledarrayBy = require( '@stdlib/array/filled-by' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var pow = require( '@stdlib/math/base/special/pow' ); -var Float64Array = require( '@stdlib/array/float64' ); var pkg = require( './../package.json' ).name; var drev = require( './../lib/drev.js' ); +// VARIABLES // + +var rand = uniform( -100.0, 100.0 ); + + // FUNCTIONS // /** @@ -39,13 +44,7 @@ var drev = require( './../lib/drev.js' ); * @returns {Function} benchmark function */ function createBenchmark( len ) { - var x; - var i; - - x = new Float64Array( len ); - for ( i = 0; i < len; i++ ) { - x[ i ] = ( randu()*20.0 ) - 10.0; - } + var x = filledarrayBy( len, 'float64', rand ); return benchmark; function benchmark( b ) { diff --git a/lib/node_modules/@stdlib/blas/ext/base/drev/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/blas/ext/base/drev/benchmark/benchmark.native.js index c4f94980dac..f09ed6d97aa 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/drev/benchmark/benchmark.native.js +++ b/lib/node_modules/@stdlib/blas/ext/base/drev/benchmark/benchmark.native.js @@ -22,10 +22,10 @@ var resolve = require( 'path' ).resolve; var bench = require( '@stdlib/bench' ); -var randu = require( '@stdlib/random/base/randu' ); +var uniform = require( '@stdlib/random/base/uniform' ).factory; +var filledarrayBy = require( '@stdlib/array/filled-by' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var pow = require( '@stdlib/math/base/special/pow' ); -var Float64Array = require( '@stdlib/array/float64' ); var tryRequire = require( '@stdlib/utils/try-require' ); var pkg = require( './../package.json' ).name; @@ -36,6 +36,7 @@ var drev = tryRequire( resolve( __dirname, './../lib/drev.native.js' ) ); var opts = { 'skip': ( drev instanceof Error ) }; +var rand = uniform( -100.0, 100.0 ); // FUNCTIONS // @@ -48,13 +49,7 @@ var opts = { * @returns {Function} benchmark function */ function createBenchmark( len ) { - var x; - var i; - - x = new Float64Array( len ); - for ( i = 0; i < len; i++ ) { - x[ i ] = ( randu()*20.0 ) - 10.0; - } + var x = filledarrayBy( len, 'float64', rand ); return benchmark; function benchmark( b ) { diff --git a/lib/node_modules/@stdlib/blas/ext/base/drev/benchmark/benchmark.ndarray.js b/lib/node_modules/@stdlib/blas/ext/base/drev/benchmark/benchmark.ndarray.js index bf79f3c4820..43570ef265f 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/drev/benchmark/benchmark.ndarray.js +++ b/lib/node_modules/@stdlib/blas/ext/base/drev/benchmark/benchmark.ndarray.js @@ -21,14 +21,19 @@ // MODULES // var bench = require( '@stdlib/bench' ); -var randu = require( '@stdlib/random/base/randu' ); +var uniform = require( '@stdlib/random/base/uniform' ).factory; +var filledarrayBy = require( '@stdlib/array/filled-by' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var pow = require( '@stdlib/math/base/special/pow' ); -var Float64Array = require( '@stdlib/array/float64' ); var pkg = require( './../package.json' ).name; var drev = require( './../lib/ndarray.js' ); +// VARIABLES // + +var rand = uniform( -100.0, 100.0 ); + + // FUNCTIONS // /** @@ -39,13 +44,7 @@ var drev = require( './../lib/ndarray.js' ); * @returns {Function} benchmark function */ function createBenchmark( len ) { - var x; - var i; - - x = new Float64Array( len ); - for ( i = 0; i < len; i++ ) { - x[ i ] = ( randu()*20.0 ) - 10.0; - } + var x = filledarrayBy( len, 'float64', rand ); return benchmark; function benchmark( b ) { diff --git a/lib/node_modules/@stdlib/blas/ext/base/drev/benchmark/benchmark.ndarray.native.js b/lib/node_modules/@stdlib/blas/ext/base/drev/benchmark/benchmark.ndarray.native.js index 390183940e3..2d63175c133 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/drev/benchmark/benchmark.ndarray.native.js +++ b/lib/node_modules/@stdlib/blas/ext/base/drev/benchmark/benchmark.ndarray.native.js @@ -22,10 +22,10 @@ var resolve = require( 'path' ).resolve; var bench = require( '@stdlib/bench' ); -var randu = require( '@stdlib/random/base/randu' ); +var uniform = require( '@stdlib/random/base/uniform' ).factory; +var filledarrayBy = require( '@stdlib/array/filled-by' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var pow = require( '@stdlib/math/base/special/pow' ); -var Float64Array = require( '@stdlib/array/float64' ); var tryRequire = require( '@stdlib/utils/try-require' ); var pkg = require( './../package.json' ).name; @@ -36,6 +36,7 @@ var drev = tryRequire( resolve( __dirname, './../lib/ndarray.native.js' ) ); var opts = { 'skip': ( drev instanceof Error ) }; +var rand = uniform( -100.0, 100.0 ); // FUNCTIONS // @@ -48,13 +49,7 @@ var opts = { * @returns {Function} benchmark function */ function createBenchmark( len ) { - var x; - var i; - - x = new Float64Array( len ); - for ( i = 0; i < len; i++ ) { - x[ i ] = ( randu()*20.0 ) - 10.0; - } + var x = filledarrayBy( len, 'float64', rand ); return benchmark; function benchmark( b ) { diff --git a/lib/node_modules/@stdlib/blas/ext/base/drev/docs/repl.txt b/lib/node_modules/@stdlib/blas/ext/base/drev/docs/repl.txt index d2dd4b869b4..59a8a3b893b 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/drev/docs/repl.txt +++ b/lib/node_modules/@stdlib/blas/ext/base/drev/docs/repl.txt @@ -2,8 +2,8 @@ {{alias}}( N, x, stride ) Reverses a double-precision floating-point strided array in-place. - The `N` and `stride` parameters determine which elements in `x` are accessed - at runtime. + The `N` and stride parameters determine which elements in the strided array + are accessed at runtime. Indexing is relative to the first index. To introduce an offset, use typed array views. @@ -24,7 +24,7 @@ Returns ------- x: Float64Array - Input array `x`. + Input array. Examples -------- @@ -33,21 +33,20 @@ > {{alias}}( x.length, x, 1 ) [ -3.0, -1.0, 4.0, -5.0, 3.0, 1.0, -2.0 ] - // Using `N` and `stride` parameters: + // Using `N` and stride parameters: > x = new {{alias:@stdlib/array/float64}}( [ -2.0, 1.0, 3.0, -5.0, 4.0, -1.0, -3.0 ] ); - > var N = {{alias:@stdlib/math/base/special/floor}}( x.length / 2 ); - > {{alias}}( N, x, 2 ) + > {{alias}}( 3, x, 2 ) [ 4.0, 1.0, 3.0, -5.0, -2.0, -1.0, -3.0 ] // Using view offsets: > var x0 = new {{alias:@stdlib/array/float64}}( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] ); > var x1 = new {{alias:@stdlib/array/float64}}( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); - > N = {{alias:@stdlib/math/base/special/floor}}( x0.length / 2 ); - > {{alias}}( N, x1, 2 ) + > {{alias}}( 3, x1, 2 ) [ -6.0, 3.0, -4.0, 5.0, -2.0 ] > x0 [ 1.0, -6.0, 3.0, -4.0, 5.0, -2.0 ] + {{alias}}.ndarray( N, x, stride, offset ) Reverses a double-precision floating-point strided array in-place using alternative indexing semantics. @@ -73,7 +72,7 @@ Returns ------- x: Float64Array - Input array `x`. + Input array. Examples -------- @@ -84,10 +83,8 @@ // Using an index offset: > x = new {{alias:@stdlib/array/float64}}( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] ); - > var N = {{alias:@stdlib/math/base/special/floor}}( x.length / 2 ); - > {{alias}}.ndarray( N, x, 2, 1 ) + > {{alias}}.ndarray( 3, x, 2, 1 ) [ 1.0, -6.0, 3.0, -4.0, 5.0, -2.0 ] See Also -------- - diff --git a/lib/node_modules/@stdlib/blas/ext/base/drev/examples/c/example.c b/lib/node_modules/@stdlib/blas/ext/base/drev/examples/c/example.c index 0f2392129f0..f4981ac1949 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/drev/examples/c/example.c +++ b/lib/node_modules/@stdlib/blas/ext/base/drev/examples/c/example.c @@ -27,10 +27,10 @@ int main( void ) { int N = 8; // Specify a stride: - int strideX = 1; + int stride = 1; // Reverse the array: - c_drev( N, x, strideX ); + c_drev( N, x, stride ); // Print the result: for ( int i = 0; i < 8; i++ ) { diff --git a/lib/node_modules/@stdlib/blas/ext/base/drev/examples/index.js b/lib/node_modules/@stdlib/blas/ext/base/drev/examples/index.js index 36b7a5a10a7..d89b15a7703 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/drev/examples/index.js +++ b/lib/node_modules/@stdlib/blas/ext/base/drev/examples/index.js @@ -18,28 +18,12 @@ 'use strict'; -var round = require( '@stdlib/math/base/special/round' ); -var randu = require( '@stdlib/random/base/randu' ); -var Float64Array = require( '@stdlib/array/float64' ); +var discreteUniform = require( '@stdlib/random/base/discrete-uniform' ).factory; +var filledarrayBy = require( '@stdlib/array/filled-by' ); var drev = require( './../lib' ); -var rand; -var sign; -var x; -var i; - -x = new Float64Array( 10 ); -for ( i = 0; i < x.length; i++ ) { - rand = round( randu()*100.0 ); - sign = randu(); - if ( sign < 0.5 ) { - sign = -1.0; - } else { - sign = 1.0; - } - x[ i ] = sign * rand; -} +var x = filledarrayBy( 10, 'float64', discreteUniform( -100, 100 ) ); console.log( x ); -drev( x.length, x, 1 ); -console.log( x ); +var y = drev( x.length, x, 1 ); +console.log( y ); diff --git a/lib/node_modules/@stdlib/blas/ext/base/drev/include.gypi b/lib/node_modules/@stdlib/blas/ext/base/drev/include.gypi index 868c5c12e85..26476a8c265 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/drev/include.gypi +++ b/lib/node_modules/@stdlib/blas/ext/base/drev/include.gypi @@ -36,7 +36,7 @@ # Source files: 'src_files': [ - '<(src_dir)/addon.cpp', + '<(src_dir)/addon.c', ' +#include + +/** +* Receives JavaScript callback invocation data. +* +* @private +* @param env environment under which the function is invoked +* @param info callback data +* @return Node-API value +*/ +static napi_value addon( napi_env env, napi_callback_info info ) { + STDLIB_NAPI_ARGV( env, info, argv, argc, 3 ); + STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 ); + STDLIB_NAPI_ARGV_INT64( env, stride, argv, 2 ); + STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, stride, argv, 1 ); + + napi_value v; + napi_status status = napi_create_double( env, c_drev( N, (double *)X, stride ), &v ); + assert( status == napi_ok ); + + return v; +} + +STDLIB_NAPI_MODULE_EXPORT_FCN( addon ) diff --git a/lib/node_modules/@stdlib/blas/ext/base/drev/src/addon.cpp b/lib/node_modules/@stdlib/blas/ext/base/drev/src/addon.cpp deleted file mode 100644 index 14b65e97991..00000000000 --- a/lib/node_modules/@stdlib/blas/ext/base/drev/src/addon.cpp +++ /dev/null @@ -1,115 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2020 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -#include "stdlib/blas/ext/base/drev.h" -#include -#include -#include -#include -#include - -/** -* Add-on namespace. -*/ -namespace stdlib_blas_ext_base_drev { - - /** - * Reverses a double-precision floating-point strided array in-place. - * - * ## Notes - * - * - When called from JavaScript, the function expects three arguments: - * - * - `N`: number of indexed elements - * - `X`: input array - * - `strideX`: `X` stride length - */ - napi_value node_drev( napi_env env, napi_callback_info info ) { - napi_status status; - - size_t argc = 3; - napi_value argv[ 3 ]; - status = napi_get_cb_info( env, info, &argc, argv, nullptr, nullptr ); - assert( status == napi_ok ); - - if ( argc < 3 ) { - napi_throw_error( env, nullptr, "invalid invocation. Must provide 3 arguments." ); - return nullptr; - } - - napi_valuetype vtype0; - status = napi_typeof( env, argv[ 0 ], &vtype0 ); - assert( status == napi_ok ); - if ( vtype0 != napi_number ) { - napi_throw_type_error( env, nullptr, "invalid argument. First argument must be a number." ); - return nullptr; - } - - bool res1; - status = napi_is_typedarray( env, argv[ 1 ], &res1 ); - assert( status == napi_ok ); - if ( res1 == false ) { - napi_throw_type_error( env, nullptr, "invalid argument. Second argument must be a Float64Array." ); - return nullptr; - } - - napi_valuetype vtype2; - status = napi_typeof( env, argv[ 2 ], &vtype2 ); - assert( status == napi_ok ); - if ( vtype2 != napi_number ) { - napi_throw_type_error( env, nullptr, "invalid argument. Third argument must be a number." ); - return nullptr; - } - - int64_t N; - status = napi_get_value_int64( env, argv[ 0 ], &N ); - assert( status == napi_ok ); - - int64_t strideX; - status = napi_get_value_int64( env, argv[ 2 ], &strideX ); - assert( status == napi_ok ); - - napi_typedarray_type vtype1; - size_t xlen; - void *X; - status = napi_get_typedarray_info( env, argv[ 1 ], &vtype1, &xlen, &X, nullptr, nullptr ); - assert( status == napi_ok ); - if ( vtype1 != napi_float64_array ) { - napi_throw_type_error( env, nullptr, "invalid argument. Second argument must be a Float64Array." ); - return nullptr; - } - if ( (N-1)*llabs(strideX) >= (int64_t)xlen ) { - napi_throw_range_error( env, nullptr, "invalid argument. Second argument has insufficient elements based on the associated stride and the number of indexed elements." ); - return nullptr; - } - - c_drev( N, (double *)X, strideX ); - - return nullptr; - } - - napi_value Init( napi_env env, napi_value exports ) { - napi_status status; - napi_value fcn; - status = napi_create_function( env, "exports", NAPI_AUTO_LENGTH, node_drev, NULL, &fcn ); - assert( status == napi_ok ); - return fcn; - } - - NAPI_MODULE( NODE_GYP_MODULE_NAME, Init ) -} // end namespace stdlib_blas_ext_base_drev diff --git a/lib/node_modules/@stdlib/blas/ext/base/drev/test/test.drev.js b/lib/node_modules/@stdlib/blas/ext/base/drev/test/test.drev.js index a2a1dba3809..430aebd82bd 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/drev/test/test.drev.js +++ b/lib/node_modules/@stdlib/blas/ext/base/drev/test/test.drev.js @@ -34,7 +34,7 @@ tape( 'main export is a function', function test( t ) { }); tape( 'the function has an arity of 3', function test( t ) { - t.strictEqual( drev.length, 3, 'has expected arity' ); + t.strictEqual( drev.length, 3, 'returns expected value' ); t.end(); }); @@ -92,7 +92,7 @@ tape( 'the function returns a reference to the input array', function test( t ) t.end(); }); -tape( 'if provided an `N` parameter less than or equal to `0`, the function returns `x` unchanged', function test( t ) { +tape( 'if provided an `N` parameter less than or equal to `0`, the function returns the input array unchanged', function test( t ) { var expected; var x; diff --git a/lib/node_modules/@stdlib/blas/ext/base/drev/test/test.drev.native.js b/lib/node_modules/@stdlib/blas/ext/base/drev/test/test.drev.native.js index 922d7b9c4e8..a9aa8127a2d 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/drev/test/test.drev.native.js +++ b/lib/node_modules/@stdlib/blas/ext/base/drev/test/test.drev.native.js @@ -43,7 +43,7 @@ tape( 'main export is a function', opts, function test( t ) { }); tape( 'the function has an arity of 3', opts, function test( t ) { - t.strictEqual( drev.length, 3, 'has expected arity' ); + t.strictEqual( drev.length, 3, 'returns expected value' ); t.end(); }); @@ -101,7 +101,7 @@ tape( 'the function returns a reference to the input array', opts, function test t.end(); }); -tape( 'if provided an `N` parameter less than or equal to `0`, the function returns `x` unchanged', opts, function test( t ) { +tape( 'if provided an `N` parameter less than or equal to `0`, the function returns the input array unchanged', opts, function test( t ) { var expected; var x; diff --git a/lib/node_modules/@stdlib/blas/ext/base/drev/test/test.js b/lib/node_modules/@stdlib/blas/ext/base/drev/test/test.js index 2e874f0d606..0cac7202ec2 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/drev/test/test.js +++ b/lib/node_modules/@stdlib/blas/ext/base/drev/test/test.js @@ -51,7 +51,7 @@ tape( 'if a native implementation is available, the main export is the native im '@stdlib/utils/try-require': tryRequire }); - t.strictEqual( drev, mock, 'returns native implementation' ); + t.strictEqual( drev, mock, 'returns expected value' ); t.end(); function tryRequire() { @@ -73,7 +73,7 @@ tape( 'if a native implementation is not available, the main export is a JavaScr '@stdlib/utils/try-require': tryRequire }); - t.strictEqual( drev, main, 'returns JavaScript implementation' ); + t.strictEqual( drev, main, 'returns expected value' ); t.end(); function tryRequire() { diff --git a/lib/node_modules/@stdlib/blas/ext/base/drev/test/test.ndarray.js b/lib/node_modules/@stdlib/blas/ext/base/drev/test/test.ndarray.js index 50ad9f9d208..9b7300bb8c6 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/drev/test/test.ndarray.js +++ b/lib/node_modules/@stdlib/blas/ext/base/drev/test/test.ndarray.js @@ -34,7 +34,7 @@ tape( 'main export is a function', function test( t ) { }); tape( 'the function has an arity of 4', function test( t ) { - t.strictEqual( drev.length, 4, 'has expected arity' ); + t.strictEqual( drev.length, 4, 'returns expected value' ); t.end(); }); @@ -92,7 +92,7 @@ tape( 'the function returns a reference to the input array', function test( t ) t.end(); }); -tape( 'if provided an `N` parameter less than or equal to `0`, the function returns `x` unchanged', function test( t ) { +tape( 'if provided an `N` parameter less than or equal to `0`, the function returns the input array unchanged', function test( t ) { var expected; var x; diff --git a/lib/node_modules/@stdlib/blas/ext/base/drev/test/test.ndarray.native.js b/lib/node_modules/@stdlib/blas/ext/base/drev/test/test.ndarray.native.js index efe913a750f..bac1a2c1ac4 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/drev/test/test.ndarray.native.js +++ b/lib/node_modules/@stdlib/blas/ext/base/drev/test/test.ndarray.native.js @@ -43,7 +43,7 @@ tape( 'main export is a function', opts, function test( t ) { }); tape( 'the function has an arity of 4', opts, function test( t ) { - t.strictEqual( drev.length, 4, 'has expected arity' ); + t.strictEqual( drev.length, 4, 'returns expected value' ); t.end(); }); @@ -101,7 +101,7 @@ tape( 'the function returns a reference to the input array', opts, function test t.end(); }); -tape( 'if provided an `N` parameter less than or equal to `0`, the function returns `x` unchanged', opts, function test( t ) { +tape( 'if provided an `N` parameter less than or equal to `0`, the function returns the input array unchanged', opts, function test( t ) { var expected; var x;