From 78940607f8827583adf2b6fb013d2a37ac08734c Mon Sep 17 00:00:00 2001 From: headlessNode Date: Wed, 14 Oct 2026 11:48:02 +0500 Subject: [PATCH] feat: add blas/ext/base/ndarray/zany --- .../blas/ext/base/ndarray/zany/README.md | 112 ++++++++++ .../base/ndarray/zany/benchmark/benchmark.js | 102 ++++++++++ .../blas/ext/base/ndarray/zany/docs/repl.txt | 31 +++ .../base/ndarray/zany/docs/types/index.d.ts | 54 +++++ .../ext/base/ndarray/zany/docs/types/test.ts | 57 ++++++ .../ext/base/ndarray/zany/examples/index.js | 33 +++ .../blas/ext/base/ndarray/zany/lib/index.js | 43 ++++ .../blas/ext/base/ndarray/zany/lib/main.js | 64 ++++++ .../blas/ext/base/ndarray/zany/package.json | 70 +++++++ .../blas/ext/base/ndarray/zany/test/test.js | 192 ++++++++++++++++++ 10 files changed, 758 insertions(+) create mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/README.md create mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/benchmark/benchmark.js create mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/docs/repl.txt create mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/docs/types/index.d.ts create mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/docs/types/test.ts create mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/examples/index.js create mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/lib/index.js create mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/lib/main.js create mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/package.json create mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/test/test.js diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/README.md b/lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/README.md new file mode 100644 index 000000000000..3d7179ed40c6 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/README.md @@ -0,0 +1,112 @@ + + +# zany + +> Test whether at least one element in a one-dimensional double-precision complex floating-point ndarray is truthy. + +
+ +
+ + + +
+ +## Usage + +```javascript +var zany = require( '@stdlib/blas/ext/base/ndarray/zany' ); +``` + +#### zany( arrays ) + +Tests whether at least one element in a one-dimensional double-precision complex floating-point ndarray is truthy. + +```javascript +var Complex128Vector = require( '@stdlib/ndarray/vector/complex128' ); + +var x = new Complex128Vector( [ 0.0, 0.0, 1.0, 2.0 ] ); + +var v = zany( [ x ] ); +// returns true +``` + +The function has the following parameters: + +- **arrays**: array-like object containing a one-dimensional input ndarray. + +
+ + + +
+ +## Notes + +- A complex number is truthy when at least one of its real or imaginary components is truthy. +- If provided an empty one-dimensional ndarray, the function returns `false`. +- The function explicitly treats `NaN` values as falsy. + +
+ + + +
+ +## Examples + + + +```javascript +var bernoulli = require( '@stdlib/random/array/bernoulli' ); +var Complex128Vector = require( '@stdlib/ndarray/vector/complex128' ); +var ndarray2array = require( '@stdlib/ndarray/to-array' ); +var zany = require( '@stdlib/blas/ext/base/ndarray/zany' ); + +var buf = bernoulli( 10*2, 0.5, { + 'dtype': 'float64' +}); +var x = new Complex128Vector( buf.buffer ); +console.log( ndarray2array( x ) ); + +var v = zany( [ x ] ); +console.log( v ); +``` + +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/benchmark/benchmark.js b/lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/benchmark/benchmark.js new file mode 100644 index 000000000000..34f3a46e9984 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/benchmark/benchmark.js @@ -0,0 +1,102 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 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. +*/ + +'use strict'; + +// MODULES // + +var bench = require( '@stdlib/bench' ); +var zeros = require( '@stdlib/ndarray/zeros' ); +var pow = require( '@stdlib/math/base/special/pow' ); +var format = require( '@stdlib/string/format' ); +var pkg = require( './../package.json' ).name; +var zany = require( './../lib/main.js' ); + + +// VARIABLES // + +var options = { + 'dtype': 'complex128' +}; + + +// FUNCTIONS // + +/** +* Creates a benchmark function. +* +* @private +* @param {PositiveInteger} len - array length +* @returns {Function} benchmark function +*/ +function createBenchmark( len ) { + var x = zeros( [ len ], options ); + return benchmark; + + /** + * Benchmark function. + * + * @private + * @param {Benchmark} b - benchmark instance + */ + function benchmark( b ) { + var out; + var i; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + out = zany( [ x ] ); + if ( typeof out !== 'boolean' ) { + b.fail( 'should return a boolean' ); + } + } + b.toc(); + if ( typeof out !== 'boolean' ) { + b.fail( 'should return a boolean' ); + } + b.pass( 'benchmark finished' ); + b.end(); + } +} + + +// MAIN // + +/** +* Main execution sequence. +* +* @private +*/ +function main() { + var len; + var min; + var max; + var f; + var i; + + min = 1; // 10^min + max = 6; // 10^max + + for ( i = min; i <= max; i++ ) { + len = pow( 10, i ); + f = createBenchmark( len ); + bench( format( '%s:len=%d', pkg, len ), f ); + } +} + +main(); diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/docs/repl.txt b/lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/docs/repl.txt new file mode 100644 index 000000000000..b3d175f3f5bb --- /dev/null +++ b/lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/docs/repl.txt @@ -0,0 +1,31 @@ + +{{alias}}( arrays ) + Tests whether at least one element in a one-dimensional double-precision + complex floating-point ndarray is truthy. + + A complex number is truthy when at least one of its real or imaginary + components is truthy. + + If provided an empty ndarray, the function returns `false`. + + The function explicitly treats `NaN` values as falsy. + + Parameters + ---------- + arrays: ArrayLikeObject + Array-like object containing a one-dimensional input ndarray. + + Returns + ------- + bool: boolean + Boolean indicating whether at least one element is truthy. + + Examples + -------- + > var x = new {{alias:@stdlib/ndarray/vector/complex128}}( [ 0.0, 0.0, 1.0, 2.0 ] ); + > {{alias}}( [ x ] ) + true + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/docs/types/index.d.ts b/lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/docs/types/index.d.ts new file mode 100644 index 000000000000..cc2dd49bd4d9 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/docs/types/index.d.ts @@ -0,0 +1,54 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2026 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. +*/ + +// TypeScript Version: 4.1 + +/// + +import { complex128ndarray } from '@stdlib/types/ndarray'; + +/** +* Tests whether at least one element in a one-dimensional double-precision complex floating-point ndarray is truthy. +* +* ## Notes +* +* - The function expects the following ndarrays: +* +* - a one-dimensional input ndarray. +* +* - A complex number is truthy when at least one of its real or imaginary components is truthy. +* +* - The function explicitly treats `NaN` values as falsy. +* +* @param arrays - array-like object containing ndarrays +* @returns boolean indicating whether at least one element is truthy +* +* @example +* var Complex128Vector = require( '@stdlib/ndarray/vector/complex128' ); +* +* var x = new Complex128Vector( [ 0.0, 0.0, 1.0, 2.0 ] ); +* +* var v = zany( [ x ] ); +* // returns true +*/ +declare function zany( arrays: [ complex128ndarray ] ): boolean; + + +// EXPORTS // + +export = zany; diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/docs/types/test.ts b/lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/docs/types/test.ts new file mode 100644 index 000000000000..e054f26927af --- /dev/null +++ b/lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/docs/types/test.ts @@ -0,0 +1,57 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2026 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. +*/ + +/* eslint-disable space-in-parens */ + +import zeros = require( '@stdlib/ndarray/zeros' ); +import zany = require( './index' ); + + +// TESTS // + +// The function returns a boolean... +{ + const x = zeros( [ 10 ], { + 'dtype': 'complex128' + }); + + zany( [ x ] ); // $ExpectType boolean +} + +// The compiler throws an error if the function is provided a first argument which is not an array of ndarrays... +{ + zany( '10' ); // $ExpectError + zany( 10 ); // $ExpectError + zany( true ); // $ExpectError + zany( false ); // $ExpectError + zany( null ); // $ExpectError + zany( undefined ); // $ExpectError + zany( [] ); // $ExpectError + zany( {} ); // $ExpectError + zany( ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function is provided an unsupported number of arguments... +{ + const x = zeros( [ 10 ], { + 'dtype': 'complex128' + }); + + zany(); // $ExpectError + zany( [ x ], {} ); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/examples/index.js b/lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/examples/index.js new file mode 100644 index 000000000000..859bf661cc7f --- /dev/null +++ b/lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/examples/index.js @@ -0,0 +1,33 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 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. +*/ + +'use strict'; + +var bernoulli = require( '@stdlib/random/array/bernoulli' ); +var Complex128Vector = require( '@stdlib/ndarray/vector/complex128' ); +var ndarray2array = require( '@stdlib/ndarray/to-array' ); +var zany = require( './../lib' ); + +var buf = bernoulli( 10*2, 0.5, { + 'dtype': 'float64' +}); +var x = new Complex128Vector( buf.buffer ); +console.log( ndarray2array( x ) ); + +var v = zany( [ x ] ); +console.log( v ); diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/lib/index.js b/lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/lib/index.js new file mode 100644 index 000000000000..e4a13cac436f --- /dev/null +++ b/lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/lib/index.js @@ -0,0 +1,43 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 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. +*/ + +'use strict'; + +/** +* Test whether at least one element in a one-dimensional double-precision complex floating-point ndarray is truthy. +* +* @module @stdlib/blas/ext/base/ndarray/zany +* +* @example +* var Complex128Vector = require( '@stdlib/ndarray/vector/complex128' ); +* var zany = require( '@stdlib/blas/ext/base/ndarray/zany' ); +* +* var x = new Complex128Vector( [ 0.0, 0.0, 1.0, 2.0 ] ); +* +* var v = zany( [ x ] ); +* // returns true +*/ + +// MODULES // + +var main = require( './main.js' ); + + +// EXPORTS // + +module.exports = main; diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/lib/main.js b/lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/lib/main.js new file mode 100644 index 000000000000..feb03ad73f44 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/lib/main.js @@ -0,0 +1,64 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 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. +*/ + +'use strict'; + +// MODULES // + +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 strided = require( '@stdlib/blas/ext/base/zany' ).ndarray; + + +// MAIN // + +/** +* Tests whether at least one element in a one-dimensional double-precision complex floating-point ndarray is truthy. +* +* ## Notes +* +* - The function expects the following ndarrays: +* +* - a one-dimensional input ndarray. +* +* - A complex number is truthy when at least one of its real or imaginary components is truthy. +* +* - The function explicitly treats `NaN` values as falsy. +* +* @param {ArrayLikeObject} arrays - array-like object containing ndarrays +* @returns {boolean} boolean indicating whether at least one element is truthy +* +* @example +* var Complex128Vector = require( '@stdlib/ndarray/vector/complex128' ); +* +* var x = new Complex128Vector( [ 0.0, 0.0, 1.0, 2.0 ] ); +* +* var v = zany( [ x ] ); +* // returns true +*/ +function zany( arrays ) { + var x = arrays[ 0 ]; + return strided( numelDimension( x, 0 ), getData( x ), getStride( x, 0 ), getOffset( x ) ); // eslint-disable-line max-len +} + + +// EXPORTS // + +module.exports = zany; diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/package.json b/lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/package.json new file mode 100644 index 000000000000..66a54425c5e8 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/package.json @@ -0,0 +1,70 @@ +{ + "name": "@stdlib/blas/ext/base/ndarray/zany", + "version": "0.0.0", + "description": "Test whether at least one element in a one-dimensional double-precision complex floating-point ndarray is truthy.", + "license": "Apache-2.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors": [ + { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "main": "./lib", + "directories": { + "benchmark": "./benchmark", + "doc": "./docs", + "example": "./examples", + "lib": "./lib", + "test": "./test" + }, + "types": "./docs/types", + "scripts": {}, + "homepage": "https://github.com/stdlib-js/stdlib", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "stdmath", + "mathematics", + "math", + "blas", + "extended", + "any", + "zany", + "truthy", + "test", + "boolean", + "ndarray", + "complex128", + "double-precision", + "complex", + "complex128array" + ], + "__stdlib__": {} +} diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/test/test.js b/lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/test/test.js new file mode 100644 index 000000000000..84de6cbd26c8 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/ext/base/ndarray/zany/test/test.js @@ -0,0 +1,192 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 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. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var Complex128Array = require( '@stdlib/array/complex128' ); +var ndarray = require( '@stdlib/ndarray/base/ctor' ); +var zany = require( './../lib/main.js' ); + + +// FUNCTIONS // + +/** +* Returns a one-dimensional ndarray. +* +* @private +* @param {Complex128Array} buffer - underlying data buffer +* @param {NonNegativeInteger} length - number of indexed elements +* @param {integer} stride - stride length +* @param {NonNegativeInteger} offset - index offset +* @returns {ndarray} one-dimensional ndarray +*/ +function vector( buffer, length, stride, offset ) { + return new ndarray( 'complex128', buffer, [ length ], [ stride ], offset, 'row-major' ); +} + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof zany, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function has an arity of 1', function test( t ) { + t.strictEqual( zany.length, 1, 'has expected arity' ); + t.end(); +}); + +tape( 'the function tests whether at least one element in a one-dimensional ndarray is truthy', function test( t ) { + var x; + var v; + + x = new Complex128Array( [ 0.0, 0.0, 1.0, 2.0 ] ); + v = zany( [ vector( x, 2, 1, 0 ) ] ); + t.strictEqual( v, true, 'returns expected value' ); + + x = new Complex128Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); + v = zany( [ vector( x, 3, 1, 0 ) ] ); + t.strictEqual( v, false, 'returns expected value' ); + + x = new Complex128Array( [ 1.0, 0.0, 0.0, 0.0 ] ); + v = zany( [ vector( x, 2, 1, 0 ) ] ); + t.strictEqual( v, true, 'returns expected value' ); + + x = new Complex128Array( [ 0.0, 1.0, 0.0, 0.0 ] ); + v = zany( [ vector( x, 2, 1, 0 ) ] ); + t.strictEqual( v, true, 'returns expected value' ); + + x = new Complex128Array( [ -0.0, -0.0, -0.0, -0.0 ] ); + v = zany( [ vector( x, 2, 1, 0 ) ] ); + t.strictEqual( v, false, 'returns expected value' ); + + x = new Complex128Array( [ -1.0, 0.0, 0.0, 0.0 ] ); + v = zany( [ vector( x, 2, 1, 0 ) ] ); + t.strictEqual( v, true, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function treats `NaN` values as falsy', function test( t ) { + var x; + var v; + + x = new Complex128Array( [ NaN, NaN, 0.0, 0.0 ] ); + v = zany( [ vector( x, 2, 1, 0 ) ] ); + t.strictEqual( v, false, 'returns expected value' ); + + x = new Complex128Array( [ NaN, 0.0, 0.0, NaN ] ); + v = zany( [ vector( x, 2, 1, 0 ) ] ); + t.strictEqual( v, false, 'returns expected value' ); + + x = new Complex128Array( [ NaN, NaN, 1.0, 0.0 ] ); + v = zany( [ vector( x, 2, 1, 0 ) ] ); + t.strictEqual( v, true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided an empty ndarray, the function returns `false`', function test( t ) { + var x; + var v; + + x = new Complex128Array( [] ); + + v = zany( [ vector( x, 0, 1, 0 ) ] ); + t.strictEqual( v, false, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function supports one-dimensional ndarrays having non-unit strides', function test( t ) { + var x; + var v; + + x = new Complex128Array([ + 0.0, // 0 + 0.0, // 0 + 999.0, + 999.0, + 0.0, // 1 + 0.0, // 1 + 999.0, + 999.0, + 0.0, // 2 + 0.0, // 2 + 999.0, + 999.0 + ]); + + v = zany( [ vector( x, 3, 2, 0 ) ] ); + + t.strictEqual( v, false, 'returns expected value' ); + t.end(); +}); + +tape( 'the function supports one-dimensional ndarrays having negative strides', function test( t ) { + var x; + var v; + + x = new Complex128Array([ + 1.0, // 2 + 1.0, // 2 + 0.0, + 0.0, + 0.0, // 1 + 0.0, // 1 + 0.0, + 0.0, + 0.0, // 0 + 0.0 // 0 + ]); + + v = zany( [ vector( x, 3, -2, 4 ) ] ); + + t.strictEqual( v, true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function supports one-dimensional ndarrays having non-zero offsets', function test( t ) { + var x; + var v; + + x = new Complex128Array([ + 1.0, + 1.0, + 0.0, // 0 + 0.0, // 0 + 1.0, + 1.0, + 0.0, // 1 + 0.0, // 1 + 1.0, + 1.0, + 0.0, // 2 + 0.0 // 2 + ]); + + v = zany( [ vector( x, 3, 2, 1 ) ] ); + t.strictEqual( v, false, 'returns expected value' ); + + t.end(); +});