diff --git a/lib/node_modules/@stdlib/blas/base/dcopy/README.md b/lib/node_modules/@stdlib/blas/base/dcopy/README.md index 298041b1fa2f..dffb3430d691 100644 --- a/lib/node_modules/@stdlib/blas/base/dcopy/README.md +++ b/lib/node_modules/@stdlib/blas/base/dcopy/README.md @@ -2,7 +2,7 @@ @license Apache-2.0 -Copyright (c) 2018 The Stdlib Authors. +Copyright (c) 2023 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. @@ -52,18 +52,15 @@ The function has the following parameters: - **y**: destination [`Float64Array`][mdn-float64array]. - **strideY**: index increment for `y`. -The `N` and `stride` parameters determine how values from `x` are copied into `y`. For example, to copy in reverse order every other value in `x` into the first `N` elements of `y`, +The `N` and stride parameters determine how values from `x` are copied into `y`. For example, to copy in reverse order every other value in `x` into the first `N` elements of `y`, ```javascript var Float64Array = require( '@stdlib/array/float64' ); -var floor = require( '@stdlib/math/base/special/floor' ); var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); var y = new Float64Array( [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); -var N = floor( x.length / 2 ); - -dcopy( N, x, -2, y, 1 ); +dcopy( 3, x, -2, y, 1 ); // y => [ 5.0, 3.0, 1.0, 10.0, 11.0, 12.0 ] ``` @@ -73,7 +70,6 @@ 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 arrays... var x0 = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); @@ -83,10 +79,8 @@ var y0 = new Float64Array( [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); var x1 = new Float64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element var y1 = new Float64Array( y0.buffer, y0.BYTES_PER_ELEMENT*3 ); // start at 4th element -var N = floor( x0.length / 2 ); - // Copy in reverse order every other value from `x1` into `y1`... -dcopy( N, x1, -2, y1, 1 ); +dcopy( 3, x1, -2, y1, 1 ); // y0 => [ 7.0, 8.0, 9.0, 6.0, 4.0, 2.0 ] ``` @@ -109,18 +103,15 @@ The function has the following additional parameters: - **offsetX**: starting index for `x`. - **offsetY**: starting index for `y`. -While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying `buffer`, the `offsetX` and `offsetY` parameters support indexing semantics based on starting indices. For example, to copy every other value in `x` starting from the second value into the last `N` elements in `y` where `x[i] = y[n]`, `x[i+2] = y[n-1]`,..., +While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying `buffer`, the offset parameters support indexing semantics based on starting indices. For example, to copy every other value in `x` starting from the second value into the last `N` elements in `y` where `x[i] = y[n]`, `x[i+2] = y[n-1]`,..., ```javascript var Float64Array = require( '@stdlib/array/float64' ); -var floor = require( '@stdlib/math/base/special/floor' ); var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); var y = new Float64Array( [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); -var N = floor( x.length / 2 ); - -dcopy.ndarray( N, x, 2, 1, y, -1, y.length-1 ); +dcopy.ndarray( 3, x, 2, 1, y, -1, y.length-1 ); // y => [ 7.0, 8.0, 9.0, 6.0, 4.0, 2.0 ] ``` @@ -146,22 +137,14 @@ dcopy.ndarray( N, x, 2, 1, y, -1, y.length-1 ); ```javascript -var randu = require( '@stdlib/random/base/randu' ); -var round = require( '@stdlib/math/base/special/round' ); -var Float64Array = require( '@stdlib/array/float64' ); +var discreteUniform = require( '@stdlib/random/base/discrete-uniform' ).factory; +var filledarrayBy = require( '@stdlib/array/filled-by' ); var dcopy = require( '@stdlib/blas/base/dcopy' ); -var x; -var y; -var i; - -x = new Float64Array( 10 ); -y = new Float64Array( 10 ); -for ( i = 0; i < x.length; i++ ) { - x[ i ] = round( randu()*500.0 ); - y[ i ] = round( randu()*255.0 ); -} +var x = filledarrayBy( 10, 'float64', discreteUniform( 0, 500 ) ); console.log( x ); + +var y = filledarrayBy( x.length, 'float64', discreteUniform( 0, 255 ) ); console.log( y ); // Copy elements from `x` into `y` starting from the end of `y`: diff --git a/lib/node_modules/@stdlib/blas/base/dcopy/benchmark/benchmark.js b/lib/node_modules/@stdlib/blas/base/dcopy/benchmark/benchmark.js index 6d58a71ac62a..ab4868a9f4e8 100644 --- a/lib/node_modules/@stdlib/blas/base/dcopy/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/blas/base/dcopy/benchmark/benchmark.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -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 dcopy = require( './../lib/dcopy.js' ); +// VARIABLES // + +var rand = uniform( -10000.0, 10000.0 ); + + // FUNCTIONS // /** @@ -39,15 +44,8 @@ var dcopy = require( './../lib/dcopy.js' ); * @returns {Function} benchmark function */ function createBenchmark( len ) { - var x; - var y; - var i; - - x = new Float64Array( len ); - y = new Float64Array( len ); - for ( i = 0; i < x.length; i++ ) { - x[ i ] = ( randu()*20000.0 ) - 10000.0; - } + var x = filledarrayBy( len, 'float64', rand ); + var y = filledarrayBy( len, 'float64', rand ); return benchmark; /** diff --git a/lib/node_modules/@stdlib/blas/base/dcopy/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/blas/base/dcopy/benchmark/benchmark.native.js index 867241cb88e8..f47c977d1871 100644 --- a/lib/node_modules/@stdlib/blas/base/dcopy/benchmark/benchmark.native.js +++ b/lib/node_modules/@stdlib/blas/base/dcopy/benchmark/benchmark.native.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -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 dcopy = tryRequire( resolve( __dirname, './../lib/native.js' ) ); var opts = { 'skip': ( dcopy instanceof Error ) }; +var rand = uniform( -10000.0, 10000.0 ); // FUNCTIONS // @@ -48,15 +49,8 @@ var opts = { * @returns {Function} benchmark function */ function createBenchmark( len ) { - var x; - var y; - var i; - - x = new Float64Array( len ); - y = new Float64Array( len ); - for ( i = 0; i < x.length; i++ ) { - x[ i ] = ( randu()*20000.0 ) - 10000.0; - } + var x = filledarrayBy( len, 'float64', rand ); + var y = filledarrayBy( len, 'float64', rand ); return benchmark; /** diff --git a/lib/node_modules/@stdlib/blas/base/dcopy/benchmark/benchmark.ndarray.js b/lib/node_modules/@stdlib/blas/base/dcopy/benchmark/benchmark.ndarray.js index 9766c5bbadd3..b73b1b260201 100644 --- a/lib/node_modules/@stdlib/blas/base/dcopy/benchmark/benchmark.ndarray.js +++ b/lib/node_modules/@stdlib/blas/base/dcopy/benchmark/benchmark.ndarray.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -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 dcopy = require( './../lib/ndarray.js' ); +// VARIABLES // + +var rand = uniform( -10000.0, 10000.0 ); + + // FUNCTIONS // /** @@ -39,15 +44,8 @@ var dcopy = require( './../lib/ndarray.js' ); * @returns {Function} benchmark function */ function createBenchmark( len ) { - var x; - var y; - var i; - - x = new Float64Array( len ); - y = new Float64Array( len ); - for ( i = 0; i < x.length; i++ ) { - x[ i ] = ( randu()*20000.0 ) - 10000.0; - } + var x = filledarrayBy( len, 'float64', rand ); + var y = filledarrayBy( len, 'float64', rand ); return benchmark; /** diff --git a/lib/node_modules/@stdlib/blas/base/dcopy/benchmark/benchmark.ndarray.native.js b/lib/node_modules/@stdlib/blas/base/dcopy/benchmark/benchmark.ndarray.native.js index 8101bca551ef..421617e8cb01 100644 --- a/lib/node_modules/@stdlib/blas/base/dcopy/benchmark/benchmark.ndarray.native.js +++ b/lib/node_modules/@stdlib/blas/base/dcopy/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 dcopy = tryRequire( resolve( __dirname, './../lib/ndarray.native.js' ) ); var opts = { 'skip': ( dcopy instanceof Error ) }; +var rand = uniform( -10000.0, 10000.0 ); // FUNCTIONS // @@ -48,15 +49,8 @@ var opts = { * @returns {Function} benchmark function */ function createBenchmark( len ) { - var x; - var y; - var i; - - x = new Float64Array( len ); - y = new Float64Array( len ); - for ( i = 0; i < x.length; i++ ) { - x[ i ] = ( randu()*20000.0 ) - 10000.0; - } + var x = filledarrayBy( len, 'float64', rand ); + var y = filledarrayBy( len, 'float64', rand ); return benchmark; /** diff --git a/lib/node_modules/@stdlib/blas/base/dcopy/docs/repl.txt b/lib/node_modules/@stdlib/blas/base/dcopy/docs/repl.txt index 00cde7f33d4a..b72c8c43b00a 100644 --- a/lib/node_modules/@stdlib/blas/base/dcopy/docs/repl.txt +++ b/lib/node_modules/@stdlib/blas/base/dcopy/docs/repl.txt @@ -2,7 +2,7 @@ {{alias}}( N, x, strideX, y, strideY ) Copies values from `x` into `y`. - The `N` and `stride` parameters determine how values from `x` are copied + The `N` and stride parameters determine how values from `x` are copied into `y`. Indexing is relative to the first index. To introduce an offset, use typed @@ -13,7 +13,7 @@ Parameters ---------- N: integer - Number of values to copy. + Number of values. x: Float64Array Input array. @@ -22,7 +22,7 @@ Index increment for `x`. y: Float64Array - Destination array. + Output array. strideY: integer Index increment for `y`. @@ -30,7 +30,7 @@ Returns ------- y: Float64Array - Input array `y`. + Output array. Examples -------- @@ -43,8 +43,7 @@ // Advanced indexing: > x = new {{alias:@stdlib/array/float64}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); > y = new {{alias:@stdlib/array/float64}}( [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); - > var N = {{alias:@stdlib/math/base/special/floor}}( x.length / 2 ); - > {{alias}}( N, x, -2, y, 1 ) + > {{alias}}( 3, x, -2, y, 1 ) [ 5.0, 3.0, 1.0, 10.0, 11.0, 12.0 ] // Using typed array views: @@ -52,8 +51,7 @@ > var y0 = new {{alias:@stdlib/array/float64}}( [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); > var x1 = new {{alias:@stdlib/array/float64}}( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); > var y1 = new {{alias:@stdlib/array/float64}}( y0.buffer, y0.BYTES_PER_ELEMENT*3 ); - > N = {{alias:@stdlib/math/base/special/floor}}( x0.length / 2 ); - > {{alias}}( N, x1, -2, y1, 1 ) + > {{alias}}( 3, x1, -2, y1, 1 ) [ 6.0, 4.0, 2.0 ] > y0 [ 7.0, 8.0, 9.0, 6.0, 4.0, 2.0 ] @@ -63,13 +61,13 @@ Copies values from `x` into `y` using alternative indexing semantics. While typed array views mandate a view offset based on the underlying - buffer, the `offset` parameters support indexing semantics based on starting + buffer, the offset parameters support indexing semantics based on starting indices. Parameters ---------- N: integer - Number of values to copy. + Number of values. x: Float64Array Input array. @@ -81,7 +79,7 @@ Starting index for `x`. y: Float64Array - Destination array. + Output array. strideY: integer Index increment for `y`. @@ -92,7 +90,7 @@ Returns ------- y: Float64Array - Input array `y`. + Output array. Examples -------- @@ -105,8 +103,7 @@ // Advanced indexing: > x = new {{alias:@stdlib/array/float64}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); > y = new {{alias:@stdlib/array/float64}}( [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); - > var N = {{alias:@stdlib/math/base/special/floor}}( x.length / 2 ); - > {{alias}}.ndarray( N, x, 2, 1, y, -1, y.length-1 ) + > {{alias}}.ndarray( 3, x, 2, 1, y, -1, y.length-1 ) [ 7.0, 8.0, 9.0, 6.0, 4.0, 2.0 ] See Also diff --git a/lib/node_modules/@stdlib/blas/base/dcopy/docs/types/index.d.ts b/lib/node_modules/@stdlib/blas/base/dcopy/docs/types/index.d.ts index 7ec4ce2c70b7..f907815031bc 100644 --- a/lib/node_modules/@stdlib/blas/base/dcopy/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/blas/base/dcopy/docs/types/index.d.ts @@ -1,7 +1,7 @@ /* * @license Apache-2.0 * -* Copyright (c) 2020 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -25,12 +25,12 @@ interface Routine { /** * Copies values from `x` into `y`. * - * @param N - number of values to copy + * @param N - number of values * @param x - input array * @param strideX - `x` stride length - * @param y - destination array + * @param y - output array * @param strideY - `y` stride length - * @returns `y` + * @returns output array * * @example * var Float64Array = require( `@stdlib/array/float64` ); @@ -50,10 +50,10 @@ interface Routine { * @param x - input array * @param strideX - `x` stride length * @param offsetX - starting index for `x` - * @param y - destination array + * @param y - output array * @param strideY - `y` stride length * @param offsetY - starting index for `y` - * @returns `y` + * @returns output array * * @example * var Float64Array = require( `@stdlib/array/float64` ); @@ -73,9 +73,9 @@ interface Routine { * @param N - number of values to copy * @param x - input array * @param strideX - `x` stride length -* @param y - destination array +* @param y - output array * @param strideY - `y` stride length -* @returns `y` +* @returns output array * * @example * var Float64Array = require( `@stdlib/array/float64` ); diff --git a/lib/node_modules/@stdlib/blas/base/dcopy/examples/index.js b/lib/node_modules/@stdlib/blas/base/dcopy/examples/index.js index d303d7251e4d..bcd340fd1a60 100644 --- a/lib/node_modules/@stdlib/blas/base/dcopy/examples/index.js +++ b/lib/node_modules/@stdlib/blas/base/dcopy/examples/index.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -18,22 +18,14 @@ 'use strict'; -var randu = require( '@stdlib/random/base/randu' ); -var round = require( '@stdlib/math/base/special/round' ); -var Float64Array = require( '@stdlib/array/float64' ); +var discreteUniform = require( '@stdlib/random/base/discrete-uniform' ).factory; +var filledarrayBy = require( '@stdlib/array/filled-by' ); var dcopy = require( './../lib' ); -var x; -var y; -var i; - -x = new Float64Array( 10 ); -y = new Float64Array( 10 ); -for ( i = 0; i < x.length; i++ ) { - x[ i ] = round( randu()*500.0 ); - y[ i ] = round( randu()*255.0 ); -} +var x = filledarrayBy( 10, 'float64', discreteUniform( 0, 500 ) ); console.log( x ); + +var y = filledarrayBy( x.length, 'float64', discreteUniform( 0, 255 ) ); console.log( y ); // Copy elements from `x` into `y` starting from the end of `y`: diff --git a/lib/node_modules/@stdlib/blas/base/dcopy/include.gypi b/lib/node_modules/@stdlib/blas/base/dcopy/include.gypi index 22e6289c74db..f8b01bfb52cb 100644 --- a/lib/node_modules/@stdlib/blas/base/dcopy/include.gypi +++ b/lib/node_modules/@stdlib/blas/base/dcopy/include.gypi @@ -1,6 +1,6 @@ # @license Apache-2.0 # -# Copyright (c) 2018 The Stdlib Authors. +# Copyright (c) 2023 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. @@ -52,7 +52,7 @@ # Source files: 'src_files': [ - '<(src_dir)/addon.cpp', + '<(src_dir)/addon.c', ' + +/** +* 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, 5 ); + STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 ); + STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 2 ); + STDLIB_NAPI_ARGV_INT64( env, strideY, argv, 4 ); + STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, strideX, argv, 1 ); + STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, Y, N, strideY, argv, 3 ); + c_dcopy( N, (double *)X, strideX, (double *)Y, strideY ); + return NULL; +} + +STDLIB_NAPI_MODULE_EXPORT_FCN( addon ) diff --git a/lib/node_modules/@stdlib/blas/base/dcopy/src/addon.cpp b/lib/node_modules/@stdlib/blas/base/dcopy/src/addon.cpp deleted file mode 100644 index 2514d5194adb..000000000000 --- a/lib/node_modules/@stdlib/blas/base/dcopy/src/addon.cpp +++ /dev/null @@ -1,151 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 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/base/dcopy.h" -#include -#include -#include -#include -#include - -/** -* Add-on namespace. -*/ -namespace stdlib_blas_base_dcopy { - - /** - * Copies values from one double-precision floating-point vector to another double-precision floating-point vector. - * - * ## Notes - * - * - When called from JavaScript, the function expects five arguments: - * - * - `N`: number of indexed elements - * - `X`: input array - * - `strideX`: `X` stride length - * - `Y`: destination array - * - `strideY`: `Y` stride length - */ - napi_value node_dcopy( napi_env env, napi_callback_info info ) { - napi_status status; - - size_t argc = 5; - napi_value argv[ 5 ]; - status = napi_get_cb_info( env, info, &argc, argv, nullptr, nullptr ); - assert( status == napi_ok ); - - if ( argc < 5 ) { - napi_throw_error( env, nullptr, "invalid invocation. Must provide 5 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; - } - - bool res3; - status = napi_is_typedarray( env, argv[ 3 ], &res3 ); - assert( status == napi_ok ); - if ( res3 == false ) { - napi_throw_type_error( env, nullptr, "invalid argument. Fourth argument must be a Float64Array." ); - return nullptr; - } - - napi_valuetype vtype4; - status = napi_typeof( env, argv[ 4 ], &vtype4 ); - assert( status == napi_ok ); - if ( vtype4 != napi_number ) { - napi_throw_type_error( env, nullptr, "invalid argument. Fifth 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 ); - - int64_t strideY; - status = napi_get_value_int64( env, argv[ 4 ], &strideY ); - 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; - } - - napi_typedarray_type vtype3; - size_t ylen; - void *Y; - status = napi_get_typedarray_info( env, argv[ 3 ], &vtype3, &ylen, &Y, nullptr, nullptr ); - assert( status == napi_ok ); - if ( vtype3 != napi_float64_array ) { - napi_throw_type_error( env, nullptr, "invalid argument. Fourth argument must be a Float64Array." ); - return nullptr; - } - if ( (N-1)*llabs(strideY) >= (int64_t)ylen ) { - napi_throw_range_error( env, nullptr, "invalid argument. Fourth argument has insufficient elements based on the associated stride and the number of indexed elements." ); - return nullptr; - } - - c_dcopy( N, (double *)X, strideX, (double *)Y, strideY ); - - 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_dcopy, NULL, &fcn ); - assert( status == napi_ok ); - return fcn; - } - - NAPI_MODULE( NODE_GYP_MODULE_NAME, Init ) -} // end namespace stdlib_blas_base_dcopy diff --git a/lib/node_modules/@stdlib/blas/base/dcopy/src/dcopy.c b/lib/node_modules/@stdlib/blas/base/dcopy/src/dcopy.c index 2c6ecda5cbb9..57896605d074 100644 --- a/lib/node_modules/@stdlib/blas/base/dcopy/src/dcopy.c +++ b/lib/node_modules/@stdlib/blas/base/dcopy/src/dcopy.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -24,7 +24,7 @@ * @param N number of elements to copy * @param X input array * @param strideX X stride length -* @param Y destination array +* @param Y output array * @param strideY Y stride length */ void c_dcopy( const int N, const double *X, const int strideX, double *Y, const int strideY ) { diff --git a/lib/node_modules/@stdlib/blas/base/dcopy/src/dcopy_cblas.c b/lib/node_modules/@stdlib/blas/base/dcopy/src/dcopy_cblas.c index 8cbce51e11d1..72d78481d7e9 100644 --- a/lib/node_modules/@stdlib/blas/base/dcopy/src/dcopy_cblas.c +++ b/lib/node_modules/@stdlib/blas/base/dcopy/src/dcopy_cblas.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -22,10 +22,10 @@ /** * Copies values from `X` into `Y`. * -* @param N number of elements to copy +* @param N number of elements * @param X input array * @param strideX X stride length -* @param Y destination array +* @param Y output array * @param strideY Y stride length */ void c_dcopy( const int N, const double *X, const int strideX, double *Y, const int strideY ) { diff --git a/lib/node_modules/@stdlib/blas/base/dcopy/src/dcopy_f.c b/lib/node_modules/@stdlib/blas/base/dcopy/src/dcopy_f.c index 25a5064fe7be..5bef3066f002 100644 --- a/lib/node_modules/@stdlib/blas/base/dcopy/src/dcopy_f.c +++ b/lib/node_modules/@stdlib/blas/base/dcopy/src/dcopy_f.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -25,7 +25,7 @@ * @param N number of elements to copy * @param X input array * @param strideX X stride length -* @param Y destination array +* @param Y output array * @param strideY Y stride length */ void c_dcopy( const int N, const double *X, const int strideX, double *Y, const int strideY ) { diff --git a/lib/node_modules/@stdlib/blas/base/dcopy/test/test.dcopy.js b/lib/node_modules/@stdlib/blas/base/dcopy/test/test.dcopy.js index e3abe619b4fd..bb0681eae76b 100644 --- a/lib/node_modules/@stdlib/blas/base/dcopy/test/test.dcopy.js +++ b/lib/node_modules/@stdlib/blas/base/dcopy/test/test.dcopy.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -21,7 +21,6 @@ // MODULES // var tape = require( 'tape' ); -var floor = require( '@stdlib/math/base/special/floor' ); var Float64Array = require( '@stdlib/array/float64' ); var dcopy = require( './../lib/dcopy.js' ); @@ -45,7 +44,7 @@ tape( 'the function copies elements from `x` into `y`', function test( t ) { dcopy( x.length, x, 1, y, 1 ); - t.deepEqual( y, x, 'deep equal' ); + t.deepEqual( y, x, 'returns expected value' ); t.notEqual( y, x, 'different references' ); t.end(); @@ -77,7 +76,7 @@ tape( 'the function supports an `x` stride', function test( t ) { expected = new Float64Array( [ 1.0, 3.0, 5.0, 9.0, 10.0 ] ); - t.deepEqual( y, expected, 'deep equal' ); + t.deepEqual( y, expected, 'returns expected value' ); t.end(); }); @@ -107,11 +106,11 @@ tape( 'the function supports a `y` stride', function test( t ) { expected = new Float64Array( [ 1.0, 7.0, 2.0, 9.0, 3.0 ] ); - t.deepEqual( y, expected, 'deep equal' ); + t.deepEqual( y, expected, 'returns expected value' ); t.end(); }); -tape( 'the function returns a reference to the destination array', function test( t ) { +tape( 'the function returns a reference to the output array', function test( t ) { var out; var x; var y; @@ -125,7 +124,7 @@ tape( 'the function returns a reference to the destination array', function test t.end(); }); -tape( 'if provided an `N` parameter less than or equal to `0`, the function returns `y` unchanged', function test( t ) { +tape( 'if provided an `N` parameter less than or equal to `0`, the function returns the output array unchanged', function test( t ) { var expected; var x; var y; @@ -136,10 +135,10 @@ tape( 'if provided an `N` parameter less than or equal to `0`, the function retu expected = new Float64Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] ); dcopy( -1, x, 1, y, 1 ); - t.deepEqual( y, expected, 'returns `y` unchanged' ); + t.deepEqual( y, expected, 'returns expected value' ); dcopy( 0, x, 1, y, 1 ); - t.deepEqual( y, expected, 'returns `y` unchanged' ); + t.deepEqual( y, expected, 'returns expected value' ); t.end(); }); @@ -170,7 +169,7 @@ tape( 'the function supports negative strides', function test( t ) { expected = new Float64Array( [ 1.0, 3.0, 5.0, 9.0, 10.0 ] ); - t.deepEqual( y, expected, 'deep equal' ); + t.deepEqual( y, expected, 'returns expected value' ); t.end(); }); @@ -202,7 +201,7 @@ tape( 'the function supports complex access patterns', function test( t ) { expected = new Float64Array( [ 5.0, 3.0, 1.0, 10.0, 11.0, 12.0 ] ); - t.deepEqual( y, expected, 'deep equal' ); + t.deepEqual( y, expected, 'returns expected value' ); t.end(); }); @@ -236,12 +235,12 @@ tape( 'the function supports view offsets', function test( t ) { x1 = new Float64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // begin at 2nd element y1 = new Float64Array( y0.buffer, y0.BYTES_PER_ELEMENT*3 ); // begin at the 4th element - N = floor( x0.length / 2 ); + N = 3; dcopy( N, x1, -2, y1, 1 ); expected = new Float64Array( [ 7.0, 8.0, 9.0, 6.0, 4.0, 2.0 ] ); - t.deepEqual( y0, expected, 'deep equal' ); + t.deepEqual( y0, expected, 'returns expected value' ); t.end(); }); @@ -259,7 +258,7 @@ tape( 'if both strides are equal to `1`, the function efficiently copies element dcopy( x.length, x, 1, y, 1 ); - t.deepEqual( y, x, 'deep equal' ); + t.deepEqual( y, x, 'returns expected value' ); t.notEqual( y, x, 'different references' ); x = new Float64Array( 120 ); @@ -271,7 +270,7 @@ tape( 'if both strides are equal to `1`, the function efficiently copies element dcopy( x.length, x, 1, y, 1 ); - t.deepEqual( y, x, 'deep equal' ); + t.deepEqual( y, x, 'returns expected value' ); t.notEqual( y, x, 'different references' ); t.end(); diff --git a/lib/node_modules/@stdlib/blas/base/dcopy/test/test.dcopy.native.js b/lib/node_modules/@stdlib/blas/base/dcopy/test/test.dcopy.native.js index f76ef0669861..62bc3de555bd 100644 --- a/lib/node_modules/@stdlib/blas/base/dcopy/test/test.dcopy.native.js +++ b/lib/node_modules/@stdlib/blas/base/dcopy/test/test.dcopy.native.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -22,7 +22,6 @@ var resolve = require( 'path' ).resolve; var tape = require( 'tape' ); -var floor = require( '@stdlib/math/base/special/floor' ); var Float64Array = require( '@stdlib/array/float64' ); var tryRequire = require( '@stdlib/utils/try-require' ); @@ -54,7 +53,7 @@ tape( 'the function copies elements from `x` into `y`', opts, function test( t ) dcopy( x.length, x, 1, y, 1 ); - t.deepEqual( y, x, 'deep equal' ); + t.deepEqual( y, x, 'returns expected value' ); t.notEqual( y, x, 'different references' ); t.end(); @@ -86,7 +85,7 @@ tape( 'the function supports an `x` stride', opts, function test( t ) { expected = new Float64Array( [ 1.0, 3.0, 5.0, 9.0, 10.0 ] ); - t.deepEqual( y, expected, 'deep equal' ); + t.deepEqual( y, expected, 'returns expected value' ); t.end(); }); @@ -116,11 +115,11 @@ tape( 'the function supports a `y` stride', opts, function test( t ) { expected = new Float64Array( [ 1, 7, 2, 9, 3 ] ); - t.deepEqual( y, expected, 'deep equal' ); + t.deepEqual( y, expected, 'returns expected value' ); t.end(); }); -tape( 'the function returns a reference to the destination array', opts, function test( t ) { +tape( 'the function returns a reference to the output array', opts, function test( t ) { var out; var x; var y; @@ -134,7 +133,7 @@ tape( 'the function returns a reference to the destination array', opts, functio t.end(); }); -tape( 'if provided an `N` parameter less than or equal to `0`, the function returns `y` unchanged', opts, function test( t ) { +tape( 'if provided an `N` parameter less than or equal to `0`, the function returns the output array unchanged', opts, function test( t ) { var expected; var x; var y; @@ -145,10 +144,10 @@ tape( 'if provided an `N` parameter less than or equal to `0`, the function retu expected = new Float64Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] ); dcopy( -1, x, 1, y, 1 ); - t.deepEqual( y, expected, 'returns `y` unchanged' ); + t.deepEqual( y, expected, 'returns expected value' ); dcopy( 0, x, 1, y, 1 ); - t.deepEqual( y, expected, 'returns `y` unchanged' ); + t.deepEqual( y, expected, 'returns expected value' ); t.end(); }); @@ -179,7 +178,7 @@ tape( 'the function supports negative strides', opts, function test( t ) { expected = new Float64Array( [ 1.0, 3.0, 5.0, 9.0, 10.0 ] ); - t.deepEqual( y, expected, 'deep equal' ); + t.deepEqual( y, expected, 'returns expected value' ); t.end(); }); @@ -211,7 +210,7 @@ tape( 'the function supports complex access patterns', opts, function test( t ) expected = new Float64Array( [ 5.0, 3.0, 1.0, 10.0, 11.0, 12.0 ] ); - t.deepEqual( y, expected, 'deep equal' ); + t.deepEqual( y, expected, 'returns expected value' ); t.end(); }); @@ -221,7 +220,6 @@ tape( 'the function supports view offsets', opts, function test( t ) { var y0; var x1; var y1; - var N; // Initial arrays... x0 = new Float64Array([ @@ -245,12 +243,10 @@ tape( 'the function supports view offsets', opts, function test( t ) { x1 = new Float64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // begin at 2nd element y1 = new Float64Array( y0.buffer, y0.BYTES_PER_ELEMENT*3 ); // begin at the 4th element - N = floor( x0.length / 2 ); - - dcopy( N, x1, -2, y1, 1 ); + dcopy( 3, x1, -2, y1, 1 ); expected = new Float64Array( [ 7.0, 8.0, 9.0, 6.0, 4.0, 2.0 ] ); - t.deepEqual( y0, expected, 'deep equal' ); + t.deepEqual( y0, expected, 'returns expected value' ); t.end(); }); @@ -268,7 +264,7 @@ tape( 'if both strides are equal to `1`, the function efficiently copies element dcopy( x.length, x, 1, y, 1 ); - t.deepEqual( y, x, 'deep equal' ); + t.deepEqual( y, x, 'returns expected value' ); t.notEqual( y, x, 'different references' ); x = new Float64Array( 120 ); @@ -280,7 +276,7 @@ tape( 'if both strides are equal to `1`, the function efficiently copies element dcopy( x.length, x, 1, y, 1 ); - t.deepEqual( y, x, 'deep equal' ); + t.deepEqual( y, x, 'returns expected value' ); t.notEqual( y, x, 'different references' ); t.end(); diff --git a/lib/node_modules/@stdlib/blas/base/dcopy/test/test.ndarray.js b/lib/node_modules/@stdlib/blas/base/dcopy/test/test.ndarray.js index 3a518dbfb5a9..dcb0d8bfea37 100644 --- a/lib/node_modules/@stdlib/blas/base/dcopy/test/test.ndarray.js +++ b/lib/node_modules/@stdlib/blas/base/dcopy/test/test.ndarray.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -44,7 +44,7 @@ tape( 'the function copies elements from `x` into `y`', function test( t ) { dcopy( x.length, x, 1, 0, y, 1, 0 ); - t.deepEqual( y, x, 'deep equal' ); + t.deepEqual( y, x, 'returns expected value' ); t.notEqual( y, x, 'different references' ); t.end(); @@ -76,7 +76,7 @@ tape( 'the function supports an `x` stride', function test( t ) { expected = new Float64Array( [ 1.0, 3.0, 5.0, 9.0, 10.0 ] ); - t.deepEqual( y, expected, 'deep equal' ); + t.deepEqual( y, expected, 'returns expected value' ); t.end(); }); @@ -106,7 +106,7 @@ tape( 'the function supports an `x` offset', function test( t ) { expected = new Float64Array( [ 3.0, 4.0, 5.0, 9.0, 10.0 ] ); - t.deepEqual( y, expected, 'deep equal' ); + t.deepEqual( y, expected, 'returns expected value' ); t.end(); }); @@ -136,7 +136,7 @@ tape( 'the function supports a `y` stride', function test( t ) { expected = new Float64Array( [ 1.0, 7.0, 2.0, 9.0, 3.0 ] ); - t.deepEqual( y, expected, 'deep equal' ); + t.deepEqual( y, expected, 'returns expected value' ); t.end(); }); @@ -166,11 +166,11 @@ tape( 'the function supports a `y` offset', function test( t ) { expected = new Float64Array( [ 6.0, 7.0, 1.0, 2.0, 3.0 ] ); - t.deepEqual( y, expected, 'deep equal' ); + t.deepEqual( y, expected, 'returns expected value' ); t.end(); }); -tape( 'the function returns a reference to the destination array', function test( t ) { +tape( 'the function returns a reference to the output array', function test( t ) { var out; var x; var y; @@ -184,7 +184,7 @@ tape( 'the function returns a reference to the destination array', function test t.end(); }); -tape( 'if provided an `N` parameter less than or equal to `0`, the function returns `y` unchanged', function test( t ) { +tape( 'if provided an `N` parameter less than or equal to `0`, the function returns the output array unchanged', function test( t ) { var expected; var x; var y; @@ -195,10 +195,10 @@ tape( 'if provided an `N` parameter less than or equal to `0`, the function retu expected = new Float64Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] ); dcopy( -1, x, 1, 0, y, 1, 0 ); - t.deepEqual( y, expected, 'returns `y` unchanged' ); + t.deepEqual( y, expected, 'returns expected value' ); dcopy( 0, x, 1, 0, y, 1, 0 ); - t.deepEqual( y, expected, 'returns `y` unchanged' ); + t.deepEqual( y, expected, 'returns expected value' ); t.end(); }); @@ -229,7 +229,7 @@ tape( 'the function supports negative strides', function test( t ) { expected = new Float64Array( [ 6.0, 1.0, 3.0, 5.0, 10.0 ] ); - t.deepEqual( y, expected, 'deep equal' ); + t.deepEqual( y, expected, 'returns expected value' ); t.end(); }); @@ -261,7 +261,7 @@ tape( 'the function supports complex access patterns', function test( t ) { expected = new Float64Array( [ 7.0, 8.0, 9.0, 6.0, 4.0, 2.0 ] ); - t.deepEqual( y, expected, 'deep equal' ); + t.deepEqual( y, expected, 'returns expected value' ); t.end(); }); @@ -279,7 +279,7 @@ tape( 'if both strides are equal to `1`, the function efficiently copies element dcopy( x.length, x, 1, 0, y, 1, 0 ); - t.deepEqual( y, x, 'deep equal' ); + t.deepEqual( y, x, 'returns expected value' ); t.notEqual( y, x, 'different references' ); x = new Float64Array( 120 ); @@ -291,7 +291,7 @@ tape( 'if both strides are equal to `1`, the function efficiently copies element dcopy( x.length, x, 1, 0, y, 1, 0 ); - t.deepEqual( y, x, 'deep equal' ); + t.deepEqual( y, x, 'returns expected value' ); t.notEqual( y, x, 'different references' ); t.end(); diff --git a/lib/node_modules/@stdlib/blas/base/dcopy/test/test.ndarray.native.js b/lib/node_modules/@stdlib/blas/base/dcopy/test/test.ndarray.native.js index 935196ad5401..0606f7f177c5 100644 --- a/lib/node_modules/@stdlib/blas/base/dcopy/test/test.ndarray.native.js +++ b/lib/node_modules/@stdlib/blas/base/dcopy/test/test.ndarray.native.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -53,7 +53,7 @@ tape( 'the function copies elements from `x` into `y`', opts, function test( t ) dcopy( x.length, x, 1, 0, y, 1, 0 ); - t.deepEqual( y, x, 'deep equal' ); + t.deepEqual( y, x, 'returns expected value' ); t.notEqual( y, x, 'different references' ); t.end(); @@ -85,7 +85,7 @@ tape( 'the function supports an `x` stride', opts, function test( t ) { expected = new Float64Array( [ 1.0, 3.0, 5.0, 9.0, 10.0 ] ); - t.deepEqual( y, expected, 'deep equal' ); + t.deepEqual( y, expected, 'returns expected value' ); t.end(); }); @@ -115,7 +115,7 @@ tape( 'the function supports an `x` offset', opts, function test( t ) { expected = new Float64Array( [ 3.0, 4.0, 5.0, 9.0, 10.0 ] ); - t.deepEqual( y, expected, 'deep equal' ); + t.deepEqual( y, expected, 'returns expected value' ); t.end(); }); @@ -145,7 +145,7 @@ tape( 'the function supports a `y` stride', opts, function test( t ) { expected = new Float64Array( [ 1.0, 7.0, 2.0, 9.0, 3.0 ] ); - t.deepEqual( y, expected, 'deep equal' ); + t.deepEqual( y, expected, 'returns expected value' ); t.end(); }); @@ -175,11 +175,11 @@ tape( 'the function supports a `y` offset', opts, function test( t ) { expected = new Float64Array( [ 6.0, 7.0, 1.0, 2.0, 3.0 ] ); - t.deepEqual( y, expected, 'deep equal' ); + t.deepEqual( y, expected, 'returns expected value' ); t.end(); }); -tape( 'the function returns a reference to the destination array', opts, function test( t ) { +tape( 'the function returns a reference to the output array', opts, function test( t ) { var out; var x; var y; @@ -193,7 +193,7 @@ tape( 'the function returns a reference to the destination array', opts, functio t.end(); }); -tape( 'if provided an `N` parameter less than or equal to `0`, the function returns `y` unchanged', opts, function test( t ) { +tape( 'if provided an `N` parameter less than or equal to `0`, the function returns the output array unchanged', opts, function test( t ) { var expected; var x; var y; @@ -204,10 +204,10 @@ tape( 'if provided an `N` parameter less than or equal to `0`, the function retu expected = new Float64Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] ); dcopy( -1, x, 1, 0, y, 1, 0 ); - t.deepEqual( y, expected, 'returns `y` unchanged' ); + t.deepEqual( y, expected, 'returns expected value' ); dcopy( 0, x, 1, 0, y, 1, 0 ); - t.deepEqual( y, expected, 'returns `y` unchanged' ); + t.deepEqual( y, expected, 'returns expected value' ); t.end(); }); @@ -238,7 +238,7 @@ tape( 'the function supports negative strides', opts, function test( t ) { expected = new Float64Array( [ 6.0, 1.0, 3.0, 5.0, 10.0 ] ); - t.deepEqual( y, expected, 'deep equal' ); + t.deepEqual( y, expected, 'returns expected value' ); t.end(); }); @@ -270,7 +270,7 @@ tape( 'the function supports complex access patterns', opts, function test( t ) expected = new Float64Array( [ 7.0, 8.0, 9.0, 6.0, 4.0, 2.0 ] ); - t.deepEqual( y, expected, 'deep equal' ); + t.deepEqual( y, expected, 'returns expected value' ); t.end(); }); @@ -288,7 +288,7 @@ tape( 'if both strides are equal to `1`, the function efficiently copies element dcopy( x.length, x, 1, 0, y, 1, 0 ); - t.deepEqual( y, x, 'deep equal' ); + t.deepEqual( y, x, 'returns expected value' ); t.notEqual( y, x, 'different references' ); x = new Float64Array( 120 ); @@ -300,7 +300,7 @@ tape( 'if both strides are equal to `1`, the function efficiently copies element dcopy( x.length, x, 1, 0, y, 1, 0 ); - t.deepEqual( y, x, 'deep equal' ); + t.deepEqual( y, x, 'returns expected value' ); t.notEqual( y, x, 'different references' ); t.end();