diff --git a/lib/node_modules/@stdlib/_tools/eslint/rules/no-dynamic-require/examples/index.js b/lib/node_modules/@stdlib/_tools/eslint/rules/no-dynamic-require/examples/index.js
index d347dd85b233..7d8ae3655bde 100644
--- a/lib/node_modules/@stdlib/_tools/eslint/rules/no-dynamic-require/examples/index.js
+++ b/lib/node_modules/@stdlib/_tools/eslint/rules/no-dynamic-require/examples/index.js
@@ -39,17 +39,17 @@ result = linter.verify( code, {
});
console.log( result );
/* =>
- [
- {
- 'ruleId': 'no-dynamic-require',
- 'severity': 2,
- 'message': 'require() calls should only use string literals',
- 'line': 2,
- 'column': 15,
- 'nodeType': 'CallExpression',
- 'source': 'var betainc = require( pkg );',
- 'endLine': 2,
- 'endColumn': 29
- }
- ]
+ [
+ {
+ 'ruleId': 'no-dynamic-require',
+ 'severity': 2,
+ 'message': 'require() calls should only use string literals',
+ 'line': 2,
+ 'column': 15,
+ 'nodeType': 'CallExpression',
+ 'source': 'var betainc = require( pkg );',
+ 'endLine': 2,
+ 'endColumn': 29
+ }
+ ]
*/
diff --git a/lib/node_modules/@stdlib/_tools/eslint/rules/tsdoc-declarations-doctest/lib/add_package_to_scope.js b/lib/node_modules/@stdlib/_tools/eslint/rules/tsdoc-declarations-doctest/lib/add_package_to_scope.js
index 5fa060ceb18b..1a2170792807 100644
--- a/lib/node_modules/@stdlib/_tools/eslint/rules/tsdoc-declarations-doctest/lib/add_package_to_scope.js
+++ b/lib/node_modules/@stdlib/_tools/eslint/rules/tsdoc-declarations-doctest/lib/add_package_to_scope.js
@@ -33,7 +33,7 @@ var RE_DECLARE_CLASS = /declare\s+class\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s/;
var RE_DECLARE_CONST = /declare\s+const\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*:/;
// Regular expression to match variable declarations with interface types such as "declare var ctor: Int32Vector;" (captures variable name and interface name):
-var RE_DECLARE_VAR_INTERFACE = /declare\s+var\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*:\s*([A-Z][a-zA-Z0-9_$]*)/;
+var RE_DECLARE_VAR_INTERFACE = /declare\s+(?:var|const)\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*:\s*([A-Z][a-zA-Z0-9_$]*)/;
// MAIN //
diff --git a/lib/node_modules/@stdlib/blas/base/isamax/test/test.isamax.js b/lib/node_modules/@stdlib/blas/base/isamax/test/test.isamax.js
index 19ad51ceae1b..b60e99fc38e6 100644
--- a/lib/node_modules/@stdlib/blas/base/isamax/test/test.isamax.js
+++ b/lib/node_modules/@stdlib/blas/base/isamax/test/test.isamax.js
@@ -57,13 +57,13 @@ tape( 'the function finds the index of the element with the maximum absolute val
idx = isamax( 4, x, 1 );
t.strictEqual( idx, expected, 'returns expected value' );
- x = new Float32Array( [
+ x = new Float32Array([
0.2, // 1
-0.6, // 2
0.3, // 3
5.0,
5.0
- ] );
+ ]);
expected = 1;
idx = isamax( 3, x, 1 );
@@ -77,11 +77,11 @@ tape( 'if provided an `N` parameter less than `1`, the function returns `-1`', f
var idx;
var x;
- x = new Float32Array( [
+ x = new Float32Array([
1.0,
2.0,
3.0
- ] );
+ ]);
expected = -1;
idx = isamax( 0, x, 1 );
diff --git a/lib/node_modules/@stdlib/blas/ext/sorthp/lib/index.js b/lib/node_modules/@stdlib/blas/ext/sorthp/lib/index.js
index 8123cc15d6a5..09412ed7dd01 100644
--- a/lib/node_modules/@stdlib/blas/ext/sorthp/lib/index.js
+++ b/lib/node_modules/@stdlib/blas/ext/sorthp/lib/index.js
@@ -60,5 +60,3 @@ var main = require( './main.js' );
// EXPORTS //
module.exports = main;
-
-// exports: { "assign": "main.assign" }
diff --git a/lib/node_modules/@stdlib/blas/ext/sorthp/test/test.js b/lib/node_modules/@stdlib/blas/ext/sorthp/test/test.js
index 88532b7c87f4..1b09e9c43aab 100644
--- a/lib/node_modules/@stdlib/blas/ext/sorthp/test/test.js
+++ b/lib/node_modules/@stdlib/blas/ext/sorthp/test/test.js
@@ -336,7 +336,7 @@ tape( 'the function throws an error if provided a first argument which is not an
}
});
-tape( 'the function throws an error if provided a `sortOrder` argument which is not an ndarray-like object, a numeric scalar, or a support string', function test( t ) {
+tape( 'the function throws an error if provided a `sortOrder` argument which is not an ndarray-like object, a numeric scalar, or a supported string', function test( t ) {
var values;
var x;
var i;
@@ -366,7 +366,7 @@ tape( 'the function throws an error if provided a `sortOrder` argument which is
}
});
-tape( 'the function throws an error if provided a `sortOrder` argument which is not an ndarray-like object, a numeric scalar, or a support string (options)', function test( t ) {
+tape( 'the function throws an error if provided a `sortOrder` argument which is not an ndarray-like object, a numeric scalar, or a supported string (options)', function test( t ) {
var values;
var x;
var i;
diff --git a/lib/node_modules/@stdlib/blas/ext/to-sortedhp/README.md b/lib/node_modules/@stdlib/blas/ext/to-sortedhp/README.md
new file mode 100644
index 000000000000..d34b9f3033af
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/to-sortedhp/README.md
@@ -0,0 +1,245 @@
+
+
+# toSortedhp
+
+> Return a new [ndarray][@stdlib/ndarray/ctor] containing the elements of an input [ndarray][@stdlib/ndarray/ctor] sorted along one or more [ndarray][@stdlib/ndarray/ctor] dimensions using heapsort.
+
+
+
+## Usage
+
+```javascript
+var toSortedhp = require( '@stdlib/blas/ext/to-sortedhp' );
+```
+
+#### toSortedhp( x\[, sortOrder]\[, options] )
+
+Returns a new [ndarray][@stdlib/ndarray/ctor] containing the elements of an input [ndarray][@stdlib/ndarray/ctor] sorted along one or more [ndarray][@stdlib/ndarray/ctor] dimensions using heapsort.
+
+```javascript
+var ndarray2array = require( '@stdlib/ndarray/to-array' );
+var array = require( '@stdlib/ndarray/array' );
+
+var x = array( [ -1.0, 2.0, -3.0 ] );
+
+var y = toSortedhp( x );
+// returns
+
+var arr = ndarray2array( y );
+// returns [ -3.0, -1.0, 2.0 ]
+```
+
+The function has the following parameters:
+
+- **x**: input [ndarray][@stdlib/ndarray/ctor]. Must have a real-valued or "generic" [data type][@stdlib/ndarray/dtypes].
+- **sortOrder**: sort order (_optional_). May be either a scalar value, string, or an [ndarray][@stdlib/ndarray/ctor] having a real-valued or "generic" [data type][@stdlib/ndarray/dtypes]. If provided an [ndarray][@stdlib/ndarray/ctor], the value must have a shape which is [broadcast-compatible][@stdlib/ndarray/base/broadcast-shapes] with the complement of the shape defined by `options.dims`. For example, given the input shape `[2, 3, 4]` and `options.dims=[0]`, an [ndarray][@stdlib/ndarray/ctor] sort order must have a shape which is [broadcast-compatible][@stdlib/ndarray/base/broadcast-shapes] with the shape `[3, 4]`. Similarly, when performing the operation over all elements in a provided input [ndarray][@stdlib/ndarray/ctor], an [ndarray][@stdlib/ndarray/ctor] sort order must be a zero-dimensional [ndarray][@stdlib/ndarray/ctor]. By default, the sort order is `1` (i.e., increasing order).
+- **options**: function options (_optional_).
+
+The function accepts the following options:
+
+- **dims**: list of dimensions over which to perform operation. If not provided, the function performs the operation over all elements in a provided input [ndarray][@stdlib/ndarray/ctor].
+- **dtype**: output [ndarray][@stdlib/ndarray/ctor] [data type][@stdlib/ndarray/dtypes].
+
+By default, the function sorts elements in increasing order. To sort in a different order, provide a `sortOrder` argument.
+
+```javascript
+var ndarray2array = require( '@stdlib/ndarray/to-array' );
+var array = require( '@stdlib/ndarray/array' );
+
+var x = array( [ -1.0, 2.0, -3.0 ] );
+
+var y = toSortedhp( x, -1.0 );
+// returns
+
+var arr = ndarray2array( y );
+// returns [ 2.0, -1.0, -3.0 ]
+```
+
+In addition to numeric values, one can specify the sort order via one of the following string literals: `'ascending'`, `'asc'`, `'descending'`, or `'desc'`. The first two literals indicate to sort in ascending (i.e., increasing) order. The last two literals indicate to sort in descending (i.e., decreasing) order.
+
+```javascript
+var ndarray2array = require( '@stdlib/ndarray/to-array' );
+var array = require( '@stdlib/ndarray/array' );
+
+var x = array( [ -1.0, 2.0, -3.0 ] );
+
+// Sort in ascending order:
+var y = toSortedhp( x, 'asc' );
+// returns
+
+var arr = ndarray2array( y );
+// returns [ -3.0, -1.0, 2.0 ]
+
+// Sort in descending order:
+y = toSortedhp( x, 'descending' );
+// returns
+
+arr = ndarray2array( y );
+// returns [ 2.0, -1.0, -3.0 ]
+```
+
+By default, the function performs the operation over all elements in a provided input [ndarray][@stdlib/ndarray/ctor]. To perform the operation over specific dimensions, provide a `dims` option.
+
+```javascript
+var ndarray2array = require( '@stdlib/ndarray/to-array' );
+var array = require( '@stdlib/ndarray/array' );
+
+var x = array( [ -1.0, 2.0, -3.0, 4.0 ], {
+ 'shape': [ 2, 2 ],
+ 'order': 'row-major'
+});
+
+var v = ndarray2array( x );
+// returns [ [ -1.0, 2.0 ], [ -3.0, 4.0 ] ]
+
+var y = toSortedhp( x, {
+ 'dims': [ 0 ]
+});
+// returns
+
+v = ndarray2array( y );
+// returns [ [ -3.0, 2.0 ], [ -1.0, 4.0 ] ]
+```
+
+To specify the output [ndarray][@stdlib/ndarray/ctor] [data type][@stdlib/ndarray/dtypes], provide a `dtype` option.
+
+```javascript
+var ndarray2array = require( '@stdlib/ndarray/to-array' );
+var array = require( '@stdlib/ndarray/array' );
+
+var x = array( [ -1.0, 2.0, -3.0 ] );
+
+var y = toSortedhp( x, {
+ 'dtype': 'float32'
+});
+// returns
+
+var arr = ndarray2array( y );
+// returns [ -3.0, -1.0, 2.0 ]
+```
+
+#### toSortedhp.assign( x, out\[, sortOrder]\[, options] )
+
+Sorts the elements of an input [ndarray][@stdlib/ndarray/ctor] along one or more [ndarray][@stdlib/ndarray/ctor] dimensions using heapsort and assigns the results to an output [ndarray][@stdlib/ndarray/ctor].
+
+```javascript
+var ndarray2array = require( '@stdlib/ndarray/to-array' );
+var zeros = require( '@stdlib/ndarray/zeros' );
+var array = require( '@stdlib/ndarray/array' );
+
+var x = array( [ -1.0, 2.0, -3.0 ] );
+var y = zeros( [ 3 ] );
+
+var out = toSortedhp.assign( x, y );
+// returns
+
+var arr = ndarray2array( out );
+// returns [ -3.0, -1.0, 2.0 ]
+
+var bool = ( y === out );
+// returns true
+```
+
+The function has the following parameters:
+
+- **x**: input [ndarray][@stdlib/ndarray/ctor]. Must have a real-valued or "generic" [data type][@stdlib/ndarray/dtypes].
+- **out**: output [ndarray][@stdlib/ndarray/ctor]. Must have a real-valued or "generic" [data type][@stdlib/ndarray/dtypes].
+- **sortOrder**: sort order (_optional_). May be either a scalar value, string, or an [ndarray][@stdlib/ndarray/ctor] having a real-valued or "generic" [data type][@stdlib/ndarray/dtypes]. If provided an [ndarray][@stdlib/ndarray/ctor], the value must have a shape which is [broadcast-compatible][@stdlib/ndarray/base/broadcast-shapes] with the complement of the shape defined by `options.dims`. For example, given the input shape `[2, 3, 4]` and `options.dims=[0]`, an [ndarray][@stdlib/ndarray/ctor] sort order must have a shape which is [broadcast-compatible][@stdlib/ndarray/base/broadcast-shapes] with the shape `[3, 4]`. Similarly, when performing the operation over all elements in a provided input [ndarray][@stdlib/ndarray/ctor], an [ndarray][@stdlib/ndarray/ctor] sort order must be a zero-dimensional [ndarray][@stdlib/ndarray/ctor]. By default, the sort order is `1` (i.e., increasing order).
+- **options**: function options (_optional_).
+
+The function accepts the following options:
+
+- **dims**: list of dimensions over which to perform operation. If not provided, the function performs the operation over all elements in a provided input [ndarray][@stdlib/ndarray/ctor].
+
+
+
+
+
+
+
+## Notes
+
+- If `sortOrder < 0.0` or is either `'desc'` or `'descending'`, the input [ndarray][@stdlib/ndarray/ctor] is sorted in **decreasing** order. If `sortOrder > 0.0` or is either `'asc'` or `'ascending'`, the input [ndarray][@stdlib/ndarray/ctor] is sorted in **increasing** order. If `sortOrder == 0.0`, the input [ndarray][@stdlib/ndarray/ctor] is left unchanged.
+- The algorithm distinguishes between `-0` and `+0`. When sorted in increasing order, `-0` is sorted before `+0`. When sorted in decreasing order, `-0` is sorted after `+0`.
+- The algorithm sorts `NaN` values to the end. When sorted in increasing order, `NaN` values are sorted last. When sorted in decreasing order, `NaN` values are sorted first.
+- The algorithm has space complexity `O(1)` and time complexity `O(N log2 N)`.
+- The algorithm is **unstable**, meaning that the algorithm may change the order of [ndarray][@stdlib/ndarray/ctor] elements which are equal or equivalent (e.g., `NaN` values).
+- The function iterates over [ndarray][@stdlib/ndarray/ctor] elements according to the memory layout of the input [ndarray][@stdlib/ndarray/ctor]. Accordingly, performance degradation is possible when operating over multiple dimensions of a large non-contiguous multi-dimensional input [ndarray][@stdlib/ndarray/ctor]. In such scenarios, one may want to copy an input [ndarray][@stdlib/ndarray/ctor] to contiguous memory before sorting.
+
+
+
+
+
+
+
+## Examples
+
+
+
+```javascript
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var ndarray2array = require( '@stdlib/ndarray/to-array' );
+var ndarray = require( '@stdlib/ndarray/ctor' );
+var toSortedhp = require( '@stdlib/blas/ext/to-sortedhp' );
+
+// Generate an array of random numbers:
+var xbuf = discreteUniform( 25, -20, 20, {
+ 'dtype': 'generic'
+});
+
+// Wrap in an ndarray:
+var x = new ndarray( 'generic', xbuf, [ 5, 5 ], [ 5, 1 ], 0, 'row-major' );
+console.log( ndarray2array( x ) );
+
+// Perform operation:
+var out = toSortedhp( x, {
+ 'dims': [ 0 ]
+});
+
+// Print the results:
+console.log( ndarray2array( out ) );
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+[@stdlib/ndarray/ctor]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/ctor
+
+[@stdlib/ndarray/dtypes]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/dtypes
+
+[@stdlib/ndarray/base/broadcast-shapes]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/broadcast-shapes
+
+
+
+
diff --git a/lib/node_modules/@stdlib/blas/ext/to-sortedhp/benchmark/benchmark.assign.js b/lib/node_modules/@stdlib/blas/ext/to-sortedhp/benchmark/benchmark.assign.js
new file mode 100644
index 000000000000..82053922c517
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/to-sortedhp/benchmark/benchmark.assign.js
@@ -0,0 +1,112 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var uniform = require( '@stdlib/random/array/uniform' );
+var ndarray = require( '@stdlib/ndarray/base/ctor' );
+var zeros = require( '@stdlib/ndarray/zeros' );
+var pkg = require( './../package.json' ).name;
+var assign = require( './../lib/assign.js' );
+
+
+// VARIABLES //
+
+var options = {
+ 'dtype': 'float64'
+};
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - array length
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len ) {
+ var x;
+ var y;
+
+ x = uniform( len, -50.0, 50.0, options );
+ x = new ndarray( options.dtype, x, [ len ], [ 1 ], 0, 'row-major' );
+ y = zeros( [ len ], {
+ 'dtype': options.dtype
+ });
+
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var o;
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ o = assign( x, y, ( i%2 ) ? 1 : -1 );
+ if ( typeof o !== 'object' ) {
+ b.fail( 'should return an ndarray' );
+ }
+ }
+ b.toc();
+ if ( isnan( y.get( i%len ) ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ 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( pkg+':assign:dtype='+options.dtype+',len='+len, f );
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/blas/ext/to-sortedhp/benchmark/benchmark.js b/lib/node_modules/@stdlib/blas/ext/to-sortedhp/benchmark/benchmark.js
new file mode 100644
index 000000000000..cf5d13649599
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/to-sortedhp/benchmark/benchmark.js
@@ -0,0 +1,105 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var uniform = require( '@stdlib/random/array/uniform' );
+var ndarray = require( '@stdlib/ndarray/base/ctor' );
+var pkg = require( './../package.json' ).name;
+var toSortedhp = require( './../lib' );
+
+
+// VARIABLES //
+
+var options = {
+ 'dtype': 'float64'
+};
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - array length
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len ) {
+ var x = uniform( len, -50.0, 50.0, options );
+ x = new ndarray( options.dtype, x, [ len ], [ 1 ], 0, 'row-major' );
+
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var o;
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ o = toSortedhp( x, ( i%2 ) ? 1 : -1 );
+ if ( typeof o !== 'object' ) {
+ b.fail( 'should return an ndarray' );
+ }
+ }
+ b.toc();
+ if ( isnan( o.get( i%len ) ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ 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( pkg+':dtype='+options.dtype+',len='+len, f );
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/blas/ext/to-sortedhp/docs/repl.txt b/lib/node_modules/@stdlib/blas/ext/to-sortedhp/docs/repl.txt
new file mode 100644
index 000000000000..005be213a8c4
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/to-sortedhp/docs/repl.txt
@@ -0,0 +1,122 @@
+
+{{alias}}( x[, sortOrder][, options] )
+ Returns a new ndarray containing the elements of an input ndarray sorted
+ along one or more ndarray dimensions using heapsort.
+
+ The algorithm distinguishes between `-0` and `+0`. When sorted in increasing
+ order, `-0` is sorted before `+0`. When sorted in decreasing order, `-0` is
+ sorted after `+0`.
+
+ The algorithm sorts `NaN` values to the end. When sorted in increasing
+ order, `NaN` values are sorted last. When sorted in decreasing order, `NaN`
+ values are sorted first.
+
+ The algorithm has space complexity O(1) and time complexity O(N log2 N).
+
+ The algorithm is *unstable*, meaning that the algorithm may change the order
+ of ndarray elements which are equal or equivalent (e.g., `NaN` values).
+
+ Parameters
+ ----------
+ x: ndarray
+ Input array. Must have a real-valued or "generic" data type.
+
+ sortOrder: ndarray|number|string (optional)
+ Sort order. May be either a scalar value, string, or an ndarray having a
+ real-valued or "generic" data type. If provided an ndarray, the value
+ must have a shape which is broadcast compatible with the complement of
+ the shape defined by `options.dims`. For example, given the input shape
+ `[2, 3, 4]` and `options.dims=[0]`, an ndarray sort order must have a
+ shape which is broadcast compatible with the shape `[3, 4]`. Similarly,
+ when performing the operation over all elements in a provided input
+ ndarray, an ndarray sort order must be a zero-dimensional ndarray.
+
+ If specified as a string, must be one of the following values:
+
+ - ascending: sort in increasing order.
+ - asc: sort in increasing order.
+ - descending: sort in decreasing order.
+ - desc: sort in decreasing order.
+
+ By default, the sort order is `1` (i.e., increasing order).
+
+ options: Object (optional)
+ Function options.
+
+ options.dims: Array (optional)
+ List of dimensions over which to perform operation. If not provided, the
+ function performs the operation over all elements in a provided input
+ ndarray.
+
+ options.dtype: string|DataType (optional)
+ Output array data type.
+
+ Returns
+ -------
+ out: ndarray
+ Output array.
+
+ Examples
+ --------
+ > var x = {{alias:@stdlib/ndarray/array}}( [ -1.0, 2.0, -3.0, -4.0 ] );
+ > var out = {{alias}}( x );
+ > {{alias:@stdlib/ndarray/to-array}}( out )
+ [ -4.0, -3.0, -1.0, 2.0 ]
+
+
+{{alias}}.assign( x, out[, sortOrder][, options] )
+ Sorts elements of an input ndarray along one or more ndarray dimensions
+ using heapsort and assigns the results to an output ndarray.
+
+ Parameters
+ ----------
+ x: ndarray
+ Input array. Must have a real-valued or "generic" data type.
+
+ out: ndarray
+ Output array. Must have a real-valued or "generic" data type.
+
+ sortOrder: ndarray|number|string (optional)
+ Sort order. May be either a scalar value, string, or an ndarray having a
+ real-valued or "generic" data type. If provided an ndarray, the value
+ must have a shape which is broadcast compatible with the complement of
+ the shape defined by `options.dims`. For example, given the input shape
+ `[2, 3, 4]` and `options.dims=[0]`, an ndarray sort order must have a
+ shape which is broadcast compatible with the shape `[3, 4]`. Similarly,
+ when performing the operation over all elements in a provided input
+ ndarray, an ndarray sort order must be a zero-dimensional ndarray.
+
+ If specified as a string, must be one of the following values:
+
+ - ascending: sort in increasing order.
+ - asc: sort in increasing order.
+ - descending: sort in decreasing order.
+ - desc: sort in decreasing order.
+
+ By default, the sort order is `1` (i.e., increasing order).
+
+ options: Object (optional)
+ Function options.
+
+ options.dims: Array (optional)
+ List of dimensions over which to perform operation. If not provided, the
+ function performs the operation over all elements in a provided input
+ ndarray.
+
+ Returns
+ -------
+ out: ndarray
+ Output array.
+
+ Examples
+ --------
+ > var x = {{alias:@stdlib/ndarray/array}}( [ -1.0, 2.0, -3.0, -4.0 ] );
+ > var y = {{alias:@stdlib/ndarray/zeros}}( [ 4 ] );
+ > var out = {{alias}}.assign( x, y );
+ > {{alias:@stdlib/ndarray/to-array}}( out )
+ [ -4.0, -3.0, -1.0, 2.0 ]
+ > var bool = ( out === y )
+ true
+
+ See Also
+ --------
diff --git a/lib/node_modules/@stdlib/blas/ext/to-sortedhp/docs/types/index.d.ts b/lib/node_modules/@stdlib/blas/ext/to-sortedhp/docs/types/index.d.ts
new file mode 100644
index 000000000000..3b346cf42826
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/to-sortedhp/docs/types/index.d.ts
@@ -0,0 +1,308 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 { ArrayLike } from '@stdlib/types/array';
+import { NumericAndGenericDataType as DataType, typedndarray, realndarray, genericndarray } from '@stdlib/types/ndarray';
+
+/**
+* Input array.
+*/
+type InputArray = realndarray | genericndarray;
+
+/**
+* Output array.
+*/
+type OutputArray = realndarray | genericndarray;
+
+/**
+* Sort order.
+*/
+type SortOrder = typedndarray | genericndarray | number | 'descending' | 'desc' | 'ascending' | 'asc';
+
+/**
+* Interface defining "base" options.
+*/
+interface BaseOptions {
+ /**
+ * List of dimensions over which to perform operation.
+ */
+ dims?: ArrayLike;
+}
+
+/**
+* Interface defining options.
+*/
+interface Options extends BaseOptions {
+ /**
+ * Output ndarray data type.
+ */
+ dtype: DataType;
+}
+
+/**
+* Interface for performing an operation on an ndarray.
+*/
+interface ToSortedhp {
+ /**
+ * Returns a new ndarray containing the elements of an input ndarray sorted along one or more ndarray dimensions using heapsort.
+ *
+ * ## Notes
+ *
+ * - If `sortOrder < 0.0` or is either `'desc'` or `'descending'`, the input ndarray is sorted in **decreasing** order. If `sortOrder > 0.0` or is either `'asc'` or `'ascending'`, the input ndarray is sorted in **increasing** order. If `sortOrder == 0.0`, the input ndarray is left unchanged.
+ * - The algorithm distinguishes between `-0` and `+0`. When sorted in increasing order, `-0` is sorted before `+0`. When sorted in decreasing order, `-0` is sorted after `+0`.
+ * - The algorithm sorts `NaN` values to the end. When sorted in increasing order, `NaN` values are sorted last. When sorted in decreasing order, `NaN` values are sorted first.
+ * - The algorithm has space complexity `O(1)` and time complexity `O(N log2 N)`.
+ * - The algorithm is **unstable**, meaning that the algorithm may change the order of ndarray elements which are equal or equivalent (e.g., `NaN` values).
+ *
+ * @param x - input ndarray
+ * @param options - function options
+ * @returns output ndarray
+ *
+ * @example
+ * var ndarray2array = require( '@stdlib/ndarray/to-array' );
+ * var array = require( '@stdlib/ndarray/array' );
+ *
+ * var x = array( [ -1.0, 2.0, -3.0 ] );
+ *
+ * var y = toSortedhp( x );
+ * // returns
+ *
+ * var arr = ndarray2array( y );
+ * // returns [ -3.0, -1.0, 2.0 ]
+ */
+ ( x: T, options?: BaseOptions ): T;
+
+ /**
+ * Returns a new ndarray containing the elements of an input ndarray sorted along one or more ndarray dimensions using heapsort.
+ *
+ * ## Notes
+ *
+ * - If `sortOrder < 0.0` or is either `'desc'` or `'descending'`, the input ndarray is sorted in **decreasing** order. If `sortOrder > 0.0` or is either `'asc'` or `'ascending'`, the input ndarray is sorted in **increasing** order. If `sortOrder == 0.0`, the input ndarray is left unchanged.
+ * - The algorithm distinguishes between `-0` and `+0`. When sorted in increasing order, `-0` is sorted before `+0`. When sorted in decreasing order, `-0` is sorted after `+0`.
+ * - The algorithm sorts `NaN` values to the end. When sorted in increasing order, `NaN` values are sorted last. When sorted in decreasing order, `NaN` values are sorted first.
+ * - The algorithm has space complexity `O(1)` and time complexity `O(N log2 N)`.
+ * - The algorithm is **unstable**, meaning that the algorithm may change the order of ndarray elements which are equal or equivalent (e.g., `NaN` values).
+ *
+ * @param x - input ndarray
+ * @param options - function options
+ * @returns output ndarray
+ *
+ * @example
+ * var ndarray2array = require( '@stdlib/ndarray/to-array' );
+ * var array = require( '@stdlib/ndarray/array' );
+ *
+ * var x = array( [ -1.0, 2.0, -3.0 ] );
+ *
+ * var y = toSortedhp( x );
+ * // returns
+ *
+ * var arr = ndarray2array( y );
+ * // returns [ -3.0, -1.0, 2.0 ]
+ */
+ ( x: T, options?: Options ): U; // NOTE: we lose type specificity here. We can likely address this with type maps
+
+ /**
+ * Returns a new ndarray containing the elements of an input ndarray sorted along one or more ndarray dimensions using heapsort.
+ *
+ * ## Notes
+ *
+ * - If `sortOrder < 0.0` or is either `'desc'` or `'descending'`, the input ndarray is sorted in **decreasing** order. If `sortOrder > 0.0` or is either `'asc'` or `'ascending'`, the input ndarray is sorted in **increasing** order. If `sortOrder == 0.0`, the input ndarray is left unchanged.
+ * - The algorithm distinguishes between `-0` and `+0`. When sorted in increasing order, `-0` is sorted before `+0`. When sorted in decreasing order, `-0` is sorted after `+0`.
+ * - The algorithm sorts `NaN` values to the end. When sorted in increasing order, `NaN` values are sorted last. When sorted in decreasing order, `NaN` values are sorted first.
+ * - The algorithm has space complexity `O(1)` and time complexity `O(N log2 N)`.
+ * - The algorithm is **unstable**, meaning that the algorithm may change the order of ndarray elements which are equal or equivalent (e.g., `NaN` values).
+ *
+ * @param x - input ndarray
+ * @param sortOrder - sort order
+ * @param options - function options
+ * @returns output ndarray
+ *
+ * @example
+ * var ndarray2array = require( '@stdlib/ndarray/to-array' );
+ * var array = require( '@stdlib/ndarray/array' );
+ *
+ * var x = array( [ -1.0, 2.0, -3.0 ] );
+ *
+ * var y = toSortedhp( x, 1.0 );
+ * // returns
+ *
+ * var arr = ndarray2array( y );
+ * // returns [ -3.0, -1.0, 2.0 ]
+ */
+ ( x: T, sortOrder: SortOrder, options?: BaseOptions ): T;
+
+ /**
+ * Returns a new ndarray containing the elements of an input ndarray sorted along one or more ndarray dimensions using heapsort.
+ *
+ * ## Notes
+ *
+ * - If `sortOrder < 0.0` or is either `'desc'` or `'descending'`, the input ndarray is sorted in **decreasing** order. If `sortOrder > 0.0` or is either `'asc'` or `'ascending'`, the input ndarray is sorted in **increasing** order. If `sortOrder == 0.0`, the input ndarray is left unchanged.
+ * - The algorithm distinguishes between `-0` and `+0`. When sorted in increasing order, `-0` is sorted before `+0`. When sorted in decreasing order, `-0` is sorted after `+0`.
+ * - The algorithm sorts `NaN` values to the end. When sorted in increasing order, `NaN` values are sorted last. When sorted in decreasing order, `NaN` values are sorted first.
+ * - The algorithm has space complexity `O(1)` and time complexity `O(N log2 N)`.
+ * - The algorithm is **unstable**, meaning that the algorithm may change the order of ndarray elements which are equal or equivalent (e.g., `NaN` values).
+ *
+ * @param x - input ndarray
+ * @param sortOrder - sort order
+ * @param options - function options
+ * @returns output ndarray
+ *
+ * @example
+ * var ndarray2array = require( '@stdlib/ndarray/to-array' );
+ * var array = require( '@stdlib/ndarray/array' );
+ *
+ * var x = array( [ -1.0, 2.0, -3.0 ] );
+ *
+ * var y = toSortedhp( x, 1.0 );
+ * // returns
+ *
+ * var arr = ndarray2array( y );
+ * // returns [ -3.0, -1.0, 2.0 ]
+ */
+ ( x: T, sortOrder: SortOrder, options?: Options ): U; // NOTE: we lose type specificity here. We can likely address this with type maps
+
+ /**
+ * Sorts the elements in an input ndarray along along one or more ndarray dimensions using heapsort and assigns the results to an output ndarray.
+ *
+ * ## Notes
+ *
+ * - If `sortOrder < 0.0` or is either `'desc'` or `'descending'`, the input ndarray is sorted in **decreasing** order. If `sortOrder > 0.0` or is either `'asc'` or `'ascending'`, the input ndarray is sorted in **increasing** order. If `sortOrder == 0.0`, the input ndarray is left unchanged.
+ * - The algorithm distinguishes between `-0` and `+0`. When sorted in increasing order, `-0` is sorted before `+0`. When sorted in decreasing order, `-0` is sorted after `+0`.
+ * - The algorithm sorts `NaN` values to the end. When sorted in increasing order, `NaN` values are sorted last. When sorted in decreasing order, `NaN` values are sorted first.
+ * - The algorithm has space complexity `O(1)` and time complexity `O(N log2 N)`.
+ * - The algorithm is **unstable**, meaning that the algorithm may change the order of ndarray elements which are equal or equivalent (e.g., `NaN` values).
+ *
+ * @param x - input ndarray
+ * @param out - output ndarray
+ * @param options - function options
+ * @returns output ndarray
+ *
+ * @example
+ * var ndarray2array = require( '@stdlib/ndarray/to-array' );
+ * var zeros = require( '@stdlib/ndarray/zeros' );
+ * var array = require( '@stdlib/ndarray/array' );
+ *
+ * var x = array( [ -1.0, 2.0, -3.0 ] );
+ *
+ * var y = zeros( [ 3 ] );
+ *
+ * var out = toSortedhp.assign( x, y );
+ * // returns
+ *
+ * var arr = ndarray2array( out );
+ * // returns [ -3.0, -1.0, 2.0 ]
+ *
+ * var bool = ( out === y );
+ * // returns true
+ */
+ assign( x: T, out: U, options?: BaseOptions ): U;
+
+ /**
+ * Sorts the elements in an input ndarray along along one or more ndarray dimensions using heapsort and assigns the results to an output ndarray.
+ *
+ * ## Notes
+ *
+ * - If `sortOrder < 0.0` or is either `'desc'` or `'descending'`, the input ndarray is sorted in **decreasing** order. If `sortOrder > 0.0` or is either `'asc'` or `'ascending'`, the input ndarray is sorted in **increasing** order. If `sortOrder == 0.0`, the input ndarray is left unchanged.
+ * - The algorithm distinguishes between `-0` and `+0`. When sorted in increasing order, `-0` is sorted before `+0`. When sorted in decreasing order, `-0` is sorted after `+0`.
+ * - The algorithm sorts `NaN` values to the end. When sorted in increasing order, `NaN` values are sorted last. When sorted in decreasing order, `NaN` values are sorted first.
+ * - The algorithm has space complexity `O(1)` and time complexity `O(N log2 N)`.
+ * - The algorithm is **unstable**, meaning that the algorithm may change the order of ndarray elements which are equal or equivalent (e.g., `NaN` values).
+ *
+ * @param x - input ndarray
+ * @param out - output ndarray
+ * @param sortOrder - sort order
+ * @param options - function options
+ * @returns output ndarray
+ *
+ * @example
+ * var ndarray2array = require( '@stdlib/ndarray/to-array' );
+ * var zeros = require( '@stdlib/ndarray/zeros' );
+ * var array = require( '@stdlib/ndarray/array' );
+ *
+ * var x = array( [ -1.0, 2.0, -3.0 ] );
+ *
+ * var y = zeros( [ 3 ] );
+ *
+ * var out = toSortedhp.assign( x, y, 1);
+ * // returns
+ *
+ * var arr = ndarray2array( out );
+ * // returns [ -3.0, -1.0, 2.0 ]
+ *
+ * var bool = ( out === y );
+ * // returns true
+ */
+ assign( x: T, out: U, sortOrder: SortOrder, options?: BaseOptions ): U;
+}
+
+/**
+* Returns a new ndarray with the elements of an input ndarray sorted along one or more ndarray dimensions using heapsort.
+*
+* ## Notes
+*
+* - If `sortOrder < 0.0` or is either `'desc'` or `'descending'`, the input ndarray is sorted in **decreasing** order. If `sortOrder > 0.0` or is either `'asc'` or `'ascending'`, the input ndarray is sorted in **increasing** order. If `sortOrder == 0.0`, the input ndarray is left unchanged.
+* - The algorithm distinguishes between `-0` and `+0`. When sorted in increasing order, `-0` is sorted before `+0`. When sorted in decreasing order, `-0` is sorted after `+0`.
+* - The algorithm sorts `NaN` values to the end. When sorted in increasing order, `NaN` values are sorted last. When sorted in decreasing order, `NaN` values are sorted first.
+* - The algorithm has space complexity `O(1)` and time complexity `O(N log2 N)`.
+* - The algorithm is **unstable**, meaning that the algorithm may change the order of ndarray elements which are equal or equivalent (e.g., `NaN` values).
+*
+* @param x - input ndarray
+* @param sortOrder - sort order
+* @param options - function options
+* @returns output ndarray
+*
+* @example
+* var ndarray2array = require( '@stdlib/ndarray/to-array' );
+* var array = require( '@stdlib/ndarray/array' );
+*
+* var x = array( [ -1.0, 2.0, -3.0 ] );
+*
+* var y = toSortedhp( x, 1.0 );
+* // returns
+*
+* var arr = ndarray2array( y );
+* // returns [ -3.0, -1.0, 2.0 ]
+*
+* @example
+* var ndarray2array = require( '@stdlib/ndarray/to-array' );
+* var zeros = require( '@stdlib/ndarray/zeros' );
+* var array = require( '@stdlib/ndarray/array' );
+*
+* var x = array( [ -1.0, 2.0, -3.0 ] );
+*
+* var y = zeros( [ 3 ] );
+*
+* var out = toSortedhp.assign( x, y );
+* // returns
+*
+* var arr = ndarray2array( out );
+* // returns [ -3.0, -1.0, 2.0 ]
+*
+* var bool = ( out === y );
+* // returns true
+*/
+declare const toSortedhp: ToSortedhp;
+
+
+// EXPORTS //
+
+export = toSortedhp;
diff --git a/lib/node_modules/@stdlib/blas/ext/to-sortedhp/docs/types/test.ts b/lib/node_modules/@stdlib/blas/ext/to-sortedhp/docs/types/test.ts
new file mode 100644
index 000000000000..c7df2a032736
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/to-sortedhp/docs/types/test.ts
@@ -0,0 +1,363 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 toSortedhp = require( './index' );
+
+
+// TESTS //
+
+// The function returns an ndarray...
+{
+ const x = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+
+ toSortedhp( x ); // $ExpectType float64ndarray
+ toSortedhp( x, 1.0 ); // $ExpectType float64ndarray
+ toSortedhp( x, {} ); // $ExpectType float64ndarray
+ toSortedhp( x, 1.0, {} ); // $ExpectType float64ndarray
+}
+
+// The compiler throws an error if the function is provided a first argument which is not an ndarray...
+{
+ toSortedhp( '5' ); // $ExpectError
+ toSortedhp( 5 ); // $ExpectError
+ toSortedhp( true ); // $ExpectError
+ toSortedhp( false ); // $ExpectError
+ toSortedhp( null ); // $ExpectError
+ toSortedhp( void 0 ); // $ExpectError
+ toSortedhp( {} ); // $ExpectError
+ toSortedhp( ( x: number ): number => x ); // $ExpectError
+
+ toSortedhp( '5', 1.0 ); // $ExpectError
+ toSortedhp( 5, 1.0 ); // $ExpectError
+ toSortedhp( true, 1.0 ); // $ExpectError
+ toSortedhp( false, 1.0 ); // $ExpectError
+ toSortedhp( null, 1.0 ); // $ExpectError
+ toSortedhp( void 0, 1.0 ); // $ExpectError
+ toSortedhp( {}, 1.0 ); // $ExpectError
+ toSortedhp( ( x: number ): number => x, 1.0 ); // $ExpectError
+
+ toSortedhp( '5', {} ); // $ExpectError
+ toSortedhp( 5, {} ); // $ExpectError
+ toSortedhp( true, {} ); // $ExpectError
+ toSortedhp( false, {} ); // $ExpectError
+ toSortedhp( null, {} ); // $ExpectError
+ toSortedhp( void 0, {} ); // $ExpectError
+ toSortedhp( {}, {} ); // $ExpectError
+ toSortedhp( ( x: number ): number => x, {} ); // $ExpectError
+
+ toSortedhp( '5', 1.0, {} ); // $ExpectError
+ toSortedhp( 5, 1.0, {} ); // $ExpectError
+ toSortedhp( true, 1.0, {} ); // $ExpectError
+ toSortedhp( false, 1.0, {} ); // $ExpectError
+ toSortedhp( null, 1.0, {} ); // $ExpectError
+ toSortedhp( void 0, 1.0, {} ); // $ExpectError
+ toSortedhp( {}, 1.0, {} ); // $ExpectError
+ toSortedhp( ( x: number ): number => x, 1.0, {} ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a sort order argument which is not an ndarray, supported string literal, or scalar value...
+{
+ const x = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+
+ toSortedhp( x, true ); // $ExpectError
+ toSortedhp( x, false ); // $ExpectError
+ toSortedhp( x, [] ); // $ExpectError
+ toSortedhp( x, ( x: number ): number => x ); // $ExpectError
+
+ toSortedhp( x, 'foo', {} ); // $ExpectError
+ toSortedhp( x, true, {} ); // $ExpectError
+ toSortedhp( x, false, {} ); // $ExpectError
+ toSortedhp( x, null, {} ); // $ExpectError
+ toSortedhp( x, void 0, {} ); // $ExpectError
+ toSortedhp( x, [], {} ); // $ExpectError
+ toSortedhp( x, {}, {} ); // $ExpectError
+ toSortedhp( x, ( x: number ): number => x, {} ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a options argument which is not an object...
+{
+ const x = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+
+ toSortedhp( x, true ); // $ExpectError
+ toSortedhp( x, false ); // $ExpectError
+ toSortedhp( x, [] ); // $ExpectError
+ toSortedhp( x, ( x: number ): number => x ); // $ExpectError
+
+ toSortedhp( x, 1.0, '5' ); // $ExpectError
+ toSortedhp( x, 1.0, true ); // $ExpectError
+ toSortedhp( x, 1.0, false ); // $ExpectError
+ toSortedhp( x, 1.0, null ); // $ExpectError
+ toSortedhp( x, 1.0, [] ); // $ExpectError
+ toSortedhp( x, 1.0, ( x: number ): number => x ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an invalid `dtype` option...
+{
+ const x = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+
+ toSortedhp( x, { 'dtype': '5' } ); // $ExpectError
+ toSortedhp( x, { 'dtype': 5 } ); // $ExpectError
+ toSortedhp( x, { 'dtype': true } ); // $ExpectError
+ toSortedhp( x, { 'dtype': false } ); // $ExpectError
+ toSortedhp( x, { 'dtype': null } ); // $ExpectError
+ toSortedhp( x, { 'dtype': [] } ); // $ExpectError
+ toSortedhp( x, { 'dtype': {} } ); // $ExpectError
+ toSortedhp( x, { 'dtype': ( x: number ): number => x } ); // $ExpectError
+
+ toSortedhp( x, 1.0, { 'dtype': '5' } ); // $ExpectError
+ toSortedhp( x, 1.0, { 'dtype': 5 } ); // $ExpectError
+ toSortedhp( x, 1.0, { 'dtype': true } ); // $ExpectError
+ toSortedhp( x, 1.0, { 'dtype': false } ); // $ExpectError
+ toSortedhp( x, 1.0, { 'dtype': null } ); // $ExpectError
+ toSortedhp( x, 1.0, { 'dtype': [] } ); // $ExpectError
+ toSortedhp( x, 1.0, { 'dtype': {} } ); // $ExpectError
+ toSortedhp( x, 1.0, { 'dtype': ( x: number ): number => x } ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an invalid `dims` option...
+{
+ const x = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+
+ toSortedhp( x, { 'dims': '5' } ); // $ExpectError
+ toSortedhp( x, { 'dims': 5 } ); // $ExpectError
+ toSortedhp( x, { 'dims': true } ); // $ExpectError
+ toSortedhp( x, { 'dims': false } ); // $ExpectError
+ toSortedhp( x, { 'dims': null } ); // $ExpectError
+ toSortedhp( x, { 'dims': {} } ); // $ExpectError
+ toSortedhp( x, { 'dims': ( x: number ): number => x } ); // $ExpectError
+
+ toSortedhp( x, 1.0, { 'dims': '5' } ); // $ExpectError
+ toSortedhp( x, 1.0, { 'dims': 5 } ); // $ExpectError
+ toSortedhp( x, 1.0, { 'dims': true } ); // $ExpectError
+ toSortedhp( x, 1.0, { 'dims': false } ); // $ExpectError
+ toSortedhp( x, 1.0, { 'dims': null } ); // $ExpectError
+ toSortedhp( x, 1.0, { 'dims': {} } ); // $ExpectError
+ toSortedhp( x, 1.0, { 'dims': ( x: number ): number => x } ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an unsupported number of arguments...
+{
+ const x = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+
+ toSortedhp(); // $ExpectError
+ toSortedhp( x, 10.0, {}, {} ); // $ExpectError
+}
+
+// Attached to the function is an `assign` method which returns an ndarray...
+{
+ const x = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+ const y = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+
+ toSortedhp.assign( x, y ); // $ExpectType float64ndarray
+ toSortedhp.assign( x, y, 1.0 ); // $ExpectType float64ndarray
+ toSortedhp.assign( x, y, {} ); // $ExpectType float64ndarray
+ toSortedhp.assign( x, y, 1.0, {} ); // $ExpectType float64ndarray
+}
+
+// The compiler throws an error if the `assign` method is provided a first argument which is not an ndarray...
+{
+ const y = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+
+ toSortedhp.assign( '5', y ); // $ExpectError
+ toSortedhp.assign( 5, y ); // $ExpectError
+ toSortedhp.assign( true, y ); // $ExpectError
+ toSortedhp.assign( false, y ); // $ExpectError
+ toSortedhp.assign( null, y ); // $ExpectError
+ toSortedhp.assign( void 0, y ); // $ExpectError
+ toSortedhp.assign( {}, y ); // $ExpectError
+ toSortedhp.assign( ( x: number ): number => x, y ); // $ExpectError
+
+ toSortedhp.assign( '5', y, 1.0 ); // $ExpectError
+ toSortedhp.assign( 5, y, 1.0 ); // $ExpectError
+ toSortedhp.assign( true, y, 1.0 ); // $ExpectError
+ toSortedhp.assign( false, y, 1.0 ); // $ExpectError
+ toSortedhp.assign( null, y, 1.0 ); // $ExpectError
+ toSortedhp.assign( void 0, y, 1.0 ); // $ExpectError
+ toSortedhp.assign( {}, y, 1.0 ); // $ExpectError
+ toSortedhp.assign( ( x: number ): number => x, y, 1.0 ); // $ExpectError
+
+ toSortedhp.assign( '5', y, {} ); // $ExpectError
+ toSortedhp.assign( 5, y, {} ); // $ExpectError
+ toSortedhp.assign( true, y, {} ); // $ExpectError
+ toSortedhp.assign( false, y, {} ); // $ExpectError
+ toSortedhp.assign( null, y, {} ); // $ExpectError
+ toSortedhp.assign( void 0, y, {} ); // $ExpectError
+ toSortedhp.assign( {}, y, {} ); // $ExpectError
+ toSortedhp.assign( ( x: number ): number => x, y, {} ); // $ExpectError
+
+ toSortedhp.assign( '5', y, 1.0, {} ); // $ExpectError
+ toSortedhp.assign( 5, y, 1.0, {} ); // $ExpectError
+ toSortedhp.assign( true, y, 1.0, {} ); // $ExpectError
+ toSortedhp.assign( false, y, 1.0, {} ); // $ExpectError
+ toSortedhp.assign( null, y, 1.0, {} ); // $ExpectError
+ toSortedhp.assign( void 0, y, 1.0, {} ); // $ExpectError
+ toSortedhp.assign( {}, y, 1.0, {} ); // $ExpectError
+ toSortedhp.assign( ( x: number ): number => x, y, 1.0, {} ); // $ExpectError
+}
+
+// The compiler throws an error if the `assign` method is provided a second argument which is not an ndarray...
+{
+ const x = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+
+ toSortedhp.assign( x, '5' ); // $ExpectError
+ toSortedhp.assign( x, 5 ); // $ExpectError
+ toSortedhp.assign( x, true ); // $ExpectError
+ toSortedhp.assign( x, false ); // $ExpectError
+ toSortedhp.assign( x, null ); // $ExpectError
+ toSortedhp.assign( x, void 0 ); // $ExpectError
+ toSortedhp.assign( x, {} ); // $ExpectError
+ toSortedhp.assign( x, ( x: number ): number => x ); // $ExpectError
+
+ toSortedhp.assign( x, '5', 1.0 ); // $ExpectError
+ toSortedhp.assign( x, 5, 1.0 ); // $ExpectError
+ toSortedhp.assign( x, true, 1.0 ); // $ExpectError
+ toSortedhp.assign( x, false, 1.0 ); // $ExpectError
+ toSortedhp.assign( x, null, 1.0 ); // $ExpectError
+ toSortedhp.assign( x, void 0, 1.0 ); // $ExpectError
+ toSortedhp.assign( x, {}, 1.0 ); // $ExpectError
+ toSortedhp.assign( x, ( x: number ): number => x, 1.0 ); // $ExpectError
+
+ toSortedhp.assign( x, '5', {} ); // $ExpectError
+ toSortedhp.assign( x, 5, {} ); // $ExpectError
+ toSortedhp.assign( x, true, {} ); // $ExpectError
+ toSortedhp.assign( x, false, {} ); // $ExpectError
+ toSortedhp.assign( x, null, {} ); // $ExpectError
+ toSortedhp.assign( x, void 0, {} ); // $ExpectError
+ toSortedhp.assign( x, {}, {} ); // $ExpectError
+ toSortedhp.assign( x, ( x: number ): number => x, {} ); // $ExpectError
+
+ toSortedhp.assign( x, '5', 1.0, {} ); // $ExpectError
+ toSortedhp.assign( x, 5, 1.0, {} ); // $ExpectError
+ toSortedhp.assign( x, true, 1.0, {} ); // $ExpectError
+ toSortedhp.assign( x, false, 1.0, {} ); // $ExpectError
+ toSortedhp.assign( x, null, 1.0, {} ); // $ExpectError
+ toSortedhp.assign( x, void 0, 1.0, {} ); // $ExpectError
+ toSortedhp.assign( x, {}, 1.0, {} ); // $ExpectError
+ toSortedhp.assign( x, ( x: number ): number => x, 1.0, {} ); // $ExpectError
+}
+
+// The compiler throws an error if the `assign` method is provided a sort order argument which is not an ndarray, supported string literal, or scalar value...
+{
+ const x = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+ const y = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+
+ toSortedhp.assign( x, y, true ); // $ExpectError
+ toSortedhp.assign( x, y, false ); // $ExpectError
+ toSortedhp.assign( x, y, [] ); // $ExpectError
+ toSortedhp.assign( x, y, ( x: number ): number => x ); // $ExpectError
+
+ toSortedhp.assign( x, y, 'foo', {} ); // $ExpectError
+ toSortedhp.assign( x, y, true, {} ); // $ExpectError
+ toSortedhp.assign( x, y, false, {} ); // $ExpectError
+ toSortedhp.assign( x, y, null, {} ); // $ExpectError
+ toSortedhp.assign( x, y, void 0, {} ); // $ExpectError
+ toSortedhp.assign( x, y, [], {} ); // $ExpectError
+ toSortedhp.assign( x, y, {}, {} ); // $ExpectError
+ toSortedhp.assign( x, y, ( x: number ): number => x, {} ); // $ExpectError
+}
+
+// The compiler throws an error if the `assign` method is provided a options argument which is not an object...
+{
+ const x = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+ const y = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+
+ toSortedhp.assign( x, y, true ); // $ExpectError
+ toSortedhp.assign( x, y, false ); // $ExpectError
+ toSortedhp.assign( x, y, [] ); // $ExpectError
+ toSortedhp.assign( x, y, ( x: number ): number => x ); // $ExpectError
+
+ toSortedhp.assign( x, y, 1.0, '5' ); // $ExpectError
+ toSortedhp.assign( x, y, 1.0, true ); // $ExpectError
+ toSortedhp.assign( x, y, 1.0, false ); // $ExpectError
+ toSortedhp.assign( x, y, 1.0, null ); // $ExpectError
+ toSortedhp.assign( x, y, 1.0, [] ); // $ExpectError
+ toSortedhp.assign( x, y, 1.0, ( x: number ): number => x ); // $ExpectError
+}
+
+// The compiler throws an error if the `assign` method is provided an invalid `dims` option...
+{
+ const x = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+ const y = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+
+ toSortedhp.assign( x, y, { 'dims': '5' } ); // $ExpectError
+ toSortedhp.assign( x, y, { 'dims': 5 } ); // $ExpectError
+ toSortedhp.assign( x, y, { 'dims': true } ); // $ExpectError
+ toSortedhp.assign( x, y, { 'dims': false } ); // $ExpectError
+ toSortedhp.assign( x, y, { 'dims': null } ); // $ExpectError
+ toSortedhp.assign( x, y, { 'dims': {} } ); // $ExpectError
+ toSortedhp.assign( x, y, { 'dims': ( x: number ): number => x } ); // $ExpectError
+
+ toSortedhp.assign( x, y, 1.0, { 'dims': '5' } ); // $ExpectError
+ toSortedhp.assign( x, y, 1.0, { 'dims': 5 } ); // $ExpectError
+ toSortedhp.assign( x, y, 1.0, { 'dims': true } ); // $ExpectError
+ toSortedhp.assign( x, y, 1.0, { 'dims': false } ); // $ExpectError
+ toSortedhp.assign( x, y, 1.0, { 'dims': null } ); // $ExpectError
+ toSortedhp.assign( x, y, 1.0, { 'dims': {} } ); // $ExpectError
+ toSortedhp.assign( x, y, 1.0, { 'dims': ( x: number ): number => x } ); // $ExpectError
+}
+
+// The compiler throws an error if the `assign` method is provided an unsupported number of arguments...
+{
+ const x = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+ const y = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+
+ toSortedhp.assign(); // $ExpectError
+ toSortedhp.assign( x ); // $ExpectError
+ toSortedhp.assign( x, y, 10.0, {}, {} ); // $ExpectError
+}
diff --git a/lib/node_modules/@stdlib/blas/ext/to-sortedhp/examples/index.js b/lib/node_modules/@stdlib/blas/ext/to-sortedhp/examples/index.js
new file mode 100644
index 000000000000..f43a4b7e26ca
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/to-sortedhp/examples/index.js
@@ -0,0 +1,41 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var ndarray2array = require( '@stdlib/ndarray/to-array' );
+var ndarray = require( '@stdlib/ndarray/ctor' );
+var toSortedhp = require( './../lib' );
+
+// Generate an array of random numbers:
+var xbuf = discreteUniform( 25, -20, 20, {
+ 'dtype': 'generic'
+});
+
+// Wrap in an ndarray:
+var x = new ndarray( 'generic', xbuf, [ 5, 5 ], [ 5, 1 ], 0, 'row-major' );
+console.log( ndarray2array( x ) );
+
+// Perform operation:
+var out = toSortedhp( x, {
+ 'dims': [ 0 ]
+});
+
+// Print the results:
+console.log( ndarray2array( out ) );
diff --git a/lib/node_modules/@stdlib/blas/ext/to-sortedhp/lib/assign.js b/lib/node_modules/@stdlib/blas/ext/to-sortedhp/lib/assign.js
new file mode 100644
index 000000000000..4c95fe280200
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/to-sortedhp/lib/assign.js
@@ -0,0 +1,116 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );
+var isMostlySafeCast = require( '@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast' );
+var resolveStr = require( '@stdlib/ndarray/base/dtype-resolve-str' );
+var copy = require( '@stdlib/ndarray/base/assign' );
+var getDType = require( '@stdlib/ndarray/dtype' );
+var sorthp = require( '@stdlib/blas/ext/sorthp' );
+var format = require( '@stdlib/string/format' );
+
+
+// MAIN //
+
+/**
+* Sorts the elements of an input ndarray along one or more ndarray dimensions using heapsort and assigns the results to an output ndarray.
+*
+* @param {ndarrayLike} x - input ndarray
+* @param {ndarrayLike} y - output ndarray
+* @param {(ndarrayLike|number|string)} [sortOrder=1.0] - sort order
+* @param {Options} [options] - function options
+* @param {IntegerArray} [options.dims] - list of dimensions over which to perform operation
+* @throws {TypeError} first argument must be an ndarray-like object
+* @throws {TypeError} second argument must be an ndarray-like object
+* @throws {TypeError} sort order argument must be either an ndarray-like object, a numeric value, or a supported string
+* @throws {TypeError} options argument must be an object
+* @throws {RangeError} dimension indices must not exceed input ndarray bounds
+* @throws {RangeError} number of dimension indices must not exceed the number of input ndarray dimensions
+* @throws {TypeError} first argument cannot be safely cast to the data type of the second argument
+* @throws {Error} must provide valid options
+* @returns {ndarray} output ndarray
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+* var ndarray2array = require( '@stdlib/ndarray/to-array' );
+* var zeros = require( '@stdlib/ndarray/zeros' );
+* var ndarray = require( '@stdlib/ndarray/ctor' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, -3.0, 4.0, -5.0, 6.0 ] );
+*
+* // Define the shape of the input array:
+* var sh = [ 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 2, 2, 1 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray:
+* var x = new ndarray( 'float64', xbuf, sh, sx, ox, 'row-major' );
+*
+* // Create an output ndarray;
+* var y = zeros( sh );
+*
+* // Perform operation:
+* var out = assign( x, y );
+* // returns
+*
+* var arr = ndarray2array( out );
+* // returns [ [ [ -5.0, -3.0 ] ], [ [ 1.0, 2.0 ] ], [ [ 4.0, 6.0 ] ] ]
+*
+* var bool = ( y === out );
+* // returns true
+*/
+function assign( x, y ) {
+ var nargs;
+ var xdt;
+ var ydt;
+ if ( !isndarrayLike( x ) ) {
+ throw new TypeError( format( 'invalid argument. First argument must be an ndarray-like object. Value: `%s`.', x ) );
+ }
+ if ( !isndarrayLike( y ) ) {
+ throw new TypeError( format( 'invalid argument. Second argument must be an ndarray-like object. Value: `%s`.', y ) );
+ }
+ xdt = getDType( x );
+ ydt = getDType( y );
+ if ( !isMostlySafeCast( xdt, ydt ) ) {
+ throw new TypeError( format( 'invalid argument. First argument cannot be safely cast to the output data type. Data types: [%s, %s].', resolveStr( xdt ), resolveStr( ydt ) ) );
+ }
+ nargs = arguments.length;
+ copy( [ x, y ] );
+ if ( nargs <= 2 ) {
+ return sorthp( y );
+ }
+ if ( nargs === 3 ) {
+ return sorthp( y, arguments[ 2 ] );
+ }
+ // nargs > 3
+ return sorthp( y, arguments[ 2 ], arguments[ 3 ] );
+}
+
+
+// EXPORTS //
+
+module.exports = assign;
diff --git a/lib/node_modules/@stdlib/blas/ext/to-sortedhp/lib/index.js b/lib/node_modules/@stdlib/blas/ext/to-sortedhp/lib/index.js
new file mode 100644
index 000000000000..2662601a5a6d
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/to-sortedhp/lib/index.js
@@ -0,0 +1,106 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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';
+
+/**
+* Return a new ndarray containing the elements of an input ndarray sorted along one or more ndarray dimensions using heapsort.
+*
+* @module @stdlib/blas/ext/to-sortedhp
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+* var ndarray = require( '@stdlib/ndarray/ctor' );
+* var ndarray2array = require( '@stdlib/ndarray/to-array' );
+* var toSortedhp = require( '@stdlib/blas/ext/to-sortedhp' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, -3.0, 4.0, -5.0, 6.0 ] );
+*
+* // Define the shape of the input array:
+* var sh = [ 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 2, 2, 1 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray:
+* var x = new ndarray( 'float64', xbuf, sh, sx, ox, 'row-major' );
+*
+* // Perform operation:
+* var out = toSortedhp( x );
+* // returns
+*
+* var arr = ndarray2array( out );
+* // returns [ [ [ -5.0, -3.0 ] ], [ [ 1.0, 2.0 ] ], [ [ 4.0, 6.0 ] ] ]
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+* var ndarray2array = require( '@stdlib/ndarray/to-array' );
+* var zeros = require( '@stdlib/ndarray/zeros' );
+* var ndarray = require( '@stdlib/ndarray/ctor' );
+* var toSortedhp = require( '@stdlib/blas/ext/to-sortedhp' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, -3.0, 4.0, -5.0, 6.0 ] );
+*
+* // Define the shape of the input array:
+* var sh = [ 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 2, 2, 1 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray:
+* var x = new ndarray( 'float64', xbuf, sh, sx, ox, 'row-major' );
+*
+* // Create an output ndarray;
+* var y = zeros( sh );
+*
+* // Perform operation:
+* var out = toSortedhp.assign( x, y );
+* // returns
+*
+* var arr = ndarray2array( out );
+* // returns [ [ [ -5.0, -3.0 ] ], [ [ 1.0, 2.0 ] ], [ [ 4.0, 6.0 ] ] ]
+*
+* var bool = ( y === out );
+* // returns true
+*/
+
+// MODULES //
+
+var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );
+var main = require( './main.js' );
+var assign = require( './assign.js' );
+
+
+// MAIN //
+
+setReadOnly( main, 'assign', assign );
+
+
+// EXPORTS //
+
+module.exports = main;
+
+// exports: { "assign": "main.assign" }
diff --git a/lib/node_modules/@stdlib/blas/ext/to-sortedhp/lib/main.js b/lib/node_modules/@stdlib/blas/ext/to-sortedhp/lib/main.js
new file mode 100644
index 000000000000..2a202baa42cd
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/to-sortedhp/lib/main.js
@@ -0,0 +1,150 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 hasOwnProp = require( '@stdlib/assert/has-own-property' );
+var isPlainObject = require( '@stdlib/assert/is-plain-object' );
+var isNumber = require( '@stdlib/assert/is-number' ).isPrimitive;
+var isString = require( '@stdlib/assert/is-string' ).isPrimitive;
+var isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );
+var isMostlySafeCast = require( '@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast' );
+var getDType = require( '@stdlib/ndarray/dtype' );
+var getShape = require( '@stdlib/ndarray/shape' );
+var getOrder = require( '@stdlib/ndarray/order' );
+var empty = require( '@stdlib/ndarray/empty' );
+var assign = require( '@stdlib/ndarray/base/assign' );
+var resolveStr = require( '@stdlib/ndarray/base/dtype-resolve-str' );
+var sorthp = require( '@stdlib/blas/ext/sorthp' );
+var format = require( '@stdlib/string/format' );
+
+
+// MAIN //
+
+/**
+* Returns a new ndarray containing the elements of an input ndarray sorted along one or more ndarray dimensions using heapsort.
+*
+* @param {ndarrayLike} x - input ndarray
+* @param {(ndarrayLike|number|string)} [sortOrder=1.0] - sort order
+* @param {Options} [options] - function options
+* @param {IntegerArray} [options.dims] - list of dimensions over which to perform operation
+* @param {*} [options.dtype] - output ndarray data type
+* @throws {TypeError} first argument must be an ndarray-like object
+* @throws {TypeError} sort order argument must be either an ndarray-like object, a numeric value, or a supported string
+* @throws {TypeError} options argument must be an object
+* @throws {RangeError} dimension indices must not exceed input ndarray bounds
+* @throws {RangeError} number of dimension indices must not exceed the number of input ndarray dimensions
+* @throws {Error} must provide valid options
+* @returns {ndarray} output ndarray
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+* var ndarray2array = require( '@stdlib/ndarray/to-array' );
+* var ndarray = require( '@stdlib/ndarray/ctor' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, -3.0, 4.0, -5.0, 6.0 ] );
+*
+* // Define the shape of the input array:
+* var sh = [ 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 2, 2, 1 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray:
+* var x = new ndarray( 'float64', xbuf, sh, sx, ox, 'row-major' );
+*
+* // Perform operation:
+* var out = toSortedhp( x );
+* // returns
+*
+* var arr = ndarray2array( out );
+* // returns [ [ [ -5, -3 ] ], [ [ 1, 2 ] ], [ [ 4, 6 ] ] ]
+*/
+function toSortedhp( x ) {
+ var sortOrder;
+ var options;
+ var nargs;
+ var xdt;
+ var ydt;
+ var y;
+ var o;
+
+ if ( !isndarrayLike( x ) ) {
+ throw new TypeError( format( 'invalid argument. First argument must be an ndarray-like object. Value: `%s`.', x ) );
+ }
+ nargs = arguments.length;
+ o = arguments[ 1 ];
+
+ // Case: toSortedhp( x )
+ if ( nargs < 2 ) {
+ sortOrder = 1;
+ }
+ // Case: toSortedhp( x, ??? )
+ else if ( nargs === 2 ) {
+ // Case: toSortedhp( x, sortOrder_string || sortOrder_scalar || sortOrder_ndarray ) )
+ if ( isString( o ) || isNumber( o ) || isndarrayLike( o ) ) {
+ sortOrder = o;
+ }
+ // Case: toSortedhp( x, options )
+ else {
+ sortOrder = 1;
+ options = o;
+ if ( !isPlainObject( options ) ) {
+ throw new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );
+ }
+ }
+ }
+ // Case: toSortedhp( x, sortOrder, options )
+ else if ( nargs >= 3 ) {
+ sortOrder = o;
+ options = arguments[ 2 ];
+ if ( !isPlainObject( options ) ) {
+ throw new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );
+ }
+ }
+ xdt = getDType( x );
+ if ( hasOwnProp( options, 'dtype' ) ) {
+ ydt = options.dtype;
+ if ( !isMostlySafeCast( xdt, ydt ) ) {
+ throw new TypeError( format( 'invalid argument. First argument cannot be safely cast to the output data type. Data types: [%s, %s].', resolveStr( xdt ), resolveStr( ydt ) ) );
+ }
+ } else {
+ ydt = xdt;
+ }
+ // Create an output ndarray:
+ y = empty( getShape( x ), {
+ 'dtype': ydt,
+ 'order': getOrder( x )
+ });
+
+ // Copy elements from the input ndarray to the output ndarray:
+ assign( [ x, y ] );
+
+ return sorthp( y, sortOrder, options || {} );
+}
+
+
+// EXPORTS //
+
+module.exports = toSortedhp;
diff --git a/lib/node_modules/@stdlib/blas/ext/to-sortedhp/package.json b/lib/node_modules/@stdlib/blas/ext/to-sortedhp/package.json
new file mode 100644
index 000000000000..18b27dc6b1cf
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/to-sortedhp/package.json
@@ -0,0 +1,64 @@
+{
+ "name": "@stdlib/blas/ext/to-sortedhp",
+ "version": "0.0.0",
+ "description": "Return a new ndarray containing the elements of an input ndarray sorted along one or more ndarray dimensions using heapsort.",
+ "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",
+ "statistics",
+ "stats",
+ "mathematics",
+ "math",
+ "arrange",
+ "sort",
+ "sorted",
+ "ndarray"
+ ],
+ "__stdlib__": {}
+}
diff --git a/lib/node_modules/@stdlib/blas/ext/to-sortedhp/test/test.assign.js b/lib/node_modules/@stdlib/blas/ext/to-sortedhp/test/test.assign.js
new file mode 100644
index 000000000000..3e8c5d23e391
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/to-sortedhp/test/test.assign.js
@@ -0,0 +1,1974 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 ndarray = require( '@stdlib/ndarray/ctor' );
+var zeros = require( '@stdlib/ndarray/zeros' );
+var ndarray2array = require( '@stdlib/ndarray/to-array' );
+var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' );
+var assign = require( './../lib/assign.js' );
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof assign, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function throws an error if provided a first argument which is not an ndarray-like object', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( value, zeros( [ 2, 2 ] ) );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a first argument which is not an ndarray-like object (sortOrder=scalar)', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( value, zeros( [ 2, 2 ] ), 1.0 );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a first argument which is not an ndarray-like object (sortOrder=ndarray)', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( value, zeros( [ 2, 2 ] ), scalar2ndarray( 1.0 ) );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a first argument which is not an ndarray-like object (options)', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( value, zeros( [ 2, 2 ] ), {} );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a first argument which is not an ndarray-like object (sortOrder=scalar, options)', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( value, zeros( [ 2, 2 ] ), 1.0, {} );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a first argument which is not an ndarray-like object (sortOrder=ndarray, options)', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( value, zeros( [ 2, 2 ] ), scalar2ndarray( 1.0 ), {} );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a first argument which does not have a supported data type', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ zeros( [ 2, 2 ], {
+ 'dtype': 'bool'
+ })
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( value, zeros( [ 2, 2 ] ) );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a first argument which does not have a supported data type (options)', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ zeros( [ 2, 2 ], {
+ 'dtype': 'bool'
+ })
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( value, zeros( [ 2, 2 ] ), {} );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a first argument which does not have a supported data type (sortOrder=scalar)', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ zeros( [ 2, 2 ], {
+ 'dtype': 'bool'
+ })
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( value, zeros( [ 2, 2 ] ), 1.0 );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a first argument which does not have a supported data type (sortOrder=ndarray)', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ zeros( [ 2, 2 ], {
+ 'dtype': 'bool'
+ })
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( value, zeros( [ 2, 2 ] ), scalar2ndarray( 1.0 ) );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a first argument which does not have a supported data type (sortOrder=scalar, options)', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ zeros( [ 2, 2 ], {
+ 'dtype': 'bool'
+ })
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( value, zeros( [ 2, 2 ] ), 1.0, {} );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a first argument which does not have a supported data type (sortOrder=ndarray, options)', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ zeros( [ 2, 2 ], {
+ 'dtype': 'bool'
+ })
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( value, zeros( [ 2, 2 ] ), scalar2ndarray( 1.0 ), {} );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a second argument which is not an ndarray-like object', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( zeros( [ 2, 2 ] ), value );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a second argument which is not an ndarray-like object (sortOrder=scalar)', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( zeros( [ 2, 2 ] ), value, 1.0 );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a second argument which is not an ndarray-like object (sortOrder=ndarray)', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( zeros( [ 2, 2 ] ), value, scalar2ndarray( 1.0 ) );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a second argument which is not an ndarray-like object (options)', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( zeros( [ 2, 2 ] ), value, {} );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a second argument which is not an ndarray-like object (sortOrder=scalar, options)', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( zeros( [ 2, 2 ] ), value, 1.0, {} );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a second argument which is not an ndarray-like object (sortOrder=ndarray, options)', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( zeros( [ 2, 2 ] ), value, scalar2ndarray( 1.0 ), {} );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a second argument which does not have a supported data type', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ zeros( [ 2, 2 ], {
+ 'dtype': 'bool'
+ })
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( zeros( [ 2, 2 ] ), value );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a second argument which does not have a supported data type (options)', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ zeros( [ 2, 2 ], {
+ 'dtype': 'bool'
+ })
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( zeros( [ 2, 2 ] ), value, {} );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a second argument which does not have a supported data type (sortOrder=scalar)', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ zeros( [ 2, 2 ], {
+ 'dtype': 'bool'
+ })
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( zeros( [ 2, 2 ] ), value, 1.0 );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a second argument which does not have a supported data type (sortOrder=ndarray)', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ zeros( [ 2, 2 ], {
+ 'dtype': 'bool'
+ })
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( zeros( [ 2, 2 ] ), value, scalar2ndarray( 1.0 ) );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a second argument which does not have a supported data type (sortOrder=scalar, options)', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ zeros( [ 2, 2 ], {
+ 'dtype': 'bool'
+ })
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( zeros( [ 2, 2 ] ), value, 1.0, {} );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a second argument which does not have a supported data type (sortOrder=ndarray, options)', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ zeros( [ 2, 2 ], {
+ 'dtype': 'bool'
+ })
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( zeros( [ 2, 2 ] ), value, scalar2ndarray( 1.0 ), {} );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a second argument having dimensions greater than or less than the dimensions of input ndarray', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ zeros( [ 2 ] ),
+ zeros( [ 2, 1 ] ),
+ zeros( [ 3, 3 ] ),
+ zeros( [ 2, 2, 2 ] ),
+ zeros( [ 2, 2, 2, 2 ] ),
+ zeros( [ 2, 2, 2, 2, 2 ] )
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), Error, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( zeros( [ 2, 2 ] ), value );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a `sortOrder` argument which is not an ndarray-like object, a numeric scalar, or a support string', function test( t ) {
+ var values;
+ var x;
+ var y;
+ var i;
+
+ x = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ values = [
+ 'invalid',
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( x, y, value );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a `sortOrder` argument which is not an ndarray-like object, a numeric scalar, or a support string (options)', function test( t ) {
+ var values;
+ var x;
+ var y;
+ var i;
+
+ x = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ values = [
+ 'invalid',
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( x, y, value, {} );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a `sortOrder` argument which is not broadcast-compatible', function test( t ) {
+ var values;
+ var opts;
+ var x;
+ var y;
+ var i;
+
+ opts = {
+ 'dtype': 'generic'
+ };
+ x = zeros( [ 2, 2 ], opts );
+
+ y = zeros( [ 2, 2 ], opts );
+
+ values = [
+ zeros( [ 4 ], opts ),
+ zeros( [ 2, 2, 2 ], opts ),
+ zeros( [ 0 ], opts )
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), Error, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( x, y, value );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a `sortOrder` argument which is not broadcast-compatible (options)', function test( t ) {
+ var values;
+ var opts;
+ var x;
+ var y;
+ var i;
+
+ opts = {
+ 'dtype': 'generic'
+ };
+ x = zeros( [ 2, 2 ], opts );
+
+ y = zeros( [ 2, 2 ], opts );
+
+ values = [
+ zeros( [ 4 ], opts ),
+ zeros( [ 2, 2, 2 ], opts ),
+ zeros( [ 0 ], opts )
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), Error, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( x, y, value, {} );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided an options argument which is not an object', function test( t ) {
+ var values;
+ var x;
+ var y;
+ var i;
+
+ x = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ values = [
+ '5',
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( x, y, value );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided an options argument which is not an object (sortOrder=scalar)', function test( t ) {
+ var values;
+ var x;
+ var y;
+ var i;
+
+ x = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( x, y, 1.0, value );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided an options argument which is not an object (sortOrder=ndarray)', function test( t ) {
+ var values;
+ var opts;
+ var x;
+ var y;
+ var i;
+
+ opts = {
+ 'dtype': 'generic'
+ };
+ x = zeros( [ 2, 2 ], opts );
+
+ y = zeros( [ 2, 2 ], opts );
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( x, y, scalar2ndarray( 1.0, opts ), value );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a `dims` option which is not an array-like object of integers', function test( t ) {
+ var values;
+ var x;
+ var y;
+ var i;
+
+ x = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [ 'a' ],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( x, y, {
+ 'dims': value
+ });
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a `dims` option which is not an array-like object of integers (sortOrder=scalar)', function test( t ) {
+ var values;
+ var x;
+ var y;
+ var i;
+
+ x = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [ 'a' ],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( x, y, 1.0, {
+ 'dims': value
+ });
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a `dims` option which is not an array-like object of integers (sortOrder=ndarray)', function test( t ) {
+ var values;
+ var opts;
+ var x;
+ var y;
+ var i;
+
+ opts = {
+ 'dtype': 'generic'
+ };
+ x = zeros( [ 2, 2 ], opts );
+
+ y = zeros( [ 2, 2 ], opts );
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [ 'a' ],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( x, y, scalar2ndarray( 1.0, opts ), {
+ 'dims': value
+ });
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a `dims` option which contains out-of-bounds indices', function test( t ) {
+ var values;
+ var x;
+ var y;
+ var i;
+
+ x = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ values = [
+ [ -10 ],
+ [ 0, 20 ],
+ [ 20 ]
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( x, y, {
+ 'dims': value
+ });
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a `dims` option which contains out-of-bounds indices (sortOrder=scalar)', function test( t ) {
+ var values;
+ var x;
+ var y;
+ var i;
+
+ x = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ values = [
+ [ -10 ],
+ [ 0, 20 ],
+ [ 20 ]
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( x, y, 1.0, {
+ 'dims': value
+ });
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a `dims` option which contains out-of-bounds indices (sortOrder=ndarray)', function test( t ) {
+ var values;
+ var opts;
+ var x;
+ var y;
+ var i;
+
+ opts = {
+ 'dtype': 'generic'
+ };
+ x = zeros( [ 2, 2 ], opts );
+
+ y = zeros( [ 2, 2 ], opts );
+
+ values = [
+ [ -10 ],
+ [ 0, 20 ],
+ [ 20 ]
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( x, y, scalar2ndarray( 1.0, opts ), {
+ 'dims': value
+ });
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a `dims` option which contains too many indices', function test( t ) {
+ var values;
+ var x;
+ var y;
+ var i;
+
+ x = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ values = [
+ [ 0, 1, 2 ],
+ [ 0, 1, 2, 3 ]
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( x, y, {
+ 'dims': value
+ });
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a `dims` option which contains too many indices (sortOrder=scalar)', function test( t ) {
+ var values;
+ var x;
+ var y;
+ var i;
+
+ x = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ values = [
+ [ 0, 1, 2 ],
+ [ 0, 1, 2, 3 ]
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( x, y, 1.0, {
+ 'dims': value
+ });
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a `dims` option which contains too many indices (sortOrder=ndarray)', function test( t ) {
+ var values;
+ var opts;
+ var x;
+ var y;
+ var i;
+
+ opts = {
+ 'dtype': 'generic'
+ };
+ x = zeros( [ 2, 2 ], opts );
+
+ y = zeros( [ 2, 2 ], opts );
+
+ values = [
+ [ 0, 1, 2 ],
+ [ 0, 1, 2, 3 ]
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( x, y, scalar2ndarray( 1.0, opts ), {
+ 'dims': value
+ });
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a `dims` option which contains duplicate indices', function test( t ) {
+ var values;
+ var x;
+ var y;
+ var i;
+
+ x = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ values = [
+ [ 0, 0 ],
+ [ 1, 1 ],
+ [ 0, 1, 0 ],
+ [ 1, 0, 1 ]
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), Error, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( x, y, {
+ 'dims': value
+ });
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a `dims` option which contains duplicate indices (sortOrder=scalar)', function test( t ) {
+ var values;
+ var x;
+ var y;
+ var i;
+
+ x = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ values = [
+ [ 0, 0 ],
+ [ 1, 1 ],
+ [ 0, 1, 0 ],
+ [ 1, 0, 1 ]
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), Error, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( x, y, 1.0, {
+ 'dims': value
+ });
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a `dims` option which contains duplicate indices (sortOrder=ndarray)', function test( t ) {
+ var values;
+ var opts;
+ var x;
+ var y;
+ var i;
+
+ opts = {
+ 'dtype': 'generic'
+ };
+ x = zeros( [ 2, 2 ], opts );
+
+ y = zeros( [ 2, 2 ], opts );
+
+ values = [
+ [ 0, 0 ],
+ [ 1, 1 ],
+ [ 0, 1, 0 ],
+ [ 1, 0, 1 ]
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), Error, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ assign( x, y, scalar2ndarray( 1.0, opts ), {
+ 'dims': value
+ });
+ };
+ }
+});
+
+tape( 'the function sorts the input ndarray and assigns results to an output ndarray (default, row-major)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var x;
+ var y;
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ actual = assign( x, y );
+ expected = [ [ -3.0, -1.0 ], [ 2.0, 4.0 ] ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function sorts the input ndarray and assigns results to an output ndarray (default, column-major)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var x;
+ var y;
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 1, 2 ], 0, 'column-major' );
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic',
+ 'order': 'column-major'
+ });
+
+ actual = assign( x, y );
+ expected = [ [ -3.0, 2.0 ], [ -1.0, 4.0 ] ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function sorts the input ndarray and assigns results to an output ndarray (all dimensions, row-major)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var x;
+ var y;
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ actual = assign( x, y, {
+ 'dims': [ 0, 1 ]
+ });
+ expected = [ [ -3.0, -1.0 ], [ 2.0, 4.0 ] ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function sorts the input ndarray and assigns results to an output ndarray (all dimensions, column-major)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var x;
+ var y;
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 1, 2 ], 0, 'column-major' );
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic',
+ 'order': 'column-major'
+ });
+
+ actual = assign( x, y, {
+ 'dims': [ 0, 1 ]
+ });
+ expected = [ [ -3.0, 2.0 ], [ -1.0, 4.0 ] ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function sorts the input ndarray and assigns results to an output ndarray (no dimensions, row-major)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var x;
+ var y;
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ actual = assign( x, y, {
+ 'dims': []
+ });
+ expected = [ [ -1.0, 2.0 ], [ -3.0, 4.0 ] ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function sorts the input ndarray and assigns results to an output ndarray (no dimensions, column-major)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var x;
+ var y;
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 1, 2 ], 0, 'column-major' );
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic',
+ 'order': 'column-major'
+ });
+
+ actual = assign( x, y, {
+ 'dims': []
+ });
+ expected = [ [ -1.0, -3.0 ], [ 2.0, 4.0 ] ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports specifying operation dimensions (row-major)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var x;
+ var y;
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ actual = assign( x, y, {
+ 'dims': [ 0 ]
+ });
+ expected = [ [ -3.0, 2.0 ], [ -1.0, 4.0 ] ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ actual = assign( x, y, {
+ 'dims': [ 1 ]
+ });
+ expected = [ [ -1.0, 2.0 ], [ -3.0, 4.0 ] ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports specifying operation dimensions (column-major)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var x;
+ var y;
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 1, 2 ], 0, 'column-major' );
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic',
+ 'order': 'column-major'
+ });
+
+ actual = assign( x, y, {
+ 'dims': [ 0 ]
+ });
+ expected = [ [ -1.0, -3.0 ], [ 2.0, 4.0 ] ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 1, 2 ], 0, 'column-major' );
+
+ actual = assign( x, y, {
+ 'dims': [ 1 ]
+ });
+ expected = [ [ -3.0, -1.0 ], [ 2.0, 4.0 ] ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports providing a `sortOrder` argument (scalar)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var x;
+ var y;
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic',
+ 'order': 'row-major'
+ });
+
+ actual = assign( x, y, 1.0 );
+ expected = [ [ -3.0, -1.0 ], [ 2.0, 4.0 ] ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'column-major' );
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic',
+ 'order': 'column-major'
+ });
+
+ actual = assign( x, y, -1.0 );
+ expected = [ [ 4.0, -1.0 ], [ 2.0, -3.0 ] ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports providing a `sortOrder` argument (scalar, options)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var x;
+ var y;
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic',
+ 'order': 'row-major'
+ });
+
+ actual = assign( x, y, 1.0, {} );
+ expected = [ [ -3.0, -1.0 ], [ 2.0, 4.0 ] ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'column-major' );
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic',
+ 'order': 'column-major'
+ });
+
+ actual = assign( x, y, -1.0, {} );
+ expected = [ [ 4.0, -1.0 ], [ 2.0, -3.0 ] ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic',
+ 'order': 'row-major'
+ });
+
+ actual = assign( x, y, 0.0, {} );
+ expected = [ [ -1.0, 2.0 ], [ -3.0, 4.0 ] ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports providing a `sortOrder` argument (0d ndarray)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var opts;
+ var x;
+ var y;
+
+ opts = {
+ 'dtype': 'generic'
+ };
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( opts.dtype, xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic',
+ 'order': 'row-major'
+ });
+
+ actual = assign( x, y, scalar2ndarray( 1.0, opts ) );
+ expected = [ [ -3.0, -1.0 ], [ 2.0, 4.0 ] ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( opts.dtype, xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'column-major' );
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic',
+ 'order': 'column-major'
+ });
+
+ actual = assign( x, y, scalar2ndarray( -1.0, opts ) );
+ expected = [ [ 4.0, -1.0 ], [ 2.0, -3.0 ] ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( opts.dtype, xbuf, [ 2, 2 ], [ 1, 2 ], 0, 'column-major' );
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic',
+ 'order': 'column-major'
+ });
+
+ actual = assign( x, y, scalar2ndarray( 0.0, opts ) );
+ expected = [ [ -1.0, -3.0 ], [ 2.0, 4.0 ] ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports providing a `sortOrder` argument (0d ndarray, options)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var opts;
+ var x;
+ var y;
+
+ opts = {
+ 'dtype': 'generic'
+ };
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( opts.dtype, xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic',
+ 'order': 'row-major'
+ });
+
+ actual = assign( x, y, scalar2ndarray( 1.0, opts ), {} );
+ expected = [ [ -3.0, -1.0 ], [ 2.0, 4.0 ] ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( opts.dtype, xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'column-major' );
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic',
+ 'order': 'column-major'
+ });
+
+ actual = assign( x, y, scalar2ndarray( -1.0, opts ), {} );
+ expected = [ [ 4.0, -1.0 ], [ 2.0, -3.0 ] ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( opts.dtype, xbuf, [ 2, 2 ], [ 1, 2 ], 0, 'column-major' );
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic',
+ 'order': 'column-major'
+ });
+
+ actual = assign( x, y, scalar2ndarray( 0.0, opts ), {} );
+ expected = [ [ -1.0, -3.0 ], [ 2.0, 4.0 ] ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports providing a `sortOrder` argument (scalar, broadcasted)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var x;
+ var y;
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic',
+ 'order': 'row-major'
+ });
+
+ actual = assign( x, y, 1.0, {
+ 'dims': [ 0 ]
+ });
+ expected = [ [ -3.0, 2.0 ], [ -1.0, 4.0 ] ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 1, 2 ], 0, 'column-major' );
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic',
+ 'order': 'column-major'
+ });
+
+ actual = assign( x, y, -1.0, {
+ 'dims': [ 0 ]
+ });
+ expected = [ [ 2.0, 4.0 ], [ -1.0, -3.0 ] ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 1, 2 ], 0, 'column-major' );
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic',
+ 'order': 'column-major'
+ });
+
+ actual = assign( x, y, 0.0, {
+ 'dims': [ 0 ]
+ });
+ expected = [ [ -1.0, -3.0 ], [ 2.0, 4.0 ] ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports providing a `sortOrder` argument (0d ndarray, broadcasted)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var opts;
+ var x;
+ var y;
+
+ opts = {
+ 'dtype': 'generic'
+ };
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( opts.dtype, xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic',
+ 'order': 'row-major'
+ });
+
+ actual = assign( x, y, scalar2ndarray( 1.0, opts ), {
+ 'dims': [ 0 ]
+ });
+ expected = [ [ -3.0, 2.0 ], [ -1.0, 4.0 ] ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( opts.dtype, xbuf, [ 2, 2 ], [ 1, 2 ], 0, 'column-major' );
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic',
+ 'order': 'column-major'
+ });
+
+ actual = assign( x, y, scalar2ndarray( -1.0, opts ), {
+ 'dims': [ 0 ]
+ });
+ expected = [ [ 2.0, 4.0 ], [ -1.0, -3.0 ] ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( opts.dtype, xbuf, [ 2, 2 ], [ 1, 2 ], 0, 'column-major' );
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic',
+ 'order': 'column-major'
+ });
+
+ actual = assign( x, y, scalar2ndarray( 0.0, opts ), {
+ 'dims': [ 0 ]
+ });
+ expected = [ [ -1.0, -3.0 ], [ 2.0, 4.0 ] ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports providing a `sortOrder` argument (string literals)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var x;
+ var y;
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ actual = assign( x, y, 'asc' );
+ expected = [ [ -3.0, -1.0 ], [ 2.0, 4.0 ] ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ actual = assign( x, y, 'ascending' );
+ expected = [ [ -3.0, -1.0 ], [ 2.0, 4.0 ] ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ actual = assign( x, y, 'desc' );
+ expected = [ [ 4.0, 2.0 ], [ -1.0, -3.0 ] ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ actual = assign( x, y, 'descending' );
+ expected = [ [ 4.0, 2.0 ], [ -1.0, -3.0 ] ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports providing a `sortOrder` argument (string literals, options)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var x;
+ var y;
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+ y = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ actual = assign( x, y, 'asc', {} );
+ expected = [ [ -3.0, -1.0 ], [ 2.0, 4.0 ] ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ actual = assign( x, y, 'descending', {
+ 'dims': [ 0 ]
+ });
+ expected = [ [ -1.0, 4.0 ], [ -3.0, 2.0 ] ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports providing a `sortOrder` argument (ndarray)', function test( t ) {
+ var sortOrder;
+ var expected;
+ var actual;
+ var xbuf;
+ var obuf;
+ var opts;
+ var x;
+ var y;
+
+ opts = {
+ 'dtype': 'generic'
+ };
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( opts.dtype, xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+ y = zeros( [ 2, 2], {
+ 'dtype': 'generic'
+ });
+
+ obuf = [ 1.0, -1.0 ];
+ sortOrder = new ndarray( opts.dtype, obuf, [ 2 ], [ 1 ], 0, 'row-major' );
+ actual = assign( x, y, sortOrder, {
+ 'dims': [ 0 ]
+ });
+ expected = [ [ -3.0, 4.0 ], [ -1.0, 2.0 ] ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( opts.dtype, xbuf, [ 2, 2 ], [ 1, 2 ], 0, 'column-major' );
+ y = zeros( [ 2, 2], {
+ 'dtype': 'generic',
+ 'order': 'column-major'
+ });
+
+ obuf = [ 1.0, -1.0 ];
+ sortOrder = new ndarray( opts.dtype, obuf, [ 2 ], [ 1 ], 0, 'row-major' );
+ actual = assign( x, y, sortOrder, {
+ 'dims': [ 0 ]
+ });
+ expected = [ [ -1.0, 4.0 ], [ 2.0, -3.0 ] ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ xbuf = [ 1.0, -2.0, -3.0, 4.0 ];
+ x = new ndarray( opts.dtype, xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+ y = zeros( [ 2, 2], {
+ 'dtype': 'generic',
+ 'order': 'row-major'
+ });
+
+ obuf = [ 0.0, -1.0 ];
+ sortOrder = new ndarray( opts.dtype, obuf, [ 2 ], [ 1 ], 0, 'row-major' );
+ actual = assign( x, y, sortOrder, {
+ 'dims': [ 1 ]
+ });
+ expected = [ [ 1.0, -2.0 ], [ 4.0, -3.0 ] ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/blas/ext/to-sortedhp/test/test.js b/lib/node_modules/@stdlib/blas/ext/to-sortedhp/test/test.js
new file mode 100644
index 000000000000..9246480f371a
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/to-sortedhp/test/test.js
@@ -0,0 +1,39 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isMethod = require( '@stdlib/assert/is-method' );
+var toSortedhp = require( './../lib' );
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof toSortedhp, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'attached to the main export is an `assign` method', function test( t ) {
+ t.strictEqual( isMethod( toSortedhp, 'assign' ), true, 'returns expected value' );
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/blas/ext/to-sortedhp/test/test.main.js b/lib/node_modules/@stdlib/blas/ext/to-sortedhp/test/test.main.js
new file mode 100644
index 000000000000..6218c9d2b171
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/to-sortedhp/test/test.main.js
@@ -0,0 +1,1774 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isEqualDataType = require( '@stdlib/ndarray/base/assert/is-equal-data-type' );
+var isSameArray = require( '@stdlib/assert/is-same-array' );
+var resolveStr = require( '@stdlib/ndarray/base/dtype-resolve-str' );
+var ndarray = require( '@stdlib/ndarray/ctor' );
+var zeros = require( '@stdlib/ndarray/zeros' );
+var empty = require( '@stdlib/ndarray/empty' );
+var ndarray2array = require( '@stdlib/ndarray/to-array' );
+var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' );
+var getDType = require( '@stdlib/ndarray/dtype' );
+var getShape = require( '@stdlib/ndarray/shape' );
+var getOrder = require( '@stdlib/ndarray/order' );
+var getData = require( '@stdlib/ndarray/data-buffer' );
+var toSortedhp = require( './../lib' );
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof toSortedhp, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function throws an error if provided a first argument which is not an ndarray-like object', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ toSortedhp( value );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a first argument which is not an ndarray-like object (sortOrder=scalar)', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ toSortedhp( value, 1.0 );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a first argument which is not an ndarray-like object (sortOrder=ndarray)', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ toSortedhp( value, scalar2ndarray( 1.0 ) );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a first argument which is not an ndarray-like object (options)', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ toSortedhp( value, {} );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a first argument which is not an ndarray-like object (sortOrder=scalar, options)', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ toSortedhp( value, 1.0, {} );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a first argument which is not an ndarray-like object (sortOrder=ndarray, options)', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ toSortedhp( value, scalar2ndarray( 1.0 ), {} );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a first argument which is not an ndarray-like object having a supported data type', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ empty( [ 2, 2 ], {
+ 'dtype': 'bool'
+ })
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ toSortedhp( value );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a first argument which is not an ndarray-like object having a supported data type (sortOrder=scalar)', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ empty( [ 2, 2 ], {
+ 'dtype': 'bool'
+ })
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ toSortedhp( value, 1.0 );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a first argument which is not an ndarray-like object having a supported data type (sortOrder=ndarray)', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ empty( [ 2, 2 ], {
+ 'dtype': 'bool'
+ })
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ toSortedhp( value, scalar2ndarray( 1.0 ) );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a first argument which is not an ndarray-like object having a supported data type (options)', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ empty( [ 2, 2 ], {
+ 'dtype': 'bool'
+ })
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ toSortedhp( value, {} );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a first argument which is not an ndarray-like object having a supported data type (sortOrder=scalar, options)', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ empty( [ 2, 2 ], {
+ 'dtype': 'bool'
+ })
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ toSortedhp( value, 1.0, {} );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a first argument which is not an ndarray-like object having a supported data type (sortOrder=ndarray, options)', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ empty( [ 2, 2 ], {
+ 'dtype': 'bool'
+ })
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ toSortedhp( value, scalar2ndarray( 1.0 ), {} );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a `sortOrder` argument which is not an ndarray-like object, a numeric scalar, or a supported string', function test( t ) {
+ var values;
+ var x;
+ var i;
+
+ x = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ values = [
+ 'invalid',
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ toSortedhp( x, value );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a `sortOrder` argument which is not an ndarray-like object, a numeric scalar, or a supported string (options)', function test( t ) {
+ var values;
+ var x;
+ var i;
+
+ x = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ values = [
+ 'invalid',
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ toSortedhp( x, value, {} );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a `sortOrder` argument which is not broadcast-compatible', function test( t ) {
+ var values;
+ var opts;
+ var x;
+ var i;
+
+ opts = {
+ 'dtype': 'generic'
+ };
+ x = zeros( [ 2, 2 ], opts );
+
+ values = [
+ zeros( [ 4 ], opts ),
+ zeros( [ 2, 2, 2 ], opts ),
+ zeros( [ 0 ], opts )
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), Error, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ toSortedhp( x, value );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a `sortOrder` argument which is not broadcast-compatible (options)', function test( t ) {
+ var values;
+ var opts;
+ var x;
+ var i;
+
+ opts = {
+ 'dtype': 'generic'
+ };
+ x = zeros( [ 2, 2 ], opts );
+
+ values = [
+ zeros( [ 4 ], opts ),
+ zeros( [ 2, 2, 2 ], opts ),
+ zeros( [ 0 ], opts )
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), Error, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ toSortedhp( x, value, {} );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided an options argument which is not an object', function test( t ) {
+ var values;
+ var x;
+ var i;
+
+ x = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ values = [
+ '5',
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ toSortedhp( x, value );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided an options argument which is not an object (sortOrder=scalar)', function test( t ) {
+ var values;
+ var x;
+ var i;
+
+ x = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ toSortedhp( x, 1.0, value );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided an options argument which is not an object (sortOrder=ndarray)', function test( t ) {
+ var values;
+ var opts;
+ var x;
+ var i;
+
+ opts = {
+ 'dtype': 'generic'
+ };
+ x = zeros( [ 2, 2 ], opts );
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ toSortedhp( x, scalar2ndarray( 1.0, opts ), value );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a `dims` option which is not an array-like object of integers', function test( t ) {
+ var values;
+ var x;
+ var i;
+
+ x = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [ 'a' ],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ toSortedhp( x, {
+ 'dims': value
+ });
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a `dims` option which is not an array-like object of integers (sortOrder=scalar)', function test( t ) {
+ var values;
+ var x;
+ var i;
+
+ x = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [ 'a' ],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ toSortedhp( x, 1.0, {
+ 'dims': value
+ });
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a `dims` option which is not an array-like object of integers (sortOrder=ndarray)', function test( t ) {
+ var values;
+ var opts;
+ var x;
+ var i;
+
+ opts = {
+ 'dtype': 'generic'
+ };
+ x = zeros( [ 2, 2 ], opts );
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [ 'a' ],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ toSortedhp( x, scalar2ndarray( 1.0, opts ), {
+ 'dims': value
+ });
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a `dims` option which contains out-of-bounds indices', function test( t ) {
+ var values;
+ var x;
+ var i;
+
+ x = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ values = [
+ [ -10 ],
+ [ 0, 20 ],
+ [ 20 ]
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ toSortedhp( x, {
+ 'dims': value
+ });
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a `dims` option which contains out-of-bounds indices (sortOrder=scalar)', function test( t ) {
+ var values;
+ var x;
+ var i;
+
+ x = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ values = [
+ [ -10 ],
+ [ 0, 20 ],
+ [ 20 ]
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ toSortedhp( x, 1.0, {
+ 'dims': value
+ });
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a `dims` option which contains out-of-bounds indices (sortOrder=ndarray)', function test( t ) {
+ var values;
+ var opts;
+ var x;
+ var i;
+
+ opts = {
+ 'dtype': 'generic'
+ };
+ x = zeros( [ 2, 2 ], opts );
+
+ values = [
+ [ -10 ],
+ [ 0, 20 ],
+ [ 20 ]
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ toSortedhp( x, scalar2ndarray( 1.0, opts ), {
+ 'dims': value
+ });
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a `dims` option which contains too many indices', function test( t ) {
+ var values;
+ var x;
+ var i;
+
+ x = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ values = [
+ [ 0, 1, 2 ],
+ [ 0, 1, 2, 3 ]
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ toSortedhp( x, {
+ 'dims': value
+ });
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a `dims` option which contains too many indices (sortOrder=scalar)', function test( t ) {
+ var values;
+ var x;
+ var i;
+
+ x = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ values = [
+ [ 0, 1, 2 ],
+ [ 0, 1, 2, 3 ]
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ toSortedhp( x, 1.0, {
+ 'dims': value
+ });
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a `dims` option which contains too many indices (sortOrder=ndarray)', function test( t ) {
+ var values;
+ var opts;
+ var x;
+ var i;
+
+ opts = {
+ 'dtype': 'generic'
+ };
+ x = zeros( [ 2, 2 ], opts );
+
+ values = [
+ [ 0, 1, 2 ],
+ [ 0, 1, 2, 3 ]
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ toSortedhp( x, scalar2ndarray( 1.0, opts ), {
+ 'dims': value
+ });
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a `dims` option which contains duplicate indices', function test( t ) {
+ var values;
+ var x;
+ var i;
+
+ x = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ values = [
+ [ 0, 0 ],
+ [ 1, 1 ],
+ [ 0, 1, 0 ],
+ [ 1, 0, 1 ]
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), Error, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ toSortedhp( x, {
+ 'dims': value
+ });
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a `dims` option which contains duplicate indices (sortOrder=scalar)', function test( t ) {
+ var values;
+ var x;
+ var i;
+
+ x = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ values = [
+ [ 0, 0 ],
+ [ 1, 1 ],
+ [ 0, 1, 0 ],
+ [ 1, 0, 1 ]
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), Error, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ toSortedhp( x, 1.0, {
+ 'dims': value
+ });
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a `dims` option which contains duplicate indices (sortOrder=ndarray)', function test( t ) {
+ var values;
+ var opts;
+ var x;
+ var i;
+
+ opts = {
+ 'dtype': 'generic'
+ };
+ x = zeros( [ 2, 2 ], opts );
+
+ values = [
+ [ 0, 0 ],
+ [ 1, 1 ],
+ [ 0, 1, 0 ],
+ [ 1, 0, 1 ]
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), Error, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ toSortedhp( x, scalar2ndarray( 1.0, opts ), {
+ 'dims': value
+ });
+ };
+ }
+});
+
+tape( 'the function throws an error if provided an invalid `dtype` option', function test( t ) {
+ var values;
+ var x;
+ var i;
+
+ x = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ values = [
+ '5',
+ 'foo',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [ 'a' ],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ toSortedhp( x, {
+ 'dtype': value
+ });
+ };
+ }
+});
+
+tape( 'the function throws an error if provided an invalid `dtype` option (sortOrder=scalar)', function test( t ) {
+ var values;
+ var x;
+ var i;
+
+ x = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ values = [
+ '5',
+ 'foo',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [ 'a' ],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ toSortedhp( x, 1.0, {
+ 'dtype': value
+ });
+ };
+ }
+});
+
+tape( 'the function throws an error if provided an invalid `dtype` option (sortOrder=string)', function test( t ) {
+ var values;
+ var x;
+ var i;
+
+ x = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ values = [
+ '5',
+ 'foo',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [ 'a' ],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ toSortedhp( x, 'asc', {
+ 'dtype': value
+ });
+ };
+ }
+});
+
+tape( 'the function throws an error if provided an invalid `dtype` option (sortOrder=ndarray)', function test( t ) {
+ var values;
+ var x;
+ var i;
+
+ x = zeros( [ 2, 2 ], {
+ 'dtype': 'generic'
+ });
+
+ values = [
+ '5',
+ 'foo',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [ 'a' ],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ toSortedhp( x, scalar2ndarray( 1.0 ), {
+ 'dtype': value
+ });
+ };
+ }
+});
+
+tape( 'the function returns a sorted ndarray (default, row-major)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var x;
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ actual = toSortedhp( x );
+ expected = [ -3.0, -1.0, 2.0, 4.0 ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( isEqualDataType( getDType( actual ), getDType( x ) ), true, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.strictEqual( isSameArray( getData( actual ), expected ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function returns a sorted ndarray (default, column-major)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var x;
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 1, 2 ], 0, 'column-major' );
+
+ actual = toSortedhp( x );
+ expected = [ -3.0, -1.0, 2.0, 4.0 ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( isEqualDataType( getDType( actual ), getDType( x ) ), true, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.strictEqual( isSameArray( getData( actual ), expected ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function returns a sorted ndarray (all dimensions, row-major)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var x;
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ actual = toSortedhp( x, {
+ 'dims': [ 0, 1 ]
+ });
+ expected = [ -3.0, -1.0, 2.0, 4.0 ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( isEqualDataType( getDType( actual ), getDType( x ) ), true, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.strictEqual( isSameArray( getData( actual ), expected ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function returns a sorted ndarray (all dimensions, column-major)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var x;
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 1, 2 ], 0, 'column-major' );
+
+ actual = toSortedhp( x, {
+ 'dims': [ 0, 1 ]
+ });
+ expected = [ -3.0, -1.0, 2.0, 4.0 ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( isEqualDataType( getDType( actual ), getDType( x ) ), true, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.strictEqual( isSameArray( getData( actual ), expected ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function returns a sorted ndarray (no dimensions, row-major)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var x;
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ actual = toSortedhp( x, {
+ 'dims': []
+ });
+ expected = [ [ -1.0, 2.0 ], [ -3.0, 4.0 ] ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( isEqualDataType( getDType( actual ), getDType( x ) ), true, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function returns a sorted ndarray (no dimensions, column-major)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var x;
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 1, 2 ], 0, 'column-major' );
+
+ actual = toSortedhp( x, {
+ 'dims': []
+ });
+ expected = [ [ -1.0, -3.0 ], [ 2.0, 4.0 ] ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( isEqualDataType( getDType( actual ), getDType( x ) ), true, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports specifying operation dimensions (row-major)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var x;
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ actual = toSortedhp( x, {
+ 'dims': [ 0 ]
+ });
+ expected = [ [ -3.0, 2.0 ], [ -1.0, 4.0 ] ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( isEqualDataType( getDType( actual ), getDType( x ) ), true, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ actual = toSortedhp( x, {
+ 'dims': [ 1 ]
+ });
+ expected = [ [ -1.0, 2.0 ], [ -3.0, 4.0 ] ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( isEqualDataType( getDType( actual ), getDType( x ) ), true, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports specifying operation dimensions (column-major)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var x;
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 1, 2 ], 0, 'column-major' );
+
+ actual = toSortedhp( x, {
+ 'dims': [ 0 ]
+ });
+ expected = [ [ -1.0, -3.0 ], [ 2.0, 4.0 ] ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( isEqualDataType( getDType( actual ), getDType( x ) ), true, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 1, 2 ], 0, 'column-major' );
+
+ actual = toSortedhp( x, {
+ 'dims': [ 1 ]
+ });
+ expected = [ [ -3.0, -1.0 ], [ 2.0, 4.0 ] ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( isEqualDataType( getDType( actual ), getDType( x ) ), true, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports providing a `sortOrder` argument (scalar)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var x;
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ actual = toSortedhp( x, 1.0 );
+ expected = [ -3.0, -1.0, 2.0, 4.0 ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( isEqualDataType( getDType( actual ), getDType( x ) ), true, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.strictEqual( isSameArray( getData( actual ), expected ), true, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'column-major' );
+
+ actual = toSortedhp( x, -1.0 );
+ expected = [ 4.0, 2.0, -1.0, -3.0 ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( isEqualDataType( getDType( actual ), getDType( x ) ), true, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.strictEqual( isSameArray( getData( actual ), expected ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports providing a `sortOrder` argument (scalar, options)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var x;
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ actual = toSortedhp( x, 1.0, {} );
+ expected = [ -3.0, -1.0, 2.0, 4.0 ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( isEqualDataType( getDType( actual ), getDType( x ) ), true, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.strictEqual( isSameArray( getData( actual ), expected ), true, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'column-major' );
+
+ actual = toSortedhp( x, -1.0, {} );
+ expected = [ 4.0, 2.0, -1.0, -3.0 ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( isEqualDataType( getDType( actual ), getDType( x ) ), true, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.strictEqual( isSameArray( getData( actual ), expected ), true, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ actual = toSortedhp( x, 0.0, {} );
+ expected = [ -1.0, 2.0, -3.0, 4.0 ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( isEqualDataType( getDType( actual ), getDType( x ) ), true, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.strictEqual( isSameArray( getData( actual ), expected ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports providing a `sortOrder` argument (0d ndarray)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var opts;
+ var x;
+
+ opts = {
+ 'dtype': 'generic'
+ };
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( opts.dtype, xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ actual = toSortedhp( x, scalar2ndarray( 1.0, opts ) );
+ expected = [-3.0, -1.0, 2.0, 4.0 ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( getDType( actual ), opts.dtype, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.strictEqual( isSameArray( getData( actual ), expected ), true, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( opts.dtype, xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'column-major' );
+
+ actual = toSortedhp( x, scalar2ndarray( -1.0, opts ) );
+ expected = [ 4.0, 2.0, -1.0, -3.0 ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( getDType( actual ), opts.dtype, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.strictEqual( isSameArray( getData( actual ), expected ), true, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( opts.dtype, xbuf, [ 2, 2 ], [ 1, 2 ], 0, 'column-major' );
+
+ actual = toSortedhp( x, scalar2ndarray( 0.0, opts ) );
+ expected = [ -1.0, 2.0, -3.0, 4.0 ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( getDType( actual ), opts.dtype, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.strictEqual( isSameArray( getData( actual ), expected ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports providing a `sortOrder` argument (0d ndarray, options)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var opts;
+ var x;
+
+ opts = {
+ 'dtype': 'generic'
+ };
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( opts.dtype, xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ actual = toSortedhp( x, scalar2ndarray( 1.0, opts ), {} );
+ expected = [ -3.0, -1.0, 2.0, 4.0 ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( getDType( actual ), opts.dtype, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.strictEqual( isSameArray( getData( actual ), expected ), true, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( opts.dtype, xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'column-major' );
+
+ actual = toSortedhp( x, scalar2ndarray( -1.0, opts ), {} );
+ expected = [ 4.0, 2.0, -1.0, -3.0 ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( getDType( actual ), opts.dtype, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.strictEqual( isSameArray( getData( actual ), expected ), true, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( opts.dtype, xbuf, [ 2, 2 ], [ 1, 2 ], 0, 'column-major' );
+
+ actual = toSortedhp( x, scalar2ndarray( 0.0, opts ), {} );
+ expected = [ -1.0, 2.0, -3.0, 4.0 ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( getDType( actual ), opts.dtype, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.strictEqual( isSameArray( getData( actual ), expected ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports providing a `sortOrder` argument (scalar, broadcasted)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var x;
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ actual = toSortedhp( x, 1.0, {
+ 'dims': [ 0 ]
+ });
+ expected = [ [ -3.0, 2.0 ], [ -1.0, 4.0 ] ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( isEqualDataType( getDType( actual ), getDType( x ) ), true, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 1, 2 ], 0, 'column-major' );
+
+ actual = toSortedhp( x, -1.0, {
+ 'dims': [ 0 ]
+ });
+ expected = [ [ 2.0, 4.0 ], [ -1.0, -3.0 ] ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( isEqualDataType( getDType( actual ), getDType( x ) ), true, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 1, 2 ], 0, 'column-major' );
+
+ actual = toSortedhp( x, 0.0, {
+ 'dims': [ 0 ]
+ });
+ expected = [ [ -1.0, -3.0 ], [ 2.0, 4.0 ] ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( isEqualDataType( getDType( actual ), getDType( x ) ), true, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports providing a `sortOrder` argument (0d ndarray, broadcasted)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var opts;
+ var x;
+
+ opts = {
+ 'dtype': 'generic'
+ };
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( opts.dtype, xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ actual = toSortedhp( x, scalar2ndarray( 1.0, opts ), {
+ 'dims': [ 0 ]
+ });
+ expected = [ [ -3.0, 2.0 ], [ -1.0, 4.0 ] ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( getDType( actual ), opts.dtype, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( opts.dtype, xbuf, [ 2, 2 ], [ 1, 2 ], 0, 'column-major' );
+
+ actual = toSortedhp( x, scalar2ndarray( -1.0, opts ), {
+ 'dims': [ 0 ]
+ });
+ expected = [ [ 2.0, 4.0 ], [ -1.0, -3.0 ] ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( getDType( actual ), opts.dtype, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( opts.dtype, xbuf, [ 2, 2 ], [ 1, 2 ], 0, 'column-major' );
+
+ actual = toSortedhp( x, scalar2ndarray( 0.0, opts ), {
+ 'dims': [ 0 ]
+ });
+ expected = [ [ -1.0, -3.0 ], [ 2.0, 4.0 ] ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( getDType( actual ), opts.dtype, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports providing a `sortOrder` argument (string literals)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var x;
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ actual = toSortedhp( x, 'asc' );
+ expected = [ -3.0, -1.0, 2.0, 4.0 ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( isEqualDataType( getDType( actual ), getDType( x ) ), true, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.strictEqual( isSameArray( getData( actual ), expected ), true, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ actual = toSortedhp( x, 'ascending' );
+ expected = [ -3.0, -1.0, 2.0, 4.0 ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( isEqualDataType( getDType( actual ), getDType( x ) ), true, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.strictEqual( isSameArray( getData( actual ), expected ), true, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ actual = toSortedhp( x, 'desc' );
+ expected = [ 4.0, 2.0, -1.0, -3.0 ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( isEqualDataType( getDType( actual ), getDType( x ) ), true, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.strictEqual( isSameArray( getData( actual ), expected ), true, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ actual = toSortedhp( x, 'descending' );
+ expected = [ 4.0, 2.0, -1.0, -3.0 ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( isEqualDataType( getDType( actual ), getDType( x ) ), true, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.strictEqual( isSameArray( getData( actual ), expected ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports providing a `sortOrder` argument (string literals, options)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var x;
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ actual = toSortedhp( x, 'asc', {} );
+ expected = [ -3.0, -1.0, 2.0, 4.0 ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( isEqualDataType( getDType( actual ), getDType( x ) ), true, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.strictEqual( isSameArray( getData( actual ), expected ), true, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ actual = toSortedhp( x, 'descending', {
+ 'dims': [ 0 ]
+ });
+ expected = [ [ -1.0, 4.0 ], [ -3.0, 2.0 ] ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( isEqualDataType( getDType( actual ), getDType( x ) ), true, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports providing a `sortOrder` argument (ndarray)', function test( t ) {
+ var sortOrder;
+ var expected;
+ var actual;
+ var xbuf;
+ var obuf;
+ var opts;
+ var x;
+
+ opts = {
+ 'dtype': 'generic'
+ };
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( opts.dtype, xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ obuf = [ 1.0, -1.0 ];
+ sortOrder = new ndarray( opts.dtype, obuf, [ 2 ], [ 1 ], 0, 'row-major' );
+ actual = toSortedhp( x, sortOrder, {
+ 'dims': [ 0 ]
+ });
+ expected = [ [ -3.0, 4.0 ], [ -1.0, 2.0 ] ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( getDType( actual ), opts.dtype, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( opts.dtype, xbuf, [ 2, 2 ], [ 1, 2 ], 0, 'column-major' );
+
+ obuf = [ 1.0, -1.0 ];
+ sortOrder = new ndarray( opts.dtype, obuf, [ 2 ], [ 1 ], 0, 'row-major' );
+ actual = toSortedhp( x, sortOrder, {
+ 'dims': [ 0 ]
+ });
+ expected = [ [ -1.0, 4.0 ], [ 2.0, -3.0 ] ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( getDType( actual ), opts.dtype, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ xbuf = [ 1.0, -2.0, -3.0, 4.0 ];
+ x = new ndarray( opts.dtype, xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ obuf = [ 0.0, -1.0 ];
+ sortOrder = new ndarray( opts.dtype, obuf, [ 2 ], [ 1 ], 0, 'row-major' );
+ actual = toSortedhp( x, sortOrder, {
+ 'dims': [ 1 ]
+ });
+ expected = [ [ 1.0, -2.0 ], [ 4.0, -3.0 ] ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( getDType( actual ), opts.dtype, 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports specifying an output data type', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var x;
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'float32', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ actual = toSortedhp( x, {
+ 'dtype': 'float64'
+ });
+ expected = [ [ -3.0, -1.0 ], [ 2.0, 4.0 ] ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( resolveStr( getDType( actual ) ), 'float64', 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports specifying an output data type (sortOrder=scalar)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var x;
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'float64', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ actual = toSortedhp( x, 1.0, {
+ 'dtype': 'float32'
+ });
+ expected = [ [ -3.0, -1.0 ], [ 2.0, 4.0 ] ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( resolveStr( getDType( actual ) ), 'float32', 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports specifying an output data type (sortOrder=string)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var x;
+
+ xbuf = [ -1, 2, -3, 4 ];
+ x = new ndarray( 'int8', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ actual = toSortedhp( x, 'desc', {
+ 'dtype': 'int32'
+ });
+ expected = [ [ 4, 2 ], [ -1, -3 ] ];
+
+ t.notEqual( actual, x, 'returns expected value' );
+ t.strictEqual( resolveStr( getDType( actual ) ), 'int32', 'returns expected value' );
+ t.deepEqual( getShape( actual ), getShape( x ), 'returns expected value' );
+ t.strictEqual( getOrder( actual ), getOrder( x ), 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/math/base/special/cceilf/package.json b/lib/node_modules/@stdlib/math/base/special/cceilf/package.json
index 9727be736b09..4c3642aebc21 100644
--- a/lib/node_modules/@stdlib/math/base/special/cceilf/package.json
+++ b/lib/node_modules/@stdlib/math/base/special/cceilf/package.json
@@ -66,5 +66,142 @@
"complex",
"cmplx",
"number"
- ]
+ ],
+ "__stdlib__": {
+ "scaffold": {
+ "$schema": "math/base@v1.0",
+ "base_alias": "ceil",
+ "alias": "cceilf",
+ "pkg_desc": "round each component of a complex number toward positive infinity",
+ "desc": "rounds each component of a complex number toward positive infinity",
+ "short_desc": "",
+ "parameters": [
+ {
+ "name": "z",
+ "desc": "input value",
+ "type": {
+ "javascript": "Complex64",
+ "jsdoc": "Complex64",
+ "c": "stdlib_complex64_t",
+ "dtype": "complex64"
+ },
+ "domain": null,
+ "rand": {
+ "prng": "random/base/uniform",
+ "parameters": [
+ [
+ -10,
+ 10
+ ],
+ [
+ -10,
+ 10
+ ]
+ ]
+ },
+ "example_values": [
+ {
+ "re": -3.14,
+ "im": -1.5
+ },
+ {
+ "re": 0,
+ "im": 0
+ },
+ {
+ "re": -1.5,
+ "im": 2.5
+ },
+ {
+ "re": 2.5,
+ "im": -1.5
+ },
+ {
+ "re": 0,
+ "im": -3.7
+ },
+ {
+ "re": 4.2,
+ "im": 0
+ },
+ {
+ "re": 21.2,
+ "im": 3
+ },
+ {
+ "re": 11,
+ "im": -5
+ },
+ {
+ "re": 33,
+ "im": -14.67
+ },
+ {
+ "re": -42,
+ "im": 9.3
+ },
+ {
+ "re": -3,
+ "im": 3
+ },
+ {
+ "re": 73,
+ "im": 31
+ },
+ {
+ "re": -2.45,
+ "im": 1.23
+ },
+ {
+ "re": 2.45,
+ "im": -1.23
+ },
+ {
+ "re": 1.77,
+ "im": -3.14
+ },
+ {
+ "re": -7.5,
+ "im": 8.2
+ },
+ {
+ "re": 5.5,
+ "im": -12.3
+ },
+ {
+ "re": -15.8,
+ "im": 0.4
+ },
+ {
+ "re": 0.99,
+ "im": -0.99
+ }
+ ]
+ }
+ ],
+ "returns": {
+ "desc": "result",
+ "type": {
+ "javascript": "Complex64",
+ "jsdoc": "Complex64",
+ "c": "stdlib_complex64_t",
+ "dtype": "complex64"
+ }
+ },
+ "keywords": [
+ "ceil",
+ "cceil",
+ "round",
+ "integer",
+ "nearest",
+ "value",
+ "complex",
+ "cmplx",
+ "number"
+ ],
+ "extra_keywords": [
+ "math.ceil"
+ ]
+ }
+ }
}
diff --git a/lib/node_modules/@stdlib/math/base/special/factoriallnf/package.json b/lib/node_modules/@stdlib/math/base/special/factoriallnf/package.json
index 77092991e9c2..150142987bcf 100644
--- a/lib/node_modules/@stdlib/math/base/special/factoriallnf/package.json
+++ b/lib/node_modules/@stdlib/math/base/special/factoriallnf/package.json
@@ -64,9 +64,87 @@
"logarithm",
"fact",
"lfact",
- "factoriallnf",
+ "factorialln",
"combinatorics",
"gamma",
"number"
- ]
+ ],
+ "__stdlib__": {
+ "scaffold": {
+ "$schema": "math/base@v1.0",
+ "base_alias": "factorialln",
+ "alias": "factoriallnf",
+ "pkg_desc": "compute the natural logarithm of the factorial function",
+ "desc": "computes the natural logarithm of the factorial function",
+ "short_desc": "natural logarithm of the factorial function",
+ "parameters": [
+ {
+ "name": "x",
+ "desc": "input value",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "float",
+ "dtype": "float32"
+ },
+ "domain": [
+ {
+ "min": 0,
+ "max": "infinity"
+ }
+ ],
+ "rand": {
+ "prng": "random/base/discrete-uniform",
+ "parameters": [
+ 0,
+ 100
+ ]
+ },
+ "example_values": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 93,
+ 95,
+ 96,
+ 97,
+ 98,
+ 99
+ ]
+ }
+ ],
+ "output_policy": "real_floating_point_and_generic",
+ "returns": {
+ "desc": "result",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "float",
+ "dtype": "float32"
+ }
+ },
+ "keywords": [
+ "factorial",
+ "log-scale",
+ "logarithm",
+ "fact",
+ "lfact",
+ "factorialln",
+ "combinatorics",
+ "gamma"
+ ],
+ "extra_keywords": []
+ }
+ }
}
diff --git a/lib/node_modules/@stdlib/math/base/special/floor/package.json b/lib/node_modules/@stdlib/math/base/special/floor/package.json
index daa4df3c537d..3fddea60f4bd 100644
--- a/lib/node_modules/@stdlib/math/base/special/floor/package.json
+++ b/lib/node_modules/@stdlib/math/base/special/floor/package.json
@@ -66,5 +66,80 @@
"double",
"double-precision",
"dbl"
- ]
+ ],
+ "__stdlib__": {
+ "scaffold": {
+ "$schema": "math/base@v1.0",
+ "base_alias": "floor",
+ "alias": "floor",
+ "pkg_desc": "round a double-precision floating-point number toward negative infinity",
+ "desc": "rounds a double-precision floating-point number toward negative infinity",
+ "short_desc": "",
+ "parameters": [
+ {
+ "name": "x",
+ "desc": "input value",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ },
+ "domain": [
+ {
+ "min": "-infinity",
+ "max": "infinity"
+ }
+ ],
+ "rand": {
+ "prng": "random/base/uniform",
+ "parameters": [
+ -10,
+ 10
+ ]
+ },
+ "example_values": [
+ -3.7,
+ 3.5,
+ -1.2,
+ -0.1,
+ 0.1,
+ 1.1,
+ 2.9,
+ 5.5,
+ 10.2,
+ 5.9,
+ 2.25,
+ -3.14,
+ 5,
+ 4.33,
+ 10.2,
+ -9.99,
+ 9.99,
+ 2.12,
+ -0.5,
+ 0.5
+ ]
+ }
+ ],
+ "returns": {
+ "desc": "function value",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ }
+ },
+ "keywords": [
+ "floor",
+ "round",
+ "integer",
+ "nearest"
+ ],
+ "extra_keywords": [
+ "math.floor"
+ ]
+ }
+ }
}
diff --git a/lib/node_modules/@stdlib/math/base/special/fresnels/test/fixtures/c/cephes/runner.c b/lib/node_modules/@stdlib/math/base/special/fresnels/test/fixtures/c/cephes/runner.c
index c2c7054fffe3..1a334b642b49 100644
--- a/lib/node_modules/@stdlib/math/base/special/fresnels/test/fixtures/c/cephes/runner.c
+++ b/lib/node_modules/@stdlib/math/base/special/fresnels/test/fixtures/c/cephes/runner.c
@@ -117,7 +117,7 @@ void write_data_as_json( FILE *f, const double *x, const double *S, const unsign
* @param len number of values in the domain
* @param name output filename
*/
-void generate( double *x, const unsigned int len, const char *name ) {
+void generate( const double *x, const unsigned int len, const char *name ) {
unsigned int i;
double *S;
double C;
diff --git a/lib/node_modules/@stdlib/math/base/special/hacoversin/package.json b/lib/node_modules/@stdlib/math/base/special/hacoversin/package.json
index e07dbdfcb3d3..a62ac82619ef 100644
--- a/lib/node_modules/@stdlib/math/base/special/hacoversin/package.json
+++ b/lib/node_modules/@stdlib/math/base/special/hacoversin/package.json
@@ -74,5 +74,95 @@
"trigonometry",
"radians",
"angle"
- ]
+ ],
+ "__stdlib__": {
+ "scaffold": {
+ "$schema": "math/base@v1.0",
+ "base_alias": "hacoversin",
+ "alias": "hacoversin",
+ "pkg_desc": "compute the half-value coversed sine",
+ "desc": "computes the half-value coversed sine",
+ "short_desc": "half-value coversed sine",
+ "parameters": [
+ {
+ "name": "x",
+ "desc": "input value (in radians)",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ },
+ "domain": [
+ {
+ "min": "-infinity",
+ "max": "infinity"
+ }
+ ],
+ "rand": {
+ "prng": "random/base/uniform",
+ "parameters": [
+ -10,
+ 10
+ ]
+ },
+ "example_values": [
+ 64,
+ 27,
+ 0,
+ 0.1,
+ -9,
+ 8,
+ -1,
+ 125,
+ -10.2,
+ 11.3,
+ -12.4,
+ 3.5,
+ -1.6,
+ 15.7,
+ -16,
+ 17.9,
+ -188,
+ 19.11,
+ -200,
+ 21.15
+ ]
+ }
+ ],
+ "output_policy": "real_floating_point_and_generic",
+ "returns": {
+ "desc": "half-value coversed sine",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ }
+ },
+ "keywords": [
+ "hacoversin",
+ "hacoversine",
+ "versed sine",
+ "half-value",
+ "coversed",
+ "sinus versus",
+ "hacoversinus",
+ "hcv",
+ "hacov",
+ "semicoversin",
+ "cohaversine",
+ "versed",
+ "sine",
+ "sin",
+ "trig",
+ "trigonometry",
+ "radians",
+ "angle"
+ ],
+ "extra_keywords": [
+ "math.sin"
+ ]
+ }
+ }
}
diff --git a/lib/node_modules/@stdlib/math/base/special/haversin/package.json b/lib/node_modules/@stdlib/math/base/special/haversin/package.json
index 94a30f5b9898..82311e39085f 100644
--- a/lib/node_modules/@stdlib/math/base/special/haversin/package.json
+++ b/lib/node_modules/@stdlib/math/base/special/haversin/package.json
@@ -76,5 +76,97 @@
"trigonometry",
"radians",
"angle"
- ]
+ ],
+ "__stdlib__": {
+ "scaffold": {
+ "$schema": "math/base@v1.0",
+ "base_alias": "haversin",
+ "alias": "haversin",
+ "pkg_desc": "compute the half-value versed sine",
+ "desc": "computes the half-value versed sine",
+ "short_desc": "half-value versed sine",
+ "parameters": [
+ {
+ "name": "x",
+ "desc": "input value (in radians)",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ },
+ "domain": [
+ {
+ "min": "-infinity",
+ "max": "infinity"
+ }
+ ],
+ "rand": {
+ "prng": "random/base/uniform",
+ "parameters": [
+ -10,
+ 10
+ ]
+ },
+ "example_values": [
+ 64,
+ 27,
+ 0,
+ 0.1,
+ -9,
+ 8,
+ -1,
+ 125,
+ -10.2,
+ 11.3,
+ -12.4,
+ 3.5,
+ -1.6,
+ 15.7,
+ -16,
+ 17.9,
+ -188,
+ 19.11,
+ -200,
+ 21.15
+ ]
+ }
+ ],
+ "output_policy": "real_floating_point_and_generic",
+ "returns": {
+ "desc": "half-value versed sine",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ }
+ },
+ "keywords": [
+ "haversin",
+ "haversine",
+ "versed sine",
+ "haversed sine",
+ "haversed",
+ "hv",
+ "hvs",
+ "sem",
+ "havers",
+ "semiversinus",
+ "semiversin",
+ "semiversus",
+ "cosine",
+ "sine",
+ "cos",
+ "sin",
+ "trig",
+ "trigonometry",
+ "radians",
+ "angle"
+ ],
+ "extra_keywords": [
+ "math.sin"
+ ]
+ }
+ }
}
diff --git a/lib/node_modules/@stdlib/math/base/special/round/package.json b/lib/node_modules/@stdlib/math/base/special/round/package.json
index 60d9cd66b904..d315d56773bd 100644
--- a/lib/node_modules/@stdlib/math/base/special/round/package.json
+++ b/lib/node_modules/@stdlib/math/base/special/round/package.json
@@ -61,5 +61,80 @@
"integer",
"nearest",
"number"
- ]
+ ],
+ "__stdlib__": {
+ "scaffold": {
+ "$schema": "math/base@v1.0",
+ "base_alias": "round",
+ "alias": "round",
+ "pkg_desc": "round a numeric value to the nearest integer",
+ "desc": "rounds a numeric value to the nearest integer",
+ "short_desc": "",
+ "parameters": [
+ {
+ "name": "x",
+ "desc": "input value",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ },
+ "domain": [
+ {
+ "min": "-infinity",
+ "max": "infinity"
+ }
+ ],
+ "rand": {
+ "prng": "random/base/uniform",
+ "parameters": [
+ -10,
+ 10
+ ]
+ },
+ "example_values": [
+ -10.2,
+ 11.3,
+ -12.4,
+ 3.5,
+ -1.6,
+ 64,
+ 27.2,
+ 0,
+ 0.1,
+ -9,
+ 8.1,
+ -1,
+ 125,
+ 15.7,
+ -16.5,
+ 17.9,
+ -188.7,
+ 19.11,
+ -200.1,
+ 21.15
+ ]
+ }
+ ],
+ "output_policy": "same",
+ "returns": {
+ "desc": "function value",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ }
+ },
+ "keywords": [
+ "round",
+ "integer",
+ "nearest"
+ ],
+ "extra_keywords": [
+ "math.round"
+ ]
+ }
+ }
}
diff --git a/lib/node_modules/@stdlib/math/base/special/round2/package.json b/lib/node_modules/@stdlib/math/base/special/round2/package.json
index ebf4f2e2c2fe..8ffea4c90d7d 100644
--- a/lib/node_modules/@stdlib/math/base/special/round2/package.json
+++ b/lib/node_modules/@stdlib/math/base/special/round2/package.json
@@ -63,5 +63,82 @@
"prevpow2",
"nearest",
"number"
- ]
+ ],
+ "__stdlib__": {
+ "scaffold": {
+ "$schema": "math/base@v1.0",
+ "base_alias": "round2",
+ "alias": "round2",
+ "pkg_desc": "round a numeric value to the nearest power of two on a linear scale",
+ "desc": "rounds a numeric value to the nearest power of two on a linear scale",
+ "short_desc": "",
+ "parameters": [
+ {
+ "name": "x",
+ "desc": "input value",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ },
+ "domain": [
+ {
+ "min": "-infinity",
+ "max": "infinity"
+ }
+ ],
+ "rand": {
+ "prng": "random/base/uniform",
+ "parameters": [
+ -10,
+ 10
+ ]
+ },
+ "example_values": [
+ 64,
+ 27,
+ 0,
+ 0.1,
+ -9,
+ 8,
+ -1,
+ 125,
+ -10.2,
+ 11.3,
+ -12.4,
+ 3.5,
+ -1.6,
+ 15.7,
+ -16,
+ 17.9,
+ -188,
+ 19.11,
+ -200,
+ 21.15
+ ]
+ }
+ ],
+ "output_policy": "same",
+ "returns": {
+ "desc": "function value",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ }
+ },
+ "keywords": [
+ "round",
+ "round2",
+ "nextpow2",
+ "prevpow2",
+ "nearest"
+ ],
+ "extra_keywords": [
+ "math.round"
+ ]
+ }
+ }
}
diff --git a/lib/node_modules/@stdlib/math/base/special/secd/package.json b/lib/node_modules/@stdlib/math/base/special/secd/package.json
index 95626afded3c..f100faf4dbf2 100644
--- a/lib/node_modules/@stdlib/math/base/special/secd/package.json
+++ b/lib/node_modules/@stdlib/math/base/special/secd/package.json
@@ -63,5 +63,81 @@
"trigonometry",
"angle",
"degree"
- ]
+ ],
+ "__stdlib__": {
+ "scaffold": {
+ "$schema": "math/base@v1.0",
+ "base_alias": "secd",
+ "alias": "secd",
+ "pkg_desc": "compute the secant of an angle measured in degrees",
+ "desc": "computes the secant of an angle measured in degrees",
+ "short_desc": "secant",
+ "parameters": [
+ {
+ "name": "x",
+ "desc": "input value (in degrees)",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ },
+ "domain": [
+ {
+ "min": "-infinity",
+ "max": "infinity"
+ }
+ ],
+ "rand": {
+ "prng": "random/base/uniform",
+ "parameters": [
+ -180,
+ 180
+ ]
+ },
+ "example_values": [
+ 0,
+ 30,
+ 45,
+ 60,
+ 90,
+ 120,
+ 135,
+ 150,
+ 180,
+ -30,
+ -45,
+ -60,
+ -90,
+ -120,
+ -135,
+ -150,
+ -180
+ ]
+ }
+ ],
+ "output_policy": "real_floating_point_and_generic",
+ "returns": {
+ "desc": "secant",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ }
+ },
+ "keywords": [
+ "secant",
+ "sine",
+ "inverse",
+ "trig",
+ "trigonometry",
+ "angle",
+ "degree"
+ ],
+ "extra_keywords": [
+ "math.sec"
+ ]
+ }
+ }
}
diff --git a/lib/node_modules/@stdlib/math/base/special/secdf/package.json b/lib/node_modules/@stdlib/math/base/special/secdf/package.json
index 6fbf4c6c3a6d..1861e63d1505 100644
--- a/lib/node_modules/@stdlib/math/base/special/secdf/package.json
+++ b/lib/node_modules/@stdlib/math/base/special/secdf/package.json
@@ -62,5 +62,80 @@
"trig",
"trigonometry",
"angle"
- ]
+ ],
+ "__stdlib__": {
+ "scaffold": {
+ "$schema": "math/base@v1.0",
+ "base_alias": "secd",
+ "alias": "secdf",
+ "pkg_desc": "compute the secant of a single-precision floating-point number (in degrees)",
+ "desc": "computes the secant of a single-precision floating-point number (in degrees)",
+ "short_desc": "secant",
+ "parameters": [
+ {
+ "name": "x",
+ "desc": "input value (in degrees)",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "float",
+ "dtype": "float32"
+ },
+ "domain": [
+ {
+ "min": "-infinity",
+ "max": "infinity"
+ }
+ ],
+ "rand": {
+ "prng": "random/base/uniform",
+ "parameters": [
+ -180,
+ 180
+ ]
+ },
+ "example_values": [
+ 0,
+ 30,
+ 45,
+ 60,
+ 90,
+ 120,
+ 135,
+ 150,
+ 180,
+ -30,
+ -45,
+ -60,
+ -90,
+ -120,
+ -135,
+ -150,
+ -180
+ ]
+ }
+ ],
+ "output_policy": "real_floating_point_and_generic",
+ "returns": {
+ "desc": "secant",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "float",
+ "dtype": "float32"
+ }
+ },
+ "keywords": [
+ "secant",
+ "cosine",
+ "inverse",
+ "trig",
+ "trigonometry",
+ "angle"
+ ],
+ "extra_keywords": [
+ "math.sec"
+ ]
+ }
+ }
}
diff --git a/lib/node_modules/@stdlib/math/base/special/secf/package.json b/lib/node_modules/@stdlib/math/base/special/secf/package.json
index 5e8a39dc015d..9a766a232396 100644
--- a/lib/node_modules/@stdlib/math/base/special/secf/package.json
+++ b/lib/node_modules/@stdlib/math/base/special/secf/package.json
@@ -61,10 +61,90 @@
"cosine",
"sec",
"secant",
- "secf",
"trig",
"trigonometry",
"radians",
"angle"
- ]
+ ],
+ "__stdlib__": {
+ "scaffold": {
+ "$schema": "math/base@v1.0",
+ "base_alias": "sec",
+ "alias": "secf",
+ "pkg_desc": "compute the secant of a single-precision floating-point number (in radians)",
+ "desc": "computes the secant of a single-precision floating-point number (in radians)",
+ "short_desc": "secant",
+ "parameters": [
+ {
+ "name": "x",
+ "desc": "input value (in radians)",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "float",
+ "dtype": "float32"
+ },
+ "domain": [
+ {
+ "min": "-infinity",
+ "max": "infinity"
+ }
+ ],
+ "rand": {
+ "prng": "random/base/uniform",
+ "parameters": [
+ -10,
+ 10
+ ]
+ },
+ "example_values": [
+ 0,
+ 0.5236,
+ 0.7854,
+ 1.5708,
+ 1.0472,
+ 2.3562,
+ 3.1416,
+ 4.7124,
+ 6.2832,
+ -0.5236,
+ -0.7854,
+ -1.0472,
+ -1.5708,
+ -2.3562,
+ -3.1416,
+ 7.854,
+ -7.854,
+ 0.1,
+ -0.1,
+ 3.5
+ ]
+ }
+ ],
+ "output_policy": "real_floating_point_and_generic",
+ "returns": {
+ "desc": "secant",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "float",
+ "dtype": "float32"
+ }
+ },
+ "keywords": [
+ "cos",
+ "cosine",
+ "sec",
+ "secant",
+ "trig",
+ "trigonometry",
+ "radians",
+ "angle"
+ ],
+ "extra_keywords": [
+ "math.sec",
+ "math.cos"
+ ]
+ }
+ }
}
diff --git a/lib/node_modules/@stdlib/math/base/special/sech/package.json b/lib/node_modules/@stdlib/math/base/special/sech/package.json
index e540cc57d1e5..c682c2bfee91 100644
--- a/lib/node_modules/@stdlib/math/base/special/sech/package.json
+++ b/lib/node_modules/@stdlib/math/base/special/sech/package.json
@@ -67,5 +67,87 @@
"trigonometry",
"radians",
"angle"
- ]
+ ],
+ "__stdlib__": {
+ "scaffold": {
+ "$schema": "math/base@v1.0",
+ "base_alias": "sech",
+ "alias": "sech",
+ "pkg_desc": "compute the hyperbolic secant of a double-precision floating-point number",
+ "desc": "computes the hyperbolic secant of a double-precision floating-point number",
+ "short_desc": "hyperbolic secant",
+ "parameters": [
+ {
+ "name": "x",
+ "desc": "input value (in radians)",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ },
+ "domain": [
+ {
+ "min": "-infinity",
+ "max": "infinity"
+ }
+ ],
+ "rand": {
+ "prng": "random/base/uniform",
+ "parameters": [
+ -10,
+ 10
+ ]
+ },
+ "example_values": [
+ 0,
+ 0.5236,
+ 0.7854,
+ 1.5708,
+ 1.0472,
+ 2.3562,
+ 3.1416,
+ 4.7124,
+ 6.2832,
+ -0.5236,
+ -0.7854,
+ -1.0472,
+ -1.5708,
+ -2.3562,
+ -3.1416,
+ 7.854,
+ -7.854,
+ 0.1,
+ -0.1,
+ 3.5
+ ]
+ }
+ ],
+ "output_policy": "real_floating_point_and_generic",
+ "returns": {
+ "desc": "hyperbolic secant",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ }
+ },
+ "keywords": [
+ "sec",
+ "sech",
+ "secant",
+ "cos",
+ "cosine",
+ "hyperbolic",
+ "trig",
+ "trigonometry",
+ "radians",
+ "angle"
+ ],
+ "extra_keywords": [
+ "math.sech"
+ ]
+ }
+ }
}
diff --git a/lib/node_modules/@stdlib/math/base/special/signum/package.json b/lib/node_modules/@stdlib/math/base/special/signum/package.json
index e7de55604693..a57a50acbde4 100644
--- a/lib/node_modules/@stdlib/math/base/special/signum/package.json
+++ b/lib/node_modules/@stdlib/math/base/special/signum/package.json
@@ -64,5 +64,79 @@
"special function",
"special",
"function"
- ]
+ ],
+ "__stdlib__": {
+ "scaffold": {
+ "$schema": "math/base@v1.0",
+ "base_alias": "signum",
+ "alias": "signum",
+ "pkg_desc": "evaluate the signum function for a double-precision floating-point number",
+ "desc": "evaluates the signum function for a double-precision floating-point number",
+ "short_desc": "signum",
+ "parameters": [
+ {
+ "name": "x",
+ "desc": "input value",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ },
+ "domain": [
+ {
+ "min": "-infinity",
+ "max": "infinity"
+ }
+ ],
+ "rand": {
+ "prng": "random/base/uniform",
+ "parameters": [
+ -100,
+ 100
+ ]
+ },
+ "example_values": [
+ -100,
+ 0.1,
+ 0.5,
+ -50,
+ -10,
+ 10,
+ 25,
+ -5,
+ -3.5,
+ -1,
+ -0.5,
+ -0.1,
+ 0,
+ 1,
+ 3.5,
+ 5,
+ 50,
+ 75,
+ 100,
+ -75
+ ]
+ }
+ ],
+ "output_policy": "real_floating_point_and_generic",
+ "returns": {
+ "desc": "signum",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ }
+ },
+ "keywords": [
+ "signum",
+ "sign"
+ ],
+ "extra_keywords": [
+ "math.sign"
+ ]
+ }
+ }
}
diff --git a/lib/node_modules/@stdlib/math/base/special/signumf/package.json b/lib/node_modules/@stdlib/math/base/special/signumf/package.json
index fc5519cd62e8..b1d23bd2d5fc 100644
--- a/lib/node_modules/@stdlib/math/base/special/signumf/package.json
+++ b/lib/node_modules/@stdlib/math/base/special/signumf/package.json
@@ -69,5 +69,79 @@
"single-precision",
"f32",
"flt"
- ]
+ ],
+ "__stdlib__": {
+ "scaffold": {
+ "$schema": "math/base@v1.0",
+ "base_alias": "signum",
+ "alias": "signumf",
+ "pkg_desc": "evaluate the signum function for a single-precision floating-point number",
+ "desc": "evaluates the signum function for a single-precision floating-point number",
+ "short_desc": "signum",
+ "parameters": [
+ {
+ "name": "x",
+ "desc": "input value",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "float",
+ "dtype": "float32"
+ },
+ "domain": [
+ {
+ "min": "-infinity",
+ "max": "infinity"
+ }
+ ],
+ "rand": {
+ "prng": "random/base/uniform",
+ "parameters": [
+ -100,
+ 100
+ ]
+ },
+ "example_values": [
+ -100,
+ 0.1,
+ 0.5,
+ 1,
+ -50,
+ -10,
+ 10,
+ 25,
+ -5,
+ -3.5,
+ -1,
+ -0.5,
+ -0.1,
+ 0,
+ 3.5,
+ 5,
+ 50,
+ 75,
+ 100,
+ -75
+ ]
+ }
+ ],
+ "output_policy": "real_floating_point_and_generic",
+ "returns": {
+ "desc": "signum",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "float",
+ "dtype": "float32"
+ }
+ },
+ "keywords": [
+ "signum",
+ "sign"
+ ],
+ "extra_keywords": [
+ "math.sign"
+ ]
+ }
+ }
}
diff --git a/lib/node_modules/@stdlib/math/base/special/versin/package.json b/lib/node_modules/@stdlib/math/base/special/versin/package.json
index 8e53f9a896f1..0d18b52ebee5 100644
--- a/lib/node_modules/@stdlib/math/base/special/versin/package.json
+++ b/lib/node_modules/@stdlib/math/base/special/versin/package.json
@@ -65,5 +65,86 @@
"trigonometry",
"radians",
"angle"
- ]
+ ],
+ "__stdlib__": {
+ "scaffold": {
+ "$schema": "math/base@v1.0",
+ "base_alias": "versin",
+ "alias": "versin",
+ "pkg_desc": "compute the versed sine",
+ "desc": "computes the versed sine",
+ "short_desc": "versed sine",
+ "parameters": [
+ {
+ "name": "x",
+ "desc": "input value (in radians)",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ },
+ "domain": [
+ {
+ "min": "-infinity",
+ "max": "infinity"
+ }
+ ],
+ "rand": {
+ "prng": "random/base/uniform",
+ "parameters": [
+ -10,
+ 10
+ ]
+ },
+ "example_values": [
+ 64,
+ 27,
+ 0,
+ 0.1,
+ -9,
+ 8,
+ -1,
+ 125,
+ -10.2,
+ 11.3,
+ -12.4,
+ 3.5,
+ -1.6,
+ 15.7,
+ -16,
+ 17.9,
+ -188,
+ 19.11,
+ -200,
+ 21.15
+ ]
+ }
+ ],
+ "output_policy": "real_floating_point_and_generic",
+ "returns": {
+ "desc": "versed sine",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ }
+ },
+ "keywords": [
+ "versin",
+ "versine",
+ "versed sine",
+ "cosine",
+ "cos",
+ "trig",
+ "trigonometry",
+ "radians",
+ "angle"
+ ],
+ "extra_keywords": [
+ "math.sin"
+ ]
+ }
+ }
}
diff --git a/lib/node_modules/@stdlib/math/special/data/unary.json b/lib/node_modules/@stdlib/math/special/data/unary.json
index ae3d67a27aa8..be74f78f20ae 100644
--- a/lib/node_modules/@stdlib/math/special/data/unary.json
+++ b/lib/node_modules/@stdlib/math/special/data/unary.json
@@ -5034,7 +5034,141 @@
"math.ceil"
]
},
- "@stdlib/math/base/special/cceilf": {},
+ "@stdlib/math/base/special/cceilf": {
+ "$schema": "math/base@v1.0",
+ "base_alias": "ceil",
+ "alias": "cceilf",
+ "pkg_desc": "round each component of a complex number toward positive infinity",
+ "desc": "rounds each component of a complex number toward positive infinity",
+ "short_desc": "",
+ "parameters": [
+ {
+ "name": "z",
+ "desc": "input value",
+ "type": {
+ "javascript": "Complex64",
+ "jsdoc": "Complex64",
+ "c": "stdlib_complex64_t",
+ "dtype": "complex64"
+ },
+ "domain": null,
+ "rand": {
+ "prng": "random/base/uniform",
+ "parameters": [
+ [
+ -10,
+ 10
+ ],
+ [
+ -10,
+ 10
+ ]
+ ]
+ },
+ "example_values": [
+ {
+ "re": -3.14,
+ "im": -1.5
+ },
+ {
+ "re": 0,
+ "im": 0
+ },
+ {
+ "re": -1.5,
+ "im": 2.5
+ },
+ {
+ "re": 2.5,
+ "im": -1.5
+ },
+ {
+ "re": 0,
+ "im": -3.7
+ },
+ {
+ "re": 4.2,
+ "im": 0
+ },
+ {
+ "re": 21.2,
+ "im": 3
+ },
+ {
+ "re": 11,
+ "im": -5
+ },
+ {
+ "re": 33,
+ "im": -14.67
+ },
+ {
+ "re": -42,
+ "im": 9.3
+ },
+ {
+ "re": -3,
+ "im": 3
+ },
+ {
+ "re": 73,
+ "im": 31
+ },
+ {
+ "re": -2.45,
+ "im": 1.23
+ },
+ {
+ "re": 2.45,
+ "im": -1.23
+ },
+ {
+ "re": 1.77,
+ "im": -3.14
+ },
+ {
+ "re": -7.5,
+ "im": 8.2
+ },
+ {
+ "re": 5.5,
+ "im": -12.3
+ },
+ {
+ "re": -15.8,
+ "im": 0.4
+ },
+ {
+ "re": 0.99,
+ "im": -0.99
+ }
+ ]
+ }
+ ],
+ "returns": {
+ "desc": "result",
+ "type": {
+ "javascript": "Complex64",
+ "jsdoc": "Complex64",
+ "c": "stdlib_complex64_t",
+ "dtype": "complex64"
+ }
+ },
+ "keywords": [
+ "ceil",
+ "cceil",
+ "round",
+ "integer",
+ "nearest",
+ "value",
+ "complex",
+ "cmplx",
+ "number"
+ ],
+ "extra_keywords": [
+ "math.ceil"
+ ]
+ },
"@stdlib/math/base/special/cceil": {
"$schema": "math/base@v1.0",
"base_alias": "ceil",
@@ -8449,7 +8583,82 @@
],
"extra_keywords": []
},
- "@stdlib/math/base/special/factoriallnf": {},
+ "@stdlib/math/base/special/factoriallnf": {
+ "$schema": "math/base@v1.0",
+ "base_alias": "factorialln",
+ "alias": "factoriallnf",
+ "pkg_desc": "compute the natural logarithm of the factorial function",
+ "desc": "computes the natural logarithm of the factorial function",
+ "short_desc": "natural logarithm of the factorial function",
+ "parameters": [
+ {
+ "name": "x",
+ "desc": "input value",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "float",
+ "dtype": "float32"
+ },
+ "domain": [
+ {
+ "min": 0,
+ "max": "infinity"
+ }
+ ],
+ "rand": {
+ "prng": "random/base/discrete-uniform",
+ "parameters": [
+ 0,
+ 100
+ ]
+ },
+ "example_values": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 93,
+ 95,
+ 96,
+ 97,
+ 98,
+ 99
+ ]
+ }
+ ],
+ "output_policy": "real_floating_point_and_generic",
+ "returns": {
+ "desc": "result",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "float",
+ "dtype": "float32"
+ }
+ },
+ "keywords": [
+ "factorial",
+ "log-scale",
+ "logarithm",
+ "fact",
+ "lfact",
+ "factorialln",
+ "combinatorics",
+ "gamma"
+ ],
+ "extra_keywords": []
+ },
"@stdlib/math/base/special/factorialln": {
"$schema": "math/base@v1.0",
"base_alias": "factorialln",
@@ -8599,37 +8808,22 @@
"@stdlib/math/base/special/fibonacci-indexf": {},
"@stdlib/math/base/special/fibonacci-index": {},
"@stdlib/math/base/special/floorf": {},
- "@stdlib/math/base/special/floor": {},
- "@stdlib/math/base/special/cfloorf": {},
- "@stdlib/math/base/special/cfloor": {},
- "@stdlib/math/base/special/floor10": {},
- "@stdlib/math/base/special/floor2": {},
- "@stdlib/math/base/special/fresnel": {},
- "@stdlib/math/base/special/fresnelc": {},
- "@stdlib/math/base/special/fresnels": {},
- "@stdlib/math/base/special/gamma": {},
- "@stdlib/math/base/special/gamma-lanczos-sum": {},
- "@stdlib/math/base/special/gamma-lanczos-sum-expg-scaledf": {},
- "@stdlib/math/base/special/gamma-lanczos-sum-expg-scaled": {},
- "@stdlib/math/base/special/gamma1pm1": {},
- "@stdlib/math/base/special/gammasgnf": {},
- "@stdlib/math/base/special/gammasgn": {},
- "@stdlib/math/base/special/hacovercosf": {
+ "@stdlib/math/base/special/floor": {
"$schema": "math/base@v1.0",
- "base_alias": "hacovercos",
- "alias": "hacovercosf",
- "pkg_desc": "compute the half-value coversed cosine",
- "desc": "computes the half-value coversed cosine",
- "short_desc": "half-value coversed cosine",
+ "base_alias": "floor",
+ "alias": "floor",
+ "pkg_desc": "round a double-precision floating-point number toward negative infinity",
+ "desc": "rounds a double-precision floating-point number toward negative infinity",
+ "short_desc": "",
"parameters": [
{
"name": "x",
- "desc": "input value (in radians)",
+ "desc": "input value",
"type": {
"javascript": "number",
"jsdoc": "number",
- "c": "float",
- "dtype": "float32"
+ "c": "double",
+ "dtype": "float64"
},
"domain": [
{
@@ -8645,26 +8839,113 @@
]
},
"example_values": [
- 64,
- 27,
- 0,
- 0.1,
- -9,
- 8,
- -1,
- 125,
- -10.2,
- 11.3,
- -12.4,
+ -3.7,
3.5,
- -1.6,
- 15.7,
- -16,
- 17.9,
- -188,
- 19.11,
- -200,
- 21.15
+ -1.2,
+ -0.1,
+ 0.1,
+ 1.1,
+ 2.9,
+ 5.5,
+ 10.2,
+ 5.9,
+ 2.25,
+ -3.14,
+ 5,
+ 4.33,
+ 10.2,
+ -9.99,
+ 9.99,
+ 2.12,
+ -0.5,
+ 0.5
+ ]
+ }
+ ],
+ "returns": {
+ "desc": "function value",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ }
+ },
+ "keywords": [
+ "floor",
+ "round",
+ "integer",
+ "nearest"
+ ],
+ "extra_keywords": [
+ "math.floor"
+ ]
+ },
+ "@stdlib/math/base/special/cfloorf": {},
+ "@stdlib/math/base/special/cfloor": {},
+ "@stdlib/math/base/special/floor10": {},
+ "@stdlib/math/base/special/floor2": {},
+ "@stdlib/math/base/special/fresnel": {},
+ "@stdlib/math/base/special/fresnelc": {},
+ "@stdlib/math/base/special/fresnels": {},
+ "@stdlib/math/base/special/gamma": {},
+ "@stdlib/math/base/special/gamma-lanczos-sum": {},
+ "@stdlib/math/base/special/gamma-lanczos-sum-expg-scaledf": {},
+ "@stdlib/math/base/special/gamma-lanczos-sum-expg-scaled": {},
+ "@stdlib/math/base/special/gamma1pm1": {},
+ "@stdlib/math/base/special/gammasgnf": {},
+ "@stdlib/math/base/special/gammasgn": {},
+ "@stdlib/math/base/special/hacovercosf": {
+ "$schema": "math/base@v1.0",
+ "base_alias": "hacovercos",
+ "alias": "hacovercosf",
+ "pkg_desc": "compute the half-value coversed cosine",
+ "desc": "computes the half-value coversed cosine",
+ "short_desc": "half-value coversed cosine",
+ "parameters": [
+ {
+ "name": "x",
+ "desc": "input value (in radians)",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "float",
+ "dtype": "float32"
+ },
+ "domain": [
+ {
+ "min": "-infinity",
+ "max": "infinity"
+ }
+ ],
+ "rand": {
+ "prng": "random/base/uniform",
+ "parameters": [
+ -10,
+ 10
+ ]
+ },
+ "example_values": [
+ 64,
+ 27,
+ 0,
+ 0.1,
+ -9,
+ 8,
+ -1,
+ 125,
+ -10.2,
+ 11.3,
+ -12.4,
+ 3.5,
+ -1.6,
+ 15.7,
+ -16,
+ 17.9,
+ -188,
+ 19.11,
+ -200,
+ 21.15
]
}
],
@@ -8789,7 +9070,94 @@
],
"extra_keywords": []
},
- "@stdlib/math/base/special/hacoversin": {},
+ "@stdlib/math/base/special/hacoversin": {
+ "$schema": "math/base@v1.0",
+ "base_alias": "hacoversin",
+ "alias": "hacoversin",
+ "pkg_desc": "compute the half-value coversed sine",
+ "desc": "computes the half-value coversed sine",
+ "short_desc": "half-value coversed sine",
+ "parameters": [
+ {
+ "name": "x",
+ "desc": "input value (in radians)",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ },
+ "domain": [
+ {
+ "min": "-infinity",
+ "max": "infinity"
+ }
+ ],
+ "rand": {
+ "prng": "random/base/uniform",
+ "parameters": [
+ -10,
+ 10
+ ]
+ },
+ "example_values": [
+ 64,
+ 27,
+ 0,
+ 0.1,
+ -9,
+ 8,
+ -1,
+ 125,
+ -10.2,
+ 11.3,
+ -12.4,
+ 3.5,
+ -1.6,
+ 15.7,
+ -16,
+ 17.9,
+ -188,
+ 19.11,
+ -200,
+ 21.15
+ ]
+ }
+ ],
+ "output_policy": "real_floating_point_and_generic",
+ "returns": {
+ "desc": "half-value coversed sine",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ }
+ },
+ "keywords": [
+ "hacoversin",
+ "hacoversine",
+ "versed sine",
+ "half-value",
+ "coversed",
+ "sinus versus",
+ "hacoversinus",
+ "hcv",
+ "hacov",
+ "semicoversin",
+ "cohaversine",
+ "versed",
+ "sine",
+ "sin",
+ "trig",
+ "trigonometry",
+ "radians",
+ "angle"
+ ],
+ "extra_keywords": [
+ "math.sin"
+ ]
+ },
"@stdlib/math/base/special/havercosf": {
"$schema": "math/base@v1.0",
"base_alias": "havercos",
@@ -9039,29 +9407,17 @@
],
"extra_keywords": []
},
- "@stdlib/math/base/special/haversin": {},
- "@stdlib/math/base/special/invf": {},
- "@stdlib/math/base/special/inv": {},
- "@stdlib/math/base/special/cinvf": {},
- "@stdlib/math/base/special/cinv": {},
- "@stdlib/math/base/special/lnf": {},
- "@stdlib/math/base/special/ln": {},
- "@stdlib/math/base/special/log10": {},
- "@stdlib/math/base/special/log1mexp": {},
- "@stdlib/math/base/special/log1p": {},
- "@stdlib/math/base/special/log1pexp": {},
- "@stdlib/math/base/special/log1pmx": {},
- "@stdlib/math/base/special/log2": {
+ "@stdlib/math/base/special/haversin": {
"$schema": "math/base@v1.0",
- "base_alias": "log2",
- "alias": "log2",
- "pkg_desc": "compute the binary logarithm",
- "desc": "computes the binary logarithm",
- "short_desc": "binary logarithm",
+ "base_alias": "haversin",
+ "alias": "haversin",
+ "pkg_desc": "compute the half-value versed sine",
+ "desc": "computes the half-value versed sine",
+ "short_desc": "half-value versed sine",
"parameters": [
{
"name": "x",
- "desc": "input value",
+ "desc": "input value (in radians)",
"type": {
"javascript": "number",
"jsdoc": "number",
@@ -9070,44 +9426,697 @@
},
"domain": [
{
- "min": 0,
+ "min": "-infinity",
"max": "infinity"
}
],
"rand": {
"prng": "random/base/uniform",
"parameters": [
- 0,
- 100
+ -10,
+ 10
]
},
"example_values": [
- 0,
- 0.01,
- 0.25,
- 0.5,
- 1,
- 2,
- 3,
- 4,
- 9,
- 16,
- 25,
- 36,
- 49,
64,
- 81,
- 100,
+ 27,
+ 0,
+ 0.1,
+ -9,
+ 8,
+ -1,
+ 125,
+ -10.2,
+ 11.3,
+ -12.4,
+ 3.5,
+ -1.6,
+ 15.7,
+ -16,
+ 17.9,
+ -188,
+ 19.11,
+ -200,
+ 21.15
+ ]
+ }
+ ],
+ "output_policy": "real_floating_point_and_generic",
+ "returns": {
+ "desc": "half-value versed sine",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ }
+ },
+ "keywords": [
+ "haversin",
+ "haversine",
+ "versed sine",
+ "haversed sine",
+ "haversed",
+ "hv",
+ "hvs",
+ "sem",
+ "havers",
+ "semiversinus",
+ "semiversin",
+ "semiversus",
+ "cosine",
+ "sine",
+ "cos",
+ "sin",
+ "trig",
+ "trigonometry",
+ "radians",
+ "angle"
+ ],
+ "extra_keywords": [
+ "math.sin"
+ ]
+ },
+ "@stdlib/math/base/special/invf": {},
+ "@stdlib/math/base/special/inv": {},
+ "@stdlib/math/base/special/cinvf": {},
+ "@stdlib/math/base/special/cinv": {},
+ "@stdlib/math/base/special/lnf": {},
+ "@stdlib/math/base/special/ln": {},
+ "@stdlib/math/base/special/log10": {},
+ "@stdlib/math/base/special/log1mexp": {},
+ "@stdlib/math/base/special/log1p": {},
+ "@stdlib/math/base/special/log1pexp": {},
+ "@stdlib/math/base/special/log1pmx": {},
+ "@stdlib/math/base/special/log2": {
+ "$schema": "math/base@v1.0",
+ "base_alias": "log2",
+ "alias": "log2",
+ "pkg_desc": "compute the binary logarithm",
+ "desc": "computes the binary logarithm",
+ "short_desc": "binary logarithm",
+ "parameters": [
+ {
+ "name": "x",
+ "desc": "input value",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ },
+ "domain": [
+ {
+ "min": 0,
+ "max": "infinity"
+ }
+ ],
+ "rand": {
+ "prng": "random/base/uniform",
+ "parameters": [
+ 0,
+ 100
+ ]
+ },
+ "example_values": [
+ 0,
+ 0.01,
+ 0.25,
+ 0.5,
+ 1,
+ 2,
+ 3,
+ 4,
+ 9,
+ 16,
+ 25,
+ 36,
+ 49,
+ 64,
+ 81,
+ 100,
+ 0.1,
+ 10,
+ 50,
+ 99.99
+ ]
+ }
+ ],
+ "output_policy": "real_floating_point_and_generic",
+ "returns": {
+ "desc": "binary logarithm",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ }
+ },
+ "keywords": [
+ "logarithm",
+ "log2",
+ "binary",
+ "base 2",
+ "log"
+ ],
+ "extra_keywords": [
+ "math.log2"
+ ]
+ },
+ "@stdlib/math/base/special/logitf": {},
+ "@stdlib/math/base/special/logit": {},
+ "@stdlib/math/base/special/lucasf": {},
+ "@stdlib/math/base/special/lucas": {},
+ "@stdlib/math/base/special/negafibonaccif": {},
+ "@stdlib/math/base/special/negafibonacci": {},
+ "@stdlib/math/base/special/negalucasf": {},
+ "@stdlib/math/base/special/negalucas": {},
+ "@stdlib/math/base/special/nonfibonaccif": {},
+ "@stdlib/math/base/special/nonfibonacci": {},
+ "@stdlib/math/base/special/rad2degf": {},
+ "@stdlib/math/base/special/rad2deg": {},
+ "@stdlib/math/base/special/rampf": {},
+ "@stdlib/math/base/special/ramp": {},
+ "@stdlib/math/base/special/rcbrtf": {},
+ "@stdlib/math/base/special/rcbrt": {},
+ "@stdlib/math/base/special/riemann-zeta": {},
+ "@stdlib/math/base/special/roundf": {},
+ "@stdlib/math/base/special/round": {
+ "$schema": "math/base@v1.0",
+ "base_alias": "round",
+ "alias": "round",
+ "pkg_desc": "round a numeric value to the nearest integer",
+ "desc": "rounds a numeric value to the nearest integer",
+ "short_desc": "",
+ "parameters": [
+ {
+ "name": "x",
+ "desc": "input value",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ },
+ "domain": [
+ {
+ "min": "-infinity",
+ "max": "infinity"
+ }
+ ],
+ "rand": {
+ "prng": "random/base/uniform",
+ "parameters": [
+ -10,
+ 10
+ ]
+ },
+ "example_values": [
+ -10.2,
+ 11.3,
+ -12.4,
+ 3.5,
+ -1.6,
+ 64,
+ 27.2,
+ 0,
+ 0.1,
+ -9,
+ 8.1,
+ -1,
+ 125,
+ 15.7,
+ -16.5,
+ 17.9,
+ -188.7,
+ 19.11,
+ -200.1,
+ 21.15
+ ]
+ }
+ ],
+ "output_policy": "same",
+ "returns": {
+ "desc": "function value",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ }
+ },
+ "keywords": [
+ "round",
+ "integer",
+ "nearest"
+ ],
+ "extra_keywords": [
+ "math.round"
+ ]
+ },
+ "@stdlib/math/base/special/croundf": {},
+ "@stdlib/math/base/special/cround": {},
+ "@stdlib/math/base/special/round-nearest-even": {
+ "$schema": "math/base@v1.0",
+ "base_alias": "roundNearestEven",
+ "alias": "roundNearestEven",
+ "pkg_desc": "round to the nearest integer with ties rounding to the nearest even integer",
+ "desc": "rounds to the nearest integer with ties rounding to the nearest even integer",
+ "short_desc": "rounds to nearest integer",
+ "parameters": [
+ {
+ "name": "x",
+ "desc": "input value",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ },
+ "domain": [
+ {
+ "min": "-infinity",
+ "max": "infinity"
+ }
+ ],
+ "rand": {
+ "prng": "random/base/uniform",
+ "parameters": [
+ -10,
+ 10
+ ]
+ },
+ "example_values": [
+ 64,
+ 27,
+ 0,
+ 0.1,
+ -9,
+ 8,
+ -1,
+ 125,
+ -10.2,
+ 11.3,
+ -12.4,
+ 3.5,
+ -1.6,
+ 15.7,
+ -16,
+ 17.9,
+ -188,
+ 19.11,
+ -200,
+ 21.15
+ ]
+ }
+ ],
+ "output_policy": "same",
+ "returns": {
+ "desc": "function value",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ }
+ },
+ "keywords": [
+ "round",
+ "round-nearest-even",
+ "round-nearest",
+ "integer",
+ "nearest",
+ "number"
+ ],
+ "extra_keywords": [
+ "math.round"
+ ]
+ },
+ "@stdlib/math/base/special/round10": {},
+ "@stdlib/math/base/special/round2": {
+ "$schema": "math/base@v1.0",
+ "base_alias": "round2",
+ "alias": "round2",
+ "pkg_desc": "round a numeric value to the nearest power of two on a linear scale",
+ "desc": "rounds a numeric value to the nearest power of two on a linear scale",
+ "short_desc": "",
+ "parameters": [
+ {
+ "name": "x",
+ "desc": "input value",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ },
+ "domain": [
+ {
+ "min": "-infinity",
+ "max": "infinity"
+ }
+ ],
+ "rand": {
+ "prng": "random/base/uniform",
+ "parameters": [
+ -10,
+ 10
+ ]
+ },
+ "example_values": [
+ 64,
+ 27,
+ 0,
+ 0.1,
+ -9,
+ 8,
+ -1,
+ 125,
+ -10.2,
+ 11.3,
+ -12.4,
+ 3.5,
+ -1.6,
+ 15.7,
+ -16,
+ 17.9,
+ -188,
+ 19.11,
+ -200,
+ 21.15
+ ]
+ }
+ ],
+ "output_policy": "same",
+ "returns": {
+ "desc": "function value",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ }
+ },
+ "keywords": [
+ "round",
+ "round2",
+ "nextpow2",
+ "prevpow2",
+ "nearest"
+ ],
+ "extra_keywords": [
+ "math.round"
+ ]
+ },
+ "@stdlib/math/base/special/rsqrtf": {},
+ "@stdlib/math/base/special/rsqrt": {},
+ "@stdlib/math/base/special/secf": {
+ "$schema": "math/base@v1.0",
+ "base_alias": "sec",
+ "alias": "secf",
+ "pkg_desc": "compute the secant of a single-precision floating-point number (in radians)",
+ "desc": "computes the secant of a single-precision floating-point number (in radians)",
+ "short_desc": "secant",
+ "parameters": [
+ {
+ "name": "x",
+ "desc": "input value (in radians)",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "float",
+ "dtype": "float32"
+ },
+ "domain": [
+ {
+ "min": "-infinity",
+ "max": "infinity"
+ }
+ ],
+ "rand": {
+ "prng": "random/base/uniform",
+ "parameters": [
+ -10,
+ 10
+ ]
+ },
+ "example_values": [
+ 0,
+ 0.5236,
+ 0.7854,
+ 1.5708,
+ 1.0472,
+ 2.3562,
+ 3.1416,
+ 4.7124,
+ 6.2832,
+ -0.5236,
+ -0.7854,
+ -1.0472,
+ -1.5708,
+ -2.3562,
+ -3.1416,
+ 7.854,
+ -7.854,
+ 0.1,
+ -0.1,
+ 3.5
+ ]
+ }
+ ],
+ "output_policy": "real_floating_point_and_generic",
+ "returns": {
+ "desc": "secant",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "float",
+ "dtype": "float32"
+ }
+ },
+ "keywords": [
+ "cos",
+ "cosine",
+ "sec",
+ "secant",
+ "trig",
+ "trigonometry",
+ "radians",
+ "angle"
+ ],
+ "extra_keywords": [
+ "math.sec",
+ "math.cos"
+ ]
+ },
+ "@stdlib/math/base/special/sec": {
+ "$schema": "math/base@v1.0",
+ "base_alias": "sec",
+ "alias": "sec",
+ "pkg_desc": "compute the secant",
+ "desc": "computes the secant",
+ "short_desc": "secant",
+ "parameters": [
+ {
+ "name": "x",
+ "desc": "input value (in radians)",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ },
+ "domain": [
+ {
+ "min": "-infinity",
+ "max": "infinity"
+ }
+ ],
+ "rand": {
+ "prng": "random/base/uniform",
+ "parameters": [
+ -10,
+ 10
+ ]
+ },
+ "example_values": [
+ 0,
+ 0.5236,
+ 0.7854,
+ 1.5708,
+ 1.0472,
+ 2.3562,
+ 3.1416,
+ 4.7124,
+ 6.2832,
+ -0.5236,
+ -0.7854,
+ -1.0472,
+ -1.5708,
+ -2.3562,
+ -3.1416,
+ 7.854,
+ -7.854,
+ 0.1,
+ -0.1,
+ 3.5
+ ]
+ }
+ ],
+ "output_policy": "real_floating_point_and_generic",
+ "returns": {
+ "desc": "secant",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ }
+ },
+ "keywords": [
+ "sec",
+ "secant",
+ "trig",
+ "trigonometry",
+ "cos",
+ "cosine"
+ ],
+ "extra_keywords": [
+ "math.sec",
+ "math.cos"
+ ]
+ },
+ "@stdlib/math/base/special/secd": {
+ "$schema": "math/base@v1.0",
+ "base_alias": "secd",
+ "alias": "secd",
+ "pkg_desc": "compute the secant of an angle measured in degrees",
+ "desc": "computes the secant of an angle measured in degrees",
+ "short_desc": "secant",
+ "parameters": [
+ {
+ "name": "x",
+ "desc": "input value (in degrees)",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ },
+ "domain": [
+ {
+ "min": "-infinity",
+ "max": "infinity"
+ }
+ ],
+ "rand": {
+ "prng": "random/base/uniform",
+ "parameters": [
+ -180,
+ 180
+ ]
+ },
+ "example_values": [
+ 0,
+ 30,
+ 45,
+ 60,
+ 90,
+ 120,
+ 135,
+ 150,
+ 180,
+ -30,
+ -45,
+ -60,
+ -90,
+ -120,
+ -135,
+ -150,
+ -180
+ ]
+ }
+ ],
+ "output_policy": "real_floating_point_and_generic",
+ "returns": {
+ "desc": "secant",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ }
+ },
+ "keywords": [
+ "secant",
+ "sine",
+ "inverse",
+ "trig",
+ "trigonometry",
+ "angle",
+ "degree"
+ ],
+ "extra_keywords": [
+ "math.sec"
+ ]
+ },
+ "@stdlib/math/base/special/sech": {
+ "$schema": "math/base@v1.0",
+ "base_alias": "sech",
+ "alias": "sech",
+ "pkg_desc": "compute the hyperbolic secant of a double-precision floating-point number",
+ "desc": "computes the hyperbolic secant of a double-precision floating-point number",
+ "short_desc": "hyperbolic secant",
+ "parameters": [
+ {
+ "name": "x",
+ "desc": "input value (in radians)",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ },
+ "domain": [
+ {
+ "min": "-infinity",
+ "max": "infinity"
+ }
+ ],
+ "rand": {
+ "prng": "random/base/uniform",
+ "parameters": [
+ -10,
+ 10
+ ]
+ },
+ "example_values": [
+ 0,
+ 0.5236,
+ 0.7854,
+ 1.5708,
+ 1.0472,
+ 2.3562,
+ 3.1416,
+ 4.7124,
+ 6.2832,
+ -0.5236,
+ -0.7854,
+ -1.0472,
+ -1.5708,
+ -2.3562,
+ -3.1416,
+ 7.854,
+ -7.854,
0.1,
- 10,
- 50,
- 99.99
+ -0.1,
+ 3.5
]
}
],
"output_policy": "real_floating_point_and_generic",
"returns": {
- "desc": "binary logarithm",
+ "desc": "hyperbolic secant",
"type": {
"javascript": "number",
"jsdoc": "number",
@@ -9116,44 +10125,28 @@
}
},
"keywords": [
- "logarithm",
- "log2",
- "binary",
- "base 2",
- "log"
+ "sec",
+ "sech",
+ "secant",
+ "cos",
+ "cosine",
+ "hyperbolic",
+ "trig",
+ "trigonometry",
+ "radians",
+ "angle"
],
"extra_keywords": [
- "math.log2"
+ "math.sech"
]
},
- "@stdlib/math/base/special/logitf": {},
- "@stdlib/math/base/special/logit": {},
- "@stdlib/math/base/special/lucasf": {},
- "@stdlib/math/base/special/lucas": {},
- "@stdlib/math/base/special/negafibonaccif": {},
- "@stdlib/math/base/special/negafibonacci": {},
- "@stdlib/math/base/special/negalucasf": {},
- "@stdlib/math/base/special/negalucas": {},
- "@stdlib/math/base/special/nonfibonaccif": {},
- "@stdlib/math/base/special/nonfibonacci": {},
- "@stdlib/math/base/special/rad2degf": {},
- "@stdlib/math/base/special/rad2deg": {},
- "@stdlib/math/base/special/rampf": {},
- "@stdlib/math/base/special/ramp": {},
- "@stdlib/math/base/special/rcbrtf": {},
- "@stdlib/math/base/special/rcbrt": {},
- "@stdlib/math/base/special/riemann-zeta": {},
- "@stdlib/math/base/special/roundf": {},
- "@stdlib/math/base/special/round": {},
- "@stdlib/math/base/special/croundf": {},
- "@stdlib/math/base/special/cround": {},
- "@stdlib/math/base/special/round-nearest-even": {
+ "@stdlib/math/base/special/signumf": {
"$schema": "math/base@v1.0",
- "base_alias": "roundNearestEven",
- "alias": "roundNearestEven",
- "pkg_desc": "round to the nearest integer with ties rounding to the nearest even integer",
- "desc": "rounds to the nearest integer with ties rounding to the nearest even integer",
- "short_desc": "rounds to nearest integer",
+ "base_alias": "signum",
+ "alias": "signumf",
+ "pkg_desc": "evaluate the signum function for a single-precision floating-point number",
+ "desc": "evaluates the signum function for a single-precision floating-point number",
+ "short_desc": "signum",
"parameters": [
{
"name": "x",
@@ -9161,8 +10154,8 @@
"type": {
"javascript": "number",
"jsdoc": "number",
- "c": "double",
- "dtype": "float64"
+ "c": "float",
+ "dtype": "float32"
},
"domain": [
{
@@ -9173,72 +10166,63 @@
"rand": {
"prng": "random/base/uniform",
"parameters": [
- -10,
- 10
+ -100,
+ 100
]
},
"example_values": [
- 64,
- 27,
- 0,
+ -100,
0.1,
- -9,
- 8,
+ 0.5,
+ 1,
+ -50,
+ -10,
+ 10,
+ 25,
+ -5,
+ -3.5,
-1,
- 125,
- -10.2,
- 11.3,
- -12.4,
+ -0.5,
+ -0.1,
+ 0,
3.5,
- -1.6,
- 15.7,
- -16,
- 17.9,
- -188,
- 19.11,
- -200,
- 21.15
+ 5,
+ 50,
+ 75,
+ 100,
+ -75
]
}
],
- "output_policy": "same",
+ "output_policy": "real_floating_point_and_generic",
"returns": {
- "desc": "function value",
+ "desc": "signum",
"type": {
"javascript": "number",
"jsdoc": "number",
- "c": "double",
- "dtype": "float64"
+ "c": "float",
+ "dtype": "float32"
}
},
"keywords": [
- "round",
- "round-nearest-even",
- "round-nearest",
- "integer",
- "nearest",
- "number"
+ "signum",
+ "sign"
],
"extra_keywords": [
- "math.round"
+ "math.sign"
]
},
- "@stdlib/math/base/special/round10": {},
- "@stdlib/math/base/special/round2": {},
- "@stdlib/math/base/special/rsqrtf": {},
- "@stdlib/math/base/special/rsqrt": {},
- "@stdlib/math/base/special/secf": {},
- "@stdlib/math/base/special/sec": {
+ "@stdlib/math/base/special/signum": {
"$schema": "math/base@v1.0",
- "base_alias": "sec",
- "alias": "sec",
- "pkg_desc": "compute the secant",
- "desc": "computes the secant",
- "short_desc": "secant",
+ "base_alias": "signum",
+ "alias": "signum",
+ "pkg_desc": "evaluate the signum function for a double-precision floating-point number",
+ "desc": "evaluates the signum function for a double-precision floating-point number",
+ "short_desc": "signum",
"parameters": [
{
"name": "x",
- "desc": "input value (in radians)",
+ "desc": "input value",
"type": {
"javascript": "number",
"jsdoc": "number",
@@ -9254,37 +10238,37 @@
"rand": {
"prng": "random/base/uniform",
"parameters": [
- -10,
- 10
+ -100,
+ 100
]
},
"example_values": [
- 0,
- 0.5236,
- 0.7854,
- 1.5708,
- 1.0472,
- 2.3562,
- 3.1416,
- 4.7124,
- 6.2832,
- -0.5236,
- -0.7854,
- -1.0472,
- -1.5708,
- -2.3562,
- -3.1416,
- 7.854,
- -7.854,
+ -100,
0.1,
+ 0.5,
+ -50,
+ -10,
+ 10,
+ 25,
+ -5,
+ -3.5,
+ -1,
+ -0.5,
-0.1,
- 3.5
+ 0,
+ 1,
+ 3.5,
+ 5,
+ 50,
+ 75,
+ 100,
+ -75
]
}
],
"output_policy": "real_floating_point_and_generic",
"returns": {
- "desc": "secant",
+ "desc": "signum",
"type": {
"javascript": "number",
"jsdoc": "number",
@@ -9293,22 +10277,13 @@
}
},
"keywords": [
- "sec",
- "secant",
- "trig",
- "trigonometry",
- "cos",
- "cosine"
+ "signum",
+ "sign"
],
"extra_keywords": [
- "math.sec",
- "math.cos"
+ "math.sign"
]
},
- "@stdlib/math/base/special/secd": {},
- "@stdlib/math/base/special/sech": {},
- "@stdlib/math/base/special/signumf": {},
- "@stdlib/math/base/special/signum": {},
"@stdlib/math/base/special/csignumf": {},
"@stdlib/math/base/special/csignum": {},
"@stdlib/math/base/special/sinf": {
@@ -11727,5 +12702,83 @@
],
"extra_keywords": []
},
- "@stdlib/math/base/special/versin": {}
+ "@stdlib/math/base/special/versin": {
+ "$schema": "math/base@v1.0",
+ "base_alias": "versin",
+ "alias": "versin",
+ "pkg_desc": "compute the versed sine",
+ "desc": "computes the versed sine",
+ "short_desc": "versed sine",
+ "parameters": [
+ {
+ "name": "x",
+ "desc": "input value (in radians)",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ },
+ "domain": [
+ {
+ "min": "-infinity",
+ "max": "infinity"
+ }
+ ],
+ "rand": {
+ "prng": "random/base/uniform",
+ "parameters": [
+ -10,
+ 10
+ ]
+ },
+ "example_values": [
+ 64,
+ 27,
+ 0,
+ 0.1,
+ -9,
+ 8,
+ -1,
+ 125,
+ -10.2,
+ 11.3,
+ -12.4,
+ 3.5,
+ -1.6,
+ 15.7,
+ -16,
+ 17.9,
+ -188,
+ 19.11,
+ -200,
+ 21.15
+ ]
+ }
+ ],
+ "output_policy": "real_floating_point_and_generic",
+ "returns": {
+ "desc": "versed sine",
+ "type": {
+ "javascript": "number",
+ "jsdoc": "number",
+ "c": "double",
+ "dtype": "float64"
+ }
+ },
+ "keywords": [
+ "versin",
+ "versine",
+ "versed sine",
+ "cosine",
+ "cos",
+ "trig",
+ "trigonometry",
+ "radians",
+ "angle"
+ ],
+ "extra_keywords": [
+ "math.sin"
+ ]
+ }
}
diff --git a/lib/node_modules/@stdlib/ndarray/base/copy/README.md b/lib/node_modules/@stdlib/ndarray/base/copy/README.md
index 2a3ff20ffd3c..738d28c961f7 100644
--- a/lib/node_modules/@stdlib/ndarray/base/copy/README.md
+++ b/lib/node_modules/@stdlib/ndarray/base/copy/README.md
@@ -130,11 +130,11 @@ console.log( ndarray2array( o ) );
-[@stdlib/ndarray/dtypes]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/@stdlib/ndarray/dtypes
+[@stdlib/ndarray/dtypes]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/dtypes
-[@stdlib/ndarray/base/ctor]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/@stdlib/ndarray/base/ctor
+[@stdlib/ndarray/base/ctor]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/ctor
-[@stdlib/ndarray/ctor]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/@stdlib/ndarray/ctor
+[@stdlib/ndarray/ctor]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/ctor
diff --git a/lib/node_modules/@stdlib/ndarray/base/count-falsy/lib/main.js b/lib/node_modules/@stdlib/ndarray/base/count-falsy/lib/main.js
index 325afeec0c95..5cd82577c9f9 100644
--- a/lib/node_modules/@stdlib/ndarray/base/count-falsy/lib/main.js
+++ b/lib/node_modules/@stdlib/ndarray/base/count-falsy/lib/main.js
@@ -314,7 +314,7 @@ function countFalsy( arrays ) {
xmmv = minmaxViewBufferIndex( shx, sx, x.offset );
// Determine whether we can ignore shape (and strides) and treat the ndarray as a linear one-dimensional strided array...
- if ( len === ( xmmv[1]-xmmv[0]+1 ) || ( isCmplx && len*2 === ( xmmv[1]-xmmv[0]+1 ) ) ) { // eslint-disable-line max-len
+ if ( len === ( xmmv[1]-xmmv[0]+1 ) || ( isCmplx && len*2 === ( xmmv[1]-xmmv[0]+2 ) ) ) { // eslint-disable-line max-len
// Note: the above is equivalent to @stdlib/ndarray/base/assert/is-contiguous, but in-lined so we can retain computed values...
if ( iox === 1 ) {
ox = xmmv[ 0 ];
diff --git a/lib/node_modules/@stdlib/ndarray/base/count-truthy/lib/main.js b/lib/node_modules/@stdlib/ndarray/base/count-truthy/lib/main.js
index fa3112c91862..e66613bfa3f4 100644
--- a/lib/node_modules/@stdlib/ndarray/base/count-truthy/lib/main.js
+++ b/lib/node_modules/@stdlib/ndarray/base/count-truthy/lib/main.js
@@ -314,7 +314,7 @@ function countTruthy( arrays ) {
xmmv = minmaxViewBufferIndex( shx, sx, x.offset );
// Determine whether we can ignore shape (and strides) and treat the ndarray as a linear one-dimensional strided array...
- if ( len === ( xmmv[1]-xmmv[0]+1 ) || ( isCmplx && len*2 === ( xmmv[1]-xmmv[0]+1 ) ) ) { // eslint-disable-line max-len
+ if ( len === ( xmmv[1]-xmmv[0]+1 ) || ( isCmplx && len*2 === ( xmmv[1]-xmmv[0]+2 ) ) ) { // eslint-disable-line max-len
// Note: the above is equivalent to @stdlib/ndarray/base/assert/is-contiguous, but in-lined so we can retain computed values...
if ( iox === 1 ) {
ox = xmmv[ 0 ];
diff --git a/lib/node_modules/@stdlib/ndarray/base/every/lib/main.js b/lib/node_modules/@stdlib/ndarray/base/every/lib/main.js
index 38f8df2bec71..124b05ed80bf 100644
--- a/lib/node_modules/@stdlib/ndarray/base/every/lib/main.js
+++ b/lib/node_modules/@stdlib/ndarray/base/every/lib/main.js
@@ -314,7 +314,7 @@ function every( arrays ) {
xmmv = minmaxViewBufferIndex( shx, sx, x.offset );
// Determine whether we can ignore shape (and strides) and treat the ndarray as a linear one-dimensional strided array...
- if ( len === ( xmmv[1]-xmmv[0]+1 ) || ( isCmplx && len*2 === ( xmmv[1]-xmmv[0]+1 ) ) ) { // eslint-disable-line max-len
+ if ( len === ( xmmv[1]-xmmv[0]+1 ) || ( isCmplx && len*2 === ( xmmv[1]-xmmv[0]+2 ) ) ) { // eslint-disable-line max-len
// Note: the above is equivalent to @stdlib/ndarray/base/assert/is-contiguous, but in-lined so we can retain computed values...
if ( iox === 1 ) {
ox = xmmv[ 0 ];
diff --git a/lib/node_modules/@stdlib/ndarray/base/includes/lib/main.js b/lib/node_modules/@stdlib/ndarray/base/includes/lib/main.js
index 1d3b346f00e8..946f6fa45917 100644
--- a/lib/node_modules/@stdlib/ndarray/base/includes/lib/main.js
+++ b/lib/node_modules/@stdlib/ndarray/base/includes/lib/main.js
@@ -346,7 +346,7 @@ function includes( arrays ) {
xmmv = minmaxViewBufferIndex( shx, sx, x.offset );
// Determine whether we can ignore shape (and strides) and treat the ndarray as a linear one-dimensional strided array...
- if ( len === ( xmmv[1]-xmmv[0]+1 ) || ( isCmplx && len*2 === ( xmmv[1]-xmmv[0]+1 ) ) ) { // eslint-disable-line max-len
+ if ( len === ( xmmv[1]-xmmv[0]+1 ) || ( isCmplx && len*2 === ( xmmv[1]-xmmv[0]+2 ) ) ) { // eslint-disable-line max-len
// Note: the above is equivalent to @stdlib/ndarray/base/assert/is-contiguous, but in-lined so we can retain computed values...
if ( iox === 1 ) {
ox = xmmv[ 0 ];
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/README.md b/lib/node_modules/@stdlib/ndarray/base/some/README.md
new file mode 100644
index 000000000000..6fc94a422caa
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/README.md
@@ -0,0 +1,156 @@
+
+
+# some
+
+> Test whether at least `n` elements in an ndarray are truthy.
+
+
+
+
+
+
+
+## Usage
+
+```javascript
+var some = require( '@stdlib/ndarray/base/some' );
+```
+
+#### some( arrays )
+
+Tests whether at least `n` elements in an ndarray are truthy.
+
+
+
+```javascript
+var Float64Array = require( '@stdlib/array/float64' );
+var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' );
+
+// Create a data buffer:
+var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+
+// Define the shape of the input array:
+var shape = [ 3, 1, 2 ];
+
+// Define the array strides:
+var sx = [ 4, 4, 1 ];
+
+// Define the index offset:
+var ox = 0;
+
+// Create an input ndarray-like object:
+var x = {
+ 'dtype': 'float64',
+ 'data': xbuf,
+ 'shape': shape,
+ 'strides': sx,
+ 'offset': ox,
+ 'order': 'row-major'
+};
+
+// Define the success criterion:
+var n = scalar2ndarray( 3, {
+ 'dtype': 'generic'
+});
+
+// Test elements:
+var out = some( [ x, n ] );
+// returns true
+```
+
+The function accepts the following arguments:
+
+- **arrays**: array-like object containing an input ndarray and a zero-dimensional ndarray specifying the minimum number of elements in the input ndarray that must be truthy.
+
+Each provided ndarray should be an object with the following properties:
+
+- **dtype**: data type.
+- **data**: data buffer.
+- **shape**: dimensions.
+- **strides**: stride lengths.
+- **offset**: index offset.
+- **order**: specifies whether an ndarray is row-major (C-style) or column major (Fortran-style).
+
+
+
+
+
+
+
+## Notes
+
+- For very high-dimensional ndarrays which are non-contiguous, one should consider copying the underlying data to contiguous memory before performing the operation in order to achieve better performance.
+
+
+
+
+
+
+
+## Examples
+
+
+
+```javascript
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' );
+var ndarray2array = require( '@stdlib/ndarray/base/to-array' );
+var some = require( '@stdlib/ndarray/base/some' );
+
+var x = {
+ 'dtype': 'generic',
+ 'data': discreteUniform( 10, -2, 10, {
+ 'dtype': 'generic'
+ }),
+ 'shape': [ 5, 2 ],
+ 'strides': [ 2, 1 ],
+ 'offset': 0,
+ 'order': 'row-major'
+};
+console.log( ndarray2array( x.data, x.shape, x.strides, x.offset, x.order ) );
+
+var n = scalar2ndarray( 5, {
+ 'dtype': 'generic'
+});
+
+var out = some( [ x, n ] );
+console.log( out );
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.10d_blocked_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.10d_blocked_columnmajor.js
new file mode 100644
index 000000000000..86301d774dc3
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.10d_blocked_columnmajor.js
@@ -0,0 +1,133 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/10d_blocked.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1, 1, 1, 1, 1, 1, 1, 1 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 1, 1, 1, 1, 1, 1, 1, 1, 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( pow( len, 1.0/10.0 ) );
+ sh = [ len, len, len, len, len, len, len, len, len, len ];
+ len *= pow( len, 9 );
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.10d_blocked_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.10d_blocked_rowmajor.js
new file mode 100644
index 000000000000..9516e166a94f
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.10d_blocked_rowmajor.js
@@ -0,0 +1,133 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/10d_blocked.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1, 1, 1, 1, 1, 1, 1, 1 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 1, 1, 1, 1, 1, 1, 1, 1, 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( pow( len, 1.0/10.0 ) );
+ sh = [ len, len, len, len, len, len, len, len, len, len ];
+ len *= pow( len, 9 );
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.10d_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.10d_columnmajor.js
new file mode 100644
index 000000000000..bcbc34c237e3
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.10d_columnmajor.js
@@ -0,0 +1,133 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/10d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1, 1, 1, 1, 1, 1, 1, 1 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 1, 1, 1, 1, 1, 1, 1, 1, 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( pow( len, 1.0/10.0 ) );
+ sh = [ len, len, len, len, len, len, len, len, len, len ];
+ len *= pow( len, 9 );
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.10d_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.10d_rowmajor.js
new file mode 100644
index 000000000000..aea9ddd9e873
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.10d_rowmajor.js
@@ -0,0 +1,133 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/10d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1, 1, 1, 1, 1, 1, 1, 1 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 1, 1, 1, 1, 1, 1, 1, 1, 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( pow( len, 1.0/10.0 ) );
+ sh = [ len, len, len, len, len, len, len, len, len, len ];
+ len *= pow( len, 9 );
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.11d_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.11d_columnmajor.js
new file mode 100644
index 000000000000..bb24210f1692
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.11d_columnmajor.js
@@ -0,0 +1,133 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/nd.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( pow( len, 1.0/11.0 ) );
+ sh = [ len, len, len, len, len, len, len, len, len, len, len ];
+ len *= pow( len, 10 );
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.11d_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.11d_rowmajor.js
new file mode 100644
index 000000000000..a7c62e294290
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.11d_rowmajor.js
@@ -0,0 +1,133 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/nd.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( pow( len, 1.0/11.0 ) );
+ sh = [ len, len, len, len, len, len, len, len, len, len, len ];
+ len *= pow( len, 10 );
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.1d_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.1d_columnmajor.js
new file mode 100644
index 000000000000..c7ebcf6b42fe
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.1d_columnmajor.js
@@ -0,0 +1,128 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+ var n;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ n = scalar2ndarray( len, {
+ 'dtype': 'generic',
+ 'order': order
+ });
+ 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 = some( [ x, n ] );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.1d_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.1d_rowmajor.js
new file mode 100644
index 000000000000..18c1f7530d25
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.1d_rowmajor.js
@@ -0,0 +1,128 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+ var n;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ n = scalar2ndarray( len, {
+ 'dtype': 'generic',
+ 'order': order
+ });
+ 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 = some( [ x, n ] );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.2d_blocked_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.2d_blocked_columnmajor.js
new file mode 100644
index 000000000000..3fbf14e4d3e8
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.2d_blocked_columnmajor.js
@@ -0,0 +1,134 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var sqrt = require( '@stdlib/math/base/special/sqrt' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/2d_blocked.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( sqrt( len ) );
+ sh = [ len, len ];
+ len *= len;
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.2d_blocked_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.2d_blocked_rowmajor.js
new file mode 100644
index 000000000000..50241de6f4d0
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.2d_blocked_rowmajor.js
@@ -0,0 +1,134 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var sqrt = require( '@stdlib/math/base/special/sqrt' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/2d_blocked.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( sqrt( len ) );
+ sh = [ len, len ];
+ len *= len;
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.2d_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.2d_columnmajor.js
new file mode 100644
index 000000000000..ce18b2c2dc04
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.2d_columnmajor.js
@@ -0,0 +1,134 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var sqrt = require( '@stdlib/math/base/special/sqrt' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/2d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( sqrt( len ) );
+ sh = [ len, len ];
+ len *= len;
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.2d_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.2d_rowmajor.js
new file mode 100644
index 000000000000..53821cfc5779
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.2d_rowmajor.js
@@ -0,0 +1,134 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var sqrt = require( '@stdlib/math/base/special/sqrt' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/2d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( sqrt( len ) );
+ sh = [ len, len ];
+ len *= len;
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.2d_rowmajor_accessors.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.2d_rowmajor_accessors.js
new file mode 100644
index 000000000000..3bc93e9fa4d0
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.2d_rowmajor_accessors.js
@@ -0,0 +1,160 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var sqrt = require( '@stdlib/math/base/special/sqrt' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/2d_accessors.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Returns an array data buffer element.
+*
+* @private
+* @param {Collection} buf - data buffer
+* @param {NonNegativeInteger} idx - element index
+* @returns {*} element
+*/
+function get( buf, idx ) {
+ return buf[ idx ];
+}
+
+/**
+* Sets an array data buffer element.
+*
+* @private
+* @param {Collection} buf - data buffer
+* @param {NonNegativeInteger} idx - element index
+* @param {*} value - value to set
+*/
+function set( buf, idx, value ) {
+ buf[ idx ] = value;
+}
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order,
+ 'accessorProtocol': true,
+ 'accessors': [ get, set ]
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::accessors:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::accessors:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( sqrt( len ) );
+ sh = [ len, len ];
+ len *= len;
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::accessors:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.2d_rowmajor_accessors_complex.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.2d_rowmajor_accessors_complex.js
new file mode 100644
index 000000000000..778ca1d28efa
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.2d_rowmajor_accessors_complex.js
@@ -0,0 +1,162 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var sqrt = require( '@stdlib/math/base/special/sqrt' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var ctors = require( '@stdlib/array/typed-complex-ctors' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/2d_accessors.js' );
+
+
+// VARIABLES //
+
+var types = [ 'complex64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Returns an array data buffer element.
+*
+* @private
+* @param {Collection} buf - data buffer
+* @param {NonNegativeInteger} idx - element index
+* @returns {*} element
+*/
+function get( buf, idx ) {
+ return buf.get( idx );
+}
+
+/**
+* Sets an array data buffer element.
+*
+* @private
+* @param {Collection} buf - data buffer
+* @param {NonNegativeInteger} idx - element index
+* @param {*} value - value to set
+*/
+function set( buf, idx, value ) {
+ buf.set( value, idx );
+}
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var xbuf;
+ var x;
+
+ xbuf = discreteUniform( len*2, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': new ( ctors( xtype ) )( xbuf.buffer ),
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order,
+ 'accessorProtocol': true,
+ 'accessors': [ get, set ]
+ };
+ 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 = some( x, len*2 );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 5; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::accessors:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::accessors:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( sqrt( len ) );
+ sh = [ len, len ];
+ len *= len;
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::accessors:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.3d_blocked_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.3d_blocked_columnmajor.js
new file mode 100644
index 000000000000..07d959e7a21d
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.3d_blocked_columnmajor.js
@@ -0,0 +1,134 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var cbrt = require( '@stdlib/math/base/special/cbrt' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/3d_blocked.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 1, 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( cbrt( len ) );
+ sh = [ len, len, len ];
+ len *= len * len;
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.3d_blocked_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.3d_blocked_rowmajor.js
new file mode 100644
index 000000000000..09f1fa4c3b1a
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.3d_blocked_rowmajor.js
@@ -0,0 +1,134 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var cbrt = require( '@stdlib/math/base/special/cbrt' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/3d_blocked.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 1, 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( cbrt( len ) );
+ sh = [ len, len, len ];
+ len *= len * len;
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.3d_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.3d_columnmajor.js
new file mode 100644
index 000000000000..814f863bdf31
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.3d_columnmajor.js
@@ -0,0 +1,134 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var cbrt = require( '@stdlib/math/base/special/cbrt' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/3d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 1, 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( cbrt( len ) );
+ sh = [ len, len, len ];
+ len *= len * len;
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.3d_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.3d_rowmajor.js
new file mode 100644
index 000000000000..12188fad529f
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.3d_rowmajor.js
@@ -0,0 +1,134 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var cbrt = require( '@stdlib/math/base/special/cbrt' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/3d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 1, 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( cbrt( len ) );
+ sh = [ len, len, len ];
+ len *= len * len;
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.4d_blocked_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.4d_blocked_columnmajor.js
new file mode 100644
index 000000000000..d78b00121684
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.4d_blocked_columnmajor.js
@@ -0,0 +1,133 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/4d_blocked.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1, 1 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 1, 1, 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( pow( len, 1.0/4.0 ) );
+ sh = [ len, len, len, len ];
+ len *= len * len * len;
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.4d_blocked_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.4d_blocked_rowmajor.js
new file mode 100644
index 000000000000..8923e05f5797
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.4d_blocked_rowmajor.js
@@ -0,0 +1,133 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/4d_blocked.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1, 1 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 1, 1, 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( pow( len, 1.0/4.0 ) );
+ sh = [ len, len, len, len ];
+ len *= len * len * len;
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.4d_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.4d_columnmajor.js
new file mode 100644
index 000000000000..249b6fb917a6
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.4d_columnmajor.js
@@ -0,0 +1,133 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/4d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1, 1 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 1, 1, 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( pow( len, 1.0/4.0 ) );
+ sh = [ len, len, len, len ];
+ len *= len * len * len;
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.4d_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.4d_rowmajor.js
new file mode 100644
index 000000000000..0ee5b4a0828a
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.4d_rowmajor.js
@@ -0,0 +1,133 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/4d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1, 1 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 1, 1, 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( pow( len, 1.0/4.0 ) );
+ sh = [ len, len, len, len ];
+ len *= len * len * len;
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.5d_blocked_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.5d_blocked_columnmajor.js
new file mode 100644
index 000000000000..57aa6bef3805
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.5d_blocked_columnmajor.js
@@ -0,0 +1,133 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/5d_blocked.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1, 1, 1 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 1, 1, 1, 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( pow( len, 1.0/5.0 ) );
+ sh = [ len, len, len, len, len ];
+ len *= pow( len, 4 );
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.5d_blocked_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.5d_blocked_rowmajor.js
new file mode 100644
index 000000000000..e2b613cb8675
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.5d_blocked_rowmajor.js
@@ -0,0 +1,133 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/5d_blocked.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1, 1, 1 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 1, 1, 1, 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( pow( len, 1.0/5.0 ) );
+ sh = [ len, len, len, len, len ];
+ len *= pow( len, 4 );
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.5d_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.5d_columnmajor.js
new file mode 100644
index 000000000000..1a3871f3457d
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.5d_columnmajor.js
@@ -0,0 +1,133 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/5d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1, 1, 1 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 1, 1, 1, 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( pow( len, 1.0/5.0 ) );
+ sh = [ len, len, len, len, len ];
+ len *= pow( len, 4 );
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.5d_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.5d_rowmajor.js
new file mode 100644
index 000000000000..d051101a253f
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.5d_rowmajor.js
@@ -0,0 +1,133 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/5d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1, 1, 1 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 1, 1, 1, 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( pow( len, 1.0/5.0 ) );
+ sh = [ len, len, len, len, len ];
+ len *= pow( len, 4 );
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.6d_blocked_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.6d_blocked_columnmajor.js
new file mode 100644
index 000000000000..f744e7aa4374
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.6d_blocked_columnmajor.js
@@ -0,0 +1,133 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/6d_blocked.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1, 1, 1, 1 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 1, 1, 1, 1, 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( pow( len, 1.0/6.0 ) );
+ sh = [ len, len, len, len, len, len ];
+ len *= pow( len, 5 );
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.6d_blocked_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.6d_blocked_rowmajor.js
new file mode 100644
index 000000000000..490ec85d6ac7
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.6d_blocked_rowmajor.js
@@ -0,0 +1,133 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/6d_blocked.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1, 1, 1, 1 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 1, 1, 1, 1, 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( pow( len, 1.0/6.0 ) );
+ sh = [ len, len, len, len, len, len ];
+ len *= pow( len, 5 );
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.6d_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.6d_columnmajor.js
new file mode 100644
index 000000000000..8f933bf80fa5
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.6d_columnmajor.js
@@ -0,0 +1,133 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/6d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1, 1, 1, 1 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 1, 1, 1, 1, 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( pow( len, 1.0/6.0 ) );
+ sh = [ len, len, len, len, len, len ];
+ len *= pow( len, 5 );
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.6d_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.6d_rowmajor.js
new file mode 100644
index 000000000000..17b7f6c902ef
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.6d_rowmajor.js
@@ -0,0 +1,133 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/6d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1, 1, 1, 1 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 1, 1, 1, 1, 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( pow( len, 1.0/6.0 ) );
+ sh = [ len, len, len, len, len, len ];
+ len *= pow( len, 5 );
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.7d_blocked_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.7d_blocked_columnmajor.js
new file mode 100644
index 000000000000..053b64b28afb
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.7d_blocked_columnmajor.js
@@ -0,0 +1,133 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/7d_blocked.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1, 1, 1, 1, 1 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 1, 1, 1, 1, 1, 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( pow( len, 1.0/7.0 ) );
+ sh = [ len, len, len, len, len, len, len ];
+ len *= pow( len, 6 );
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.7d_blocked_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.7d_blocked_rowmajor.js
new file mode 100644
index 000000000000..4c4b8affbe0e
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.7d_blocked_rowmajor.js
@@ -0,0 +1,133 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/7d_blocked.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1, 1, 1, 1, 1 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 1, 1, 1, 1, 1, 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( pow( len, 1.0/7.0 ) );
+ sh = [ len, len, len, len, len, len, len ];
+ len *= pow( len, 6 );
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.7d_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.7d_columnmajor.js
new file mode 100644
index 000000000000..dc003ecae742
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.7d_columnmajor.js
@@ -0,0 +1,133 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/7d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1, 1, 1, 1, 1 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 1, 1, 1, 1, 1, 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( pow( len, 1.0/7.0 ) );
+ sh = [ len, len, len, len, len, len, len ];
+ len *= pow( len, 6 );
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.7d_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.7d_rowmajor.js
new file mode 100644
index 000000000000..8053b2d5d47e
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.7d_rowmajor.js
@@ -0,0 +1,133 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/7d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1, 1, 1, 1, 1 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 1, 1, 1, 1, 1, 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( pow( len, 1.0/7.0 ) );
+ sh = [ len, len, len, len, len, len, len ];
+ len *= pow( len, 6 );
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.8d_blocked_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.8d_blocked_columnmajor.js
new file mode 100644
index 000000000000..23c815487e5b
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.8d_blocked_columnmajor.js
@@ -0,0 +1,133 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/8d_blocked.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1, 1, 1, 1, 1, 1 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 1, 1, 1, 1, 1, 1, 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( pow( len, 1.0/8.0 ) );
+ sh = [ len, len, len, len, len, len, len, len ];
+ len *= pow( len, 7 );
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.8d_blocked_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.8d_blocked_rowmajor.js
new file mode 100644
index 000000000000..23c815487e5b
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.8d_blocked_rowmajor.js
@@ -0,0 +1,133 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/8d_blocked.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1, 1, 1, 1, 1, 1 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 1, 1, 1, 1, 1, 1, 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( pow( len, 1.0/8.0 ) );
+ sh = [ len, len, len, len, len, len, len, len ];
+ len *= pow( len, 7 );
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.8d_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.8d_columnmajor.js
new file mode 100644
index 000000000000..1b326a5a09ff
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.8d_columnmajor.js
@@ -0,0 +1,133 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/8d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1, 1, 1, 1, 1, 1 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 1, 1, 1, 1, 1, 1, 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( pow( len, 1.0/8.0 ) );
+ sh = [ len, len, len, len, len, len, len, len ];
+ len *= pow( len, 7 );
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.8d_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.8d_rowmajor.js
new file mode 100644
index 000000000000..82040b982744
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.8d_rowmajor.js
@@ -0,0 +1,133 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/8d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1, 1, 1, 1, 1, 1 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 1, 1, 1, 1, 1, 1, 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( pow( len, 1.0/8.0 ) );
+ sh = [ len, len, len, len, len, len, len, len ];
+ len *= pow( len, 7 );
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.9d_blocked_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.9d_blocked_columnmajor.js
new file mode 100644
index 000000000000..389591dfce29
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.9d_blocked_columnmajor.js
@@ -0,0 +1,133 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/9d_blocked.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1, 1, 1, 1, 1, 1, 1 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 1, 1, 1, 1, 1, 1, 1, 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( pow( len, 1.0/9.0 ) );
+ sh = [ len, len, len, len, len, len, len, len, len ];
+ len *= pow( len, 8 );
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.9d_blocked_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.9d_blocked_rowmajor.js
new file mode 100644
index 000000000000..e2c68247f323
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.9d_blocked_rowmajor.js
@@ -0,0 +1,133 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/9d_blocked.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1, 1, 1, 1, 1, 1, 1 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 1, 1, 1, 1, 1, 1, 1, 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( pow( len, 1.0/9.0 ) );
+ sh = [ len, len, len, len, len, len, len, len, len ];
+ len *= pow( len, 8 );
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+'::blocked:ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.9d_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.9d_columnmajor.js
new file mode 100644
index 000000000000..07aab1ec02c6
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.9d_columnmajor.js
@@ -0,0 +1,133 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/9d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1, 1, 1, 1, 1, 1, 1 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 1, 1, 1, 1, 1, 1, 1, 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( pow( len, 1.0/9.0 ) );
+ sh = [ len, len, len, len, len, len, len, len, len ];
+ len *= pow( len, 8 );
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.9d_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.9d_rowmajor.js
new file mode 100644
index 000000000000..de02d84f7a17
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/benchmark/benchmark.9d_rowmajor.js
@@ -0,0 +1,133 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var pkg = require( './../package.json' ).name;
+var some = require( './../lib/9d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} xtype - ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, xtype ) {
+ var x;
+
+ x = discreteUniform( len, 1, 100 );
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ 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 = some( x, len );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( out ) ) {
+ 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 sh;
+ var t1;
+ var f;
+ var i;
+ var j;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( j = 0; j < types.length; j++ ) {
+ t1 = types[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1, 1, 1, 1, 1, 1, 1 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ sh = [ 1, 1, 1, 1, 1, 1, 1, 2, len/2 ];
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+
+ len = floor( pow( len, 1.0/9.0 ) );
+ sh = [ len, len, len, len, len, len, len, len, len ];
+ len *= pow( len, 8 );
+ f = createBenchmark( len, sh, t1 );
+ bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+order+',xtype='+t1, f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/docs/repl.txt b/lib/node_modules/@stdlib/ndarray/base/some/docs/repl.txt
new file mode 100644
index 000000000000..420ecfde1c35
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/docs/repl.txt
@@ -0,0 +1,58 @@
+
+{{alias}}( arrays )
+ Tests whether at least `n` elements in an ndarray are truthy.
+
+ A provided "ndarray" should be an object with the following properties:
+
+ - dtype: data type.
+ - data: data buffer.
+ - shape: dimensions.
+ - strides: stride lengths.
+ - offset: index offset.
+ - order: specifies whether an ndarray is row-major (C-style) or column-major
+ (Fortran-style).
+
+ Parameters
+ ----------
+ arrays: ArrayLikeObject
+ Array-like object containing an input ndarray and a zero-dimensional
+ ndarray specifying the minimum number of elements in the input ndarray
+ that must be truthy.
+
+ Returns
+ -------
+ out: boolean
+ Boolean indicating whether at least `n` elements in an ndarray are
+ truthy.
+
+ Examples
+ --------
+ // Define ndarray data and meta data...
+ > var xbuf = new {{alias:@stdlib/array/float64}}( [ 1.0, 1.0, 0.0, 1.0 ] );
+ > var dt = 'float64';
+ > var sh = [ 2, 2 ];
+ > var sx = [ 2, 1 ];
+ > var ox = 0;
+ > var ord = 'row-major';
+
+ // Using an ndarray...
+ > var x = {{alias:@stdlib/ndarray/ctor}}( dt, xbuf, sh, sx, ox, ord );
+ > var n = {{alias:@stdlib/ndarray/from-scalar}}( 3 );
+ > {{alias}}( [ x, n ] )
+ true
+
+ // Using a minimal ndarray-like object...
+ > xbuf = new {{alias:@stdlib/array/float64}}( [ -1.0, 0.0, 0.0, -1.0 ] );
+ > x = {
+ ... 'dtype': dt,
+ ... 'data': xbuf,
+ ... 'shape': sh,
+ ... 'strides': sx,
+ ... 'offset': ox,
+ ... 'order': ord
+ ... };
+ > {{alias}}( [ x, n ] )
+ false
+
+ See Also
+ --------
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/docs/types/index.d.ts b/lib/node_modules/@stdlib/ndarray/base/some/docs/types/index.d.ts
new file mode 100644
index 000000000000..abe58421406e
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/docs/types/index.d.ts
@@ -0,0 +1,63 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 { ndarray, typedndarray, genericndarray } from '@stdlib/types/ndarray';
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy.
+*
+* @param arrays - array-like object containing an input ndarray and a zero-dimensional ndarray specifying the minimum number of elements in the input ndarray that must be truthy
+* @returns boolean indicating whether `n` elements pass a test
+*
+* @example
+* var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' );
+* var Float64Array = require( '@stdlib/array/float64' );
+* var ndarray = require( '@stdlib/ndarray/ctor' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+*
+* // Define the shape of the array:
+* var shape = [ 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 4, 4, 1 ];
+*
+* // Define the index offset:
+* var ox = 1;
+*
+* // Create the input ndarray:
+* var x = ndarray( 'float64', xbuf, shape, sx, ox, 'row-major' );
+* var n = scalar2ndarray( 3, {
+* 'dtype': 'generic'
+* });
+*
+* // Test elements:
+* var out = some( [ x, n ] );
+* // returns true
+*/
+declare function some( arrays: [ ndarray, typedndarray | genericndarray ] ): boolean;
+
+
+// EXPORTS //
+
+export = some;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/docs/types/test.ts b/lib/node_modules/@stdlib/ndarray/base/some/docs/types/test.ts
new file mode 100644
index 000000000000..c3141321c31b
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/docs/types/test.ts
@@ -0,0 +1,63 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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.
+*/
+
+import zeros = require( '@stdlib/ndarray/zeros' );
+import scalar2ndarray = require( '@stdlib/ndarray/from-scalar' );
+import some = require( './index' );
+
+
+// TESTS //
+
+// The function returns a boolean...
+{
+ const x = zeros( [ 2, 2 ] );
+ const n = scalar2ndarray( 2, { 'dtype': 'generic' } );
+
+ some( [ x, n ] ); // $ExpectType boolean
+}
+
+// The compiler throws an error if the function is provided a first argument which is not an array-like object containing ndarray-like objects...
+{
+ some( 5 ); // $ExpectError
+ some( true ); // $ExpectError
+ some( false ); // $ExpectError
+ some( null ); // $ExpectError
+ some( undefined ); // $ExpectError
+ some( {} ); // $ExpectError
+ some( [ 1 ] ); // $ExpectError
+ some( ( x: number ): number => x ); // $ExpectError
+
+ some( 5 ); // $ExpectError
+ some( true ); // $ExpectError
+ some( false ); // $ExpectError
+ some( null ); // $ExpectError
+ some( undefined ); // $ExpectError
+ some( {} ); // $ExpectError
+ some( [ 1 ] ); // $ExpectError
+ some( ( x: number ): number => x ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an unsupported number of arguments...
+{
+ const x = zeros( [ 2, 2 ] );
+ const n = scalar2ndarray( 2, { 'dtype': 'generic' } );
+
+ some(); // $ExpectError
+ some( [ x ] ); // $ExpectError
+ some( [ x, n ], {}, {} ); // $ExpectError
+}
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/examples/index.js b/lib/node_modules/@stdlib/ndarray/base/some/examples/index.js
new file mode 100644
index 000000000000..43b21af65c26
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/examples/index.js
@@ -0,0 +1,43 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' );
+var ndarray2array = require( '@stdlib/ndarray/base/to-array' );
+var some = require( './../lib' );
+
+var x = {
+ 'dtype': 'generic',
+ 'data': discreteUniform( 10, -2, 10, {
+ 'dtype': 'generic'
+ }),
+ 'shape': [ 5, 2 ],
+ 'strides': [ 2, 1 ],
+ 'offset': 0,
+ 'order': 'row-major'
+};
+console.log( ndarray2array( x.data, x.shape, x.strides, x.offset, x.order ) );
+
+var n = scalar2ndarray( 5, {
+ 'dtype': 'generic'
+});
+
+var out = some( [ x, n ] );
+console.log( out );
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/0d.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/0d.js
new file mode 100644
index 000000000000..4a3e5be83817
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/0d.js
@@ -0,0 +1,76 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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';
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [];
+*
+* // Define the array strides:
+* var sx = [ 0 ];
+*
+* // Define the index offset:
+* var ox = 1;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = some0d( x, 1 );
+* // returns true
+*/
+function some0d( x, n ) {
+ if ( n <= 1 && x.data[ x.offset ] ) {
+ return true;
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = some0d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/0d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/0d_accessors.js
new file mode 100644
index 000000000000..768700f32219
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/0d_accessors.js
@@ -0,0 +1,79 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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';
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} x.accessors - data buffer accessors
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+* var accessors = require( '@stdlib/array/base/accessors' );
+*
+* // Create a data buffer:
+* var xbuf = toAccessorArray( [ 1.0, 2.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [];
+*
+* // Define the array strides:
+* var sx = [ 0 ];
+*
+* // Define the index offset:
+* var ox = 1;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'generic',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': accessors( xbuf ).accessors
+* };
+*
+* // Test elements:
+* var out = some0d( x, 1 );
+* // returns true
+*/
+function some0d( x, n ) {
+ if ( n <= 1 && x.accessors[ 0 ]( x.data, x.offset ) ) {
+ return true;
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = some0d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/0d_complex.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/0d_complex.js
new file mode 100644
index 000000000000..1f2ee4879e6d
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/0d_complex.js
@@ -0,0 +1,76 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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';
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements of a reinterpreted complex number ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [];
+*
+* // Define the array strides:
+* var sx = [ 0 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'complex128',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = some0d( x, 1 );
+* // returns true
+*/
+function some0d( x, n ) {
+ if ( n <= 1 && ( x.data[ x.offset ] || x.data[ x.offset+1 ] ) ) {
+ return true;
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = some0d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/10d.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/10d.js
new file mode 100644
index 000000000000..e56266af812c
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/10d.js
@@ -0,0 +1,212 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth */
+
+'use strict';
+
+// MODULES //
+
+var strides2order = require( '@stdlib/ndarray/base/strides2order' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 1, 1, 1, 1, 1, 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 12, 12, 12, 12, 12, 12, 12, 4, 4, 1 ];
+*
+* // Define the index offset:
+* var ox = 1;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = some10d( x, 4 );
+* // returns true
+*/
+function some10d( x, n ) { // eslint-disable-line max-statements
+ var count;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var dx7;
+ var dx8;
+ var dx9;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var S3;
+ var S4;
+ var S5;
+ var S6;
+ var S7;
+ var S8;
+ var S9;
+ var sx;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+ var i7;
+ var i8;
+ var i9;
+
+ // Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...
+ sh = x.shape;
+ sx = x.strides;
+ if ( strides2order( sx ) === 1 ) {
+ // For row-major ndarrays, the last dimensions have the fastest changing indices...
+ S0 = sh[ 9 ];
+ S1 = sh[ 8 ];
+ S2 = sh[ 7 ];
+ S3 = sh[ 6 ];
+ S4 = sh[ 5 ];
+ S5 = sh[ 4 ];
+ S6 = sh[ 3 ];
+ S7 = sh[ 2 ];
+ S8 = sh[ 1 ];
+ S9 = sh[ 0 ];
+ dx0 = sx[ 9 ]; // offset increment for innermost loop
+ dx1 = sx[ 8 ] - ( S0*sx[9] );
+ dx2 = sx[ 7 ] - ( S1*sx[8] );
+ dx3 = sx[ 6 ] - ( S2*sx[7] );
+ dx4 = sx[ 5 ] - ( S3*sx[6] );
+ dx5 = sx[ 4 ] - ( S4*sx[5] );
+ dx6 = sx[ 3 ] - ( S5*sx[4] );
+ dx7 = sx[ 2 ] - ( S6*sx[3] );
+ dx8 = sx[ 1 ] - ( S7*sx[2] );
+ dx9 = sx[ 0 ] - ( S8*sx[1] ); // offset increment for outermost loop
+ } else { // order === 'column-major'
+ // For column-major ndarrays, the first dimensions have the fastest changing indices...
+ S0 = sh[ 0 ];
+ S1 = sh[ 1 ];
+ S2 = sh[ 2 ];
+ S3 = sh[ 3 ];
+ S4 = sh[ 4 ];
+ S5 = sh[ 5 ];
+ S6 = sh[ 6 ];
+ S7 = sh[ 7 ];
+ S8 = sh[ 8 ];
+ S9 = sh[ 9 ];
+ dx0 = sx[ 0 ]; // offset increment for innermost loop
+ dx1 = sx[ 1 ] - ( S0*sx[0] );
+ dx2 = sx[ 2 ] - ( S1*sx[1] );
+ dx3 = sx[ 3 ] - ( S2*sx[2] );
+ dx4 = sx[ 4 ] - ( S3*sx[3] );
+ dx5 = sx[ 5 ] - ( S4*sx[4] );
+ dx6 = sx[ 6 ] - ( S5*sx[5] );
+ dx7 = sx[ 7 ] - ( S6*sx[6] );
+ dx8 = sx[ 8 ] - ( S7*sx[7] );
+ dx9 = sx[ 9 ] - ( S8*sx[8] ); // offset increment for outermost loop
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over the ndarray dimensions...
+ for ( i9 = 0; i9 < S9; i9++ ) {
+ for ( i8 = 0; i8 < S8; i8++ ) {
+ for ( i7 = 0; i7 < S7; i7++ ) {
+ for ( i6 = 0; i6 < S6; i6++ ) {
+ for ( i5 = 0; i5 < S5; i5++ ) {
+ for ( i4 = 0; i4 < S4; i4++ ) {
+ for ( i3 = 0; i3 < S3; i3++ ) {
+ for ( i2 = 0; i2 < S2; i2++ ) {
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ if ( xbuf[ ix ] ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ ix += dx6;
+ }
+ ix += dx7;
+ }
+ ix += dx8;
+ }
+ ix += dx9;
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = some10d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/10d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/10d_accessors.js
new file mode 100644
index 000000000000..391062fba79c
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/10d_accessors.js
@@ -0,0 +1,219 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth */
+
+'use strict';
+
+// MODULES //
+
+var strides2order = require( '@stdlib/ndarray/base/strides2order' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} x.accessors - data buffer accessors
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+* var accessors = require( '@stdlib/array/base/accessors' );
+*
+* // Create a data buffer:
+* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 4, 4, 4, 4, 4, 4, 4, 4, 2, 1 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'generic',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': accessors( xbuf ).accessors
+* };
+*
+* // Test elements:
+* var out = some10d( x, 4 );
+* // returns true
+*/
+function some10d( x, n ) { // eslint-disable-line max-statements
+ var count;
+ var xbuf;
+ var get;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var dx7;
+ var dx8;
+ var dx9;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var S3;
+ var S4;
+ var S5;
+ var S6;
+ var S7;
+ var S8;
+ var S9;
+ var sx;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+ var i7;
+ var i8;
+ var i9;
+
+ // Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...
+ sh = x.shape;
+ sx = x.strides;
+ if ( strides2order( sx ) === 1 ) {
+ // For row-major ndarrays, the last dimensions have the fastest changing indices...
+ S0 = sh[ 9 ];
+ S1 = sh[ 8 ];
+ S2 = sh[ 7 ];
+ S3 = sh[ 6 ];
+ S4 = sh[ 5 ];
+ S5 = sh[ 4 ];
+ S6 = sh[ 3 ];
+ S7 = sh[ 2 ];
+ S8 = sh[ 1 ];
+ S9 = sh[ 0 ];
+ dx0 = sx[ 9 ]; // offset increment for innermost loop
+ dx1 = sx[ 8 ] - ( S0*sx[9] );
+ dx2 = sx[ 7 ] - ( S1*sx[8] );
+ dx3 = sx[ 6 ] - ( S2*sx[7] );
+ dx4 = sx[ 5 ] - ( S3*sx[6] );
+ dx5 = sx[ 4 ] - ( S4*sx[5] );
+ dx6 = sx[ 3 ] - ( S5*sx[4] );
+ dx7 = sx[ 2 ] - ( S6*sx[3] );
+ dx8 = sx[ 1 ] - ( S7*sx[2] );
+ dx9 = sx[ 0 ] - ( S8*sx[1] ); // offset increment for outermost loop
+ } else { // order === 'column-major'
+ // For column-major ndarrays, the first dimensions have the fastest changing indices...
+ S0 = sh[ 0 ];
+ S1 = sh[ 1 ];
+ S2 = sh[ 2 ];
+ S3 = sh[ 3 ];
+ S4 = sh[ 4 ];
+ S5 = sh[ 5 ];
+ S6 = sh[ 6 ];
+ S7 = sh[ 7 ];
+ S8 = sh[ 8 ];
+ S9 = sh[ 9 ];
+ dx0 = sx[ 0 ]; // offset increment for innermost loop
+ dx1 = sx[ 1 ] - ( S0*sx[0] );
+ dx2 = sx[ 2 ] - ( S1*sx[1] );
+ dx3 = sx[ 3 ] - ( S2*sx[2] );
+ dx4 = sx[ 4 ] - ( S3*sx[3] );
+ dx5 = sx[ 5 ] - ( S4*sx[4] );
+ dx6 = sx[ 6 ] - ( S5*sx[5] );
+ dx7 = sx[ 7 ] - ( S6*sx[6] );
+ dx8 = sx[ 8 ] - ( S7*sx[7] );
+ dx9 = sx[ 9 ] - ( S8*sx[8] ); // offset increment for outermost loop
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache accessor:
+ get = x.accessors[ 0 ];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over the ndarray dimensions...
+ for ( i9 = 0; i9 < S9; i9++ ) {
+ for ( i8 = 0; i8 < S8; i8++ ) {
+ for ( i7 = 0; i7 < S7; i7++ ) {
+ for ( i6 = 0; i6 < S6; i6++ ) {
+ for ( i5 = 0; i5 < S5; i5++ ) {
+ for ( i4 = 0; i4 < S4; i4++ ) {
+ for ( i3 = 0; i3 < S3; i3++ ) {
+ for ( i2 = 0; i2 < S2; i2++ ) {
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ if ( get( xbuf, ix ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ ix += dx6;
+ }
+ ix += dx7;
+ }
+ ix += dx8;
+ }
+ ix += dx9;
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = some10d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/10d_blocked.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/10d_blocked.js
new file mode 100644
index 000000000000..a3da5af1ecdb
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/10d_blocked.js
@@ -0,0 +1,312 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth, max-len */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/nullary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/nullary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy via loop blocking.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 1, 1, 1, 1, 1, 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 12, 12, 12, 12, 12, 12, 12, 4, 4, 1 ];
+*
+* // Define the index offset:
+* var ox = 1;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = blockedsome10d( x, 4 );
+* // returns true
+*/
+function blockedsome10d( x, n ) { // eslint-disable-line max-statements, max-lines-per-function
+ var count;
+ var bsize;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var dx7;
+ var dx8;
+ var dx9;
+ var ox1;
+ var ox2;
+ var ox3;
+ var ox4;
+ var ox5;
+ var ox6;
+ var ox7;
+ var ox8;
+ var ox9;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var s4;
+ var s5;
+ var s6;
+ var s7;
+ var s8;
+ var s9;
+ var sx;
+ var ox;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+ var i7;
+ var i8;
+ var i9;
+ var j0;
+ var j1;
+ var j2;
+ var j3;
+ var j4;
+ var j5;
+ var j6;
+ var j7;
+ var j8;
+ var j9;
+ var o;
+
+ // Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( x.shape, x.strides );
+ sh = o.sh;
+ sx = o.sx;
+
+ // Determine the block size:
+ bsize = blockSize( x.dtype );
+
+ // Set a pointer to the first indexed element:
+ ox = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache the offset increment for the innermost loop:
+ dx0 = sx[0];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over blocks...
+ for ( j9 = sh[9]; j9 > 0; ) {
+ if ( j9 < bsize ) {
+ s9 = j9;
+ j9 = 0;
+ } else {
+ s9 = bsize;
+ j9 -= bsize;
+ }
+ ox9 = ox + ( j9*sx[9] );
+ for ( j8 = sh[8]; j8 > 0; ) {
+ if ( j8 < bsize ) {
+ s8 = j8;
+ j8 = 0;
+ } else {
+ s8 = bsize;
+ j8 -= bsize;
+ }
+ dx9 = sx[9] - ( s8*sx[8] );
+ ox8 = ox9 + ( j8*sx[8] );
+ for ( j7 = sh[7]; j7 > 0; ) {
+ if ( j7 < bsize ) {
+ s7 = j7;
+ j7 = 0;
+ } else {
+ s7 = bsize;
+ j7 -= bsize;
+ }
+ dx8 = sx[8] - ( s7*sx[7] );
+ ox7 = ox8 + ( j7*sx[7] );
+ for ( j6 = sh[6]; j6 > 0; ) {
+ if ( j6 < bsize ) {
+ s6 = j6;
+ j6 = 0;
+ } else {
+ s6 = bsize;
+ j6 -= bsize;
+ }
+ dx7 = sx[7] - ( s6*sx[6] );
+ ox6 = ox7 + ( j6*sx[6] );
+ for ( j5 = sh[5]; j5 > 0; ) {
+ if ( j5 < bsize ) {
+ s5 = j5;
+ j5 = 0;
+ } else {
+ s5 = bsize;
+ j5 -= bsize;
+ }
+ dx6 = sx[6] - ( s5*sx[5] );
+ ox5 = ox6 + ( j5*sx[5] );
+ for ( j4 = sh[4]; j4 > 0; ) {
+ if ( j4 < bsize ) {
+ s4 = j4;
+ j4 = 0;
+ } else {
+ s4 = bsize;
+ j4 -= bsize;
+ }
+ dx5 = sx[5] - ( s4*sx[4] );
+ ox4 = ox5 + ( j4*sx[4] );
+ for ( j3 = sh[3]; j3 > 0; ) {
+ if ( j3 < bsize ) {
+ s3 = j3;
+ j3 = 0;
+ } else {
+ s3 = bsize;
+ j3 -= bsize;
+ }
+ dx4 = sx[4] - ( s3*sx[3] );
+ ox3 = ox4 + ( j3*sx[3] );
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ dx3 = sx[3] - ( s2*sx[2] );
+ ox2 = ox3 + ( j2*sx[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dx2 = sx[2] - ( s1*sx[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute the index offset for the first input ndarray element in the current block:
+ ix = ox1 + ( j0*sx[0] );
+
+ // Compute the loop offset increment:
+ dx1 = sx[1] - ( s0*sx[0] );
+
+ // Iterate over the ndarray dimensions...
+ for ( i9 = 0; i9 < s9; i9++ ) {
+ for ( i8 = 0; i8 < s8; i8++ ) {
+ for ( i7 = 0; i7 < s7; i7++ ) {
+ for ( i6 = 0; i6 < s6; i6++ ) {
+ for ( i5 = 0; i5 < s5; i5++ ) {
+ for ( i4 = 0; i4 < s4; i4++ ) {
+ for ( i3 = 0; i3 < s3; i3++ ) {
+ for ( i2 = 0; i2 < s2; i2++ ) {
+ for ( i1 = 0; i1 < s1; i1++ ) {
+ for ( i0 = 0; i0 < s0; i0++ ) {
+ if ( xbuf[ ix ] ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ ix += dx6;
+ }
+ ix += dx7;
+ }
+ ix += dx8;
+ }
+ ix += dx9;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = blockedsome10d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/10d_blocked_accessors.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/10d_blocked_accessors.js
new file mode 100644
index 000000000000..f478d082e95c
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/10d_blocked_accessors.js
@@ -0,0 +1,319 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth, max-len */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/nullary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/nullary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy via loop blocking.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} x.accessors - data buffer accessors
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+* var accessors = require( '@stdlib/array/base/accessors' );
+*
+* // Create a data buffer:
+* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 4, 4, 4, 4, 4, 4, 4, 4, 2, 1 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'generic',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': accessors( xbuf ).accessors
+* };
+*
+* // Test elements:
+* var out = blockedsome10d( x, 4 );
+* // returns true
+*/
+function blockedsome10d( x, n ) { // eslint-disable-line max-statements, max-lines-per-function
+ var count;
+ var bsize;
+ var xbuf;
+ var get;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var dx7;
+ var dx8;
+ var dx9;
+ var ox1;
+ var ox2;
+ var ox3;
+ var ox4;
+ var ox5;
+ var ox6;
+ var ox7;
+ var ox8;
+ var ox9;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var s4;
+ var s5;
+ var s6;
+ var s7;
+ var s8;
+ var s9;
+ var sx;
+ var ox;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+ var i7;
+ var i8;
+ var i9;
+ var j0;
+ var j1;
+ var j2;
+ var j3;
+ var j4;
+ var j5;
+ var j6;
+ var j7;
+ var j8;
+ var j9;
+ var o;
+
+ // Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( x.shape, x.strides );
+ sh = o.sh;
+ sx = o.sx;
+
+ // Determine the block size:
+ bsize = blockSize( x.dtype );
+
+ // Set a pointer to the first indexed element:
+ ox = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache the offset increment for the innermost loop:
+ dx0 = sx[0];
+
+ // Cache accessor:
+ get = x.accessors[0];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over blocks...
+ for ( j9 = sh[9]; j9 > 0; ) {
+ if ( j9 < bsize ) {
+ s9 = j9;
+ j9 = 0;
+ } else {
+ s9 = bsize;
+ j9 -= bsize;
+ }
+ ox9 = ox + ( j9*sx[9] );
+ for ( j8 = sh[8]; j8 > 0; ) {
+ if ( j8 < bsize ) {
+ s8 = j8;
+ j8 = 0;
+ } else {
+ s8 = bsize;
+ j8 -= bsize;
+ }
+ dx9 = sx[9] - ( s8*sx[8] );
+ ox8 = ox9 + ( j8*sx[8] );
+ for ( j7 = sh[7]; j7 > 0; ) {
+ if ( j7 < bsize ) {
+ s7 = j7;
+ j7 = 0;
+ } else {
+ s7 = bsize;
+ j7 -= bsize;
+ }
+ dx8 = sx[8] - ( s7*sx[7] );
+ ox7 = ox8 + ( j7*sx[7] );
+ for ( j6 = sh[6]; j6 > 0; ) {
+ if ( j6 < bsize ) {
+ s6 = j6;
+ j6 = 0;
+ } else {
+ s6 = bsize;
+ j6 -= bsize;
+ }
+ dx7 = sx[7] - ( s6*sx[6] );
+ ox6 = ox7 + ( j6*sx[6] );
+ for ( j5 = sh[5]; j5 > 0; ) {
+ if ( j5 < bsize ) {
+ s5 = j5;
+ j5 = 0;
+ } else {
+ s5 = bsize;
+ j5 -= bsize;
+ }
+ dx6 = sx[6] - ( s5*sx[5] );
+ ox5 = ox6 + ( j5*sx[5] );
+ for ( j4 = sh[4]; j4 > 0; ) {
+ if ( j4 < bsize ) {
+ s4 = j4;
+ j4 = 0;
+ } else {
+ s4 = bsize;
+ j4 -= bsize;
+ }
+ dx5 = sx[5] - ( s4*sx[4] );
+ ox4 = ox5 + ( j4*sx[4] );
+ for ( j3 = sh[3]; j3 > 0; ) {
+ if ( j3 < bsize ) {
+ s3 = j3;
+ j3 = 0;
+ } else {
+ s3 = bsize;
+ j3 -= bsize;
+ }
+ dx4 = sx[4] - ( s3*sx[3] );
+ ox3 = ox4 + ( j3*sx[3] );
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ dx3 = sx[3] - ( s2*sx[2] );
+ ox2 = ox3 + ( j2*sx[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dx2 = sx[2] - ( s1*sx[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute the index offset for the first input ndarray element in the current block:
+ ix = ox1 + ( j0*sx[0] );
+
+ // Compute the loop offset increment:
+ dx1 = sx[1] - ( s0*sx[0] );
+
+ // Iterate over the ndarray dimensions...
+ for ( i9 = 0; i9 < s9; i9++ ) {
+ for ( i8 = 0; i8 < s8; i8++ ) {
+ for ( i7 = 0; i7 < s7; i7++ ) {
+ for ( i6 = 0; i6 < s6; i6++ ) {
+ for ( i5 = 0; i5 < s5; i5++ ) {
+ for ( i4 = 0; i4 < s4; i4++ ) {
+ for ( i3 = 0; i3 < s3; i3++ ) {
+ for ( i2 = 0; i2 < s2; i2++ ) {
+ for ( i1 = 0; i1 < s1; i1++ ) {
+ for ( i0 = 0; i0 < s0; i0++ ) {
+ if ( get( xbuf, ix ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ ix += dx6;
+ }
+ ix += dx7;
+ }
+ ix += dx8;
+ }
+ ix += dx9;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = blockedsome10d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/10d_blocked_complex.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/10d_blocked_complex.js
new file mode 100644
index 000000000000..d01d9ed5ef58
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/10d_blocked_complex.js
@@ -0,0 +1,312 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth, max-len */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/nullary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/nullary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements of a reinterpreted complex number ndarray are truthy via loop blocking.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 8, 8, 8, 8, 8, 8, 8, 8, 4, 2 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'complex128',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = blockedsome10d( x, 4 );
+* // returns true
+*/
+function blockedsome10d( x, n ) { // eslint-disable-line max-statements, max-lines-per-function
+ var count;
+ var bsize;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var dx7;
+ var dx8;
+ var dx9;
+ var ox1;
+ var ox2;
+ var ox3;
+ var ox4;
+ var ox5;
+ var ox6;
+ var ox7;
+ var ox8;
+ var ox9;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var s4;
+ var s5;
+ var s6;
+ var s7;
+ var s8;
+ var s9;
+ var sx;
+ var ox;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+ var i7;
+ var i8;
+ var i9;
+ var j0;
+ var j1;
+ var j2;
+ var j3;
+ var j4;
+ var j5;
+ var j6;
+ var j7;
+ var j8;
+ var j9;
+ var o;
+
+ // Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( x.shape, x.strides );
+ sh = o.sh;
+ sx = o.sx;
+
+ // Determine the block size:
+ bsize = blockSize( x.dtype );
+
+ // Set a pointer to the first indexed element:
+ ox = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache the offset increment for the innermost loop:
+ dx0 = sx[0];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over blocks...
+ for ( j9 = sh[9]; j9 > 0; ) {
+ if ( j9 < bsize ) {
+ s9 = j9;
+ j9 = 0;
+ } else {
+ s9 = bsize;
+ j9 -= bsize;
+ }
+ ox9 = ox + ( j9*sx[9] );
+ for ( j8 = sh[8]; j8 > 0; ) {
+ if ( j8 < bsize ) {
+ s8 = j8;
+ j8 = 0;
+ } else {
+ s8 = bsize;
+ j8 -= bsize;
+ }
+ dx9 = sx[9] - ( s8*sx[8] );
+ ox8 = ox9 + ( j8*sx[8] );
+ for ( j7 = sh[7]; j7 > 0; ) {
+ if ( j7 < bsize ) {
+ s7 = j7;
+ j7 = 0;
+ } else {
+ s7 = bsize;
+ j7 -= bsize;
+ }
+ dx8 = sx[8] - ( s7*sx[7] );
+ ox7 = ox8 + ( j7*sx[7] );
+ for ( j6 = sh[6]; j6 > 0; ) {
+ if ( j6 < bsize ) {
+ s6 = j6;
+ j6 = 0;
+ } else {
+ s6 = bsize;
+ j6 -= bsize;
+ }
+ dx7 = sx[7] - ( s6*sx[6] );
+ ox6 = ox7 + ( j6*sx[6] );
+ for ( j5 = sh[5]; j5 > 0; ) {
+ if ( j5 < bsize ) {
+ s5 = j5;
+ j5 = 0;
+ } else {
+ s5 = bsize;
+ j5 -= bsize;
+ }
+ dx6 = sx[6] - ( s5*sx[5] );
+ ox5 = ox6 + ( j5*sx[5] );
+ for ( j4 = sh[4]; j4 > 0; ) {
+ if ( j4 < bsize ) {
+ s4 = j4;
+ j4 = 0;
+ } else {
+ s4 = bsize;
+ j4 -= bsize;
+ }
+ dx5 = sx[5] - ( s4*sx[4] );
+ ox4 = ox5 + ( j4*sx[4] );
+ for ( j3 = sh[3]; j3 > 0; ) {
+ if ( j3 < bsize ) {
+ s3 = j3;
+ j3 = 0;
+ } else {
+ s3 = bsize;
+ j3 -= bsize;
+ }
+ dx4 = sx[4] - ( s3*sx[3] );
+ ox3 = ox4 + ( j3*sx[3] );
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ dx3 = sx[3] - ( s2*sx[2] );
+ ox2 = ox3 + ( j2*sx[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dx2 = sx[2] - ( s1*sx[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute the index offset for the first input ndarray element in the current block:
+ ix = ox1 + ( j0*sx[0] );
+
+ // Compute the loop offset increment:
+ dx1 = sx[1] - ( s0*sx[0] );
+
+ // Iterate over the ndarray dimensions...
+ for ( i9 = 0; i9 < s9; i9++ ) {
+ for ( i8 = 0; i8 < s8; i8++ ) {
+ for ( i7 = 0; i7 < s7; i7++ ) {
+ for ( i6 = 0; i6 < s6; i6++ ) {
+ for ( i5 = 0; i5 < s5; i5++ ) {
+ for ( i4 = 0; i4 < s4; i4++ ) {
+ for ( i3 = 0; i3 < s3; i3++ ) {
+ for ( i2 = 0; i2 < s2; i2++ ) {
+ for ( i1 = 0; i1 < s1; i1++ ) {
+ for ( i0 = 0; i0 < s0; i0++ ) {
+ if ( ( xbuf[ ix ] || xbuf[ ix+1 ] ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ ix += dx6;
+ }
+ ix += dx7;
+ }
+ ix += dx8;
+ }
+ ix += dx9;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = blockedsome10d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/10d_complex.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/10d_complex.js
new file mode 100644
index 000000000000..ecaa20fd7f9c
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/10d_complex.js
@@ -0,0 +1,212 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth, max-len */
+
+'use strict';
+
+// MODULES //
+
+var strides2order = require( '@stdlib/ndarray/base/strides2order' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements of a reinterpreted complex number ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 8, 8, 8, 8, 8, 8, 8, 8, 4, 2 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'complex128',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = some10d( x, 4 );
+* // returns true
+*/
+function some10d( x, n ) { // eslint-disable-line max-statements
+ var count;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var dx7;
+ var dx8;
+ var dx9;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var S3;
+ var S4;
+ var S5;
+ var S6;
+ var S7;
+ var S8;
+ var S9;
+ var sx;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+ var i7;
+ var i8;
+ var i9;
+
+ // Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...
+ sh = x.shape;
+ sx = x.strides;
+ if ( strides2order( sx ) === 1 ) {
+ // For row-major ndarrays, the last dimensions have the fastest changing indices...
+ S0 = sh[ 9 ];
+ S1 = sh[ 8 ];
+ S2 = sh[ 7 ];
+ S3 = sh[ 6 ];
+ S4 = sh[ 5 ];
+ S5 = sh[ 4 ];
+ S6 = sh[ 3 ];
+ S7 = sh[ 2 ];
+ S8 = sh[ 1 ];
+ S9 = sh[ 0 ];
+ dx0 = sx[ 9 ]; // offset increment for innermost loop
+ dx1 = sx[ 8 ] - ( S0*sx[9] );
+ dx2 = sx[ 7 ] - ( S1*sx[8] );
+ dx3 = sx[ 6 ] - ( S2*sx[7] );
+ dx4 = sx[ 5 ] - ( S3*sx[6] );
+ dx5 = sx[ 4 ] - ( S4*sx[5] );
+ dx6 = sx[ 3 ] - ( S5*sx[4] );
+ dx7 = sx[ 2 ] - ( S6*sx[3] );
+ dx8 = sx[ 1 ] - ( S7*sx[2] );
+ dx9 = sx[ 0 ] - ( S8*sx[1] ); // offset increment for outermost loop
+ } else { // order === 'column-major'
+ // For column-major ndarrays, the first dimensions have the fastest changing indices...
+ S0 = sh[ 0 ];
+ S1 = sh[ 1 ];
+ S2 = sh[ 2 ];
+ S3 = sh[ 3 ];
+ S4 = sh[ 4 ];
+ S5 = sh[ 5 ];
+ S6 = sh[ 6 ];
+ S7 = sh[ 7 ];
+ S8 = sh[ 8 ];
+ S9 = sh[ 9 ];
+ dx0 = sx[ 0 ]; // offset increment for innermost loop
+ dx1 = sx[ 1 ] - ( S0*sx[0] );
+ dx2 = sx[ 2 ] - ( S1*sx[1] );
+ dx3 = sx[ 3 ] - ( S2*sx[2] );
+ dx4 = sx[ 4 ] - ( S3*sx[3] );
+ dx5 = sx[ 5 ] - ( S4*sx[4] );
+ dx6 = sx[ 6 ] - ( S5*sx[5] );
+ dx7 = sx[ 7 ] - ( S6*sx[6] );
+ dx8 = sx[ 8 ] - ( S7*sx[7] );
+ dx9 = sx[ 9 ] - ( S8*sx[8] ); // offset increment for outermost loop
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over the ndarray dimensions...
+ for ( i9 = 0; i9 < S9; i9++ ) {
+ for ( i8 = 0; i8 < S8; i8++ ) {
+ for ( i7 = 0; i7 < S7; i7++ ) {
+ for ( i6 = 0; i6 < S6; i6++ ) {
+ for ( i5 = 0; i5 < S5; i5++ ) {
+ for ( i4 = 0; i4 < S4; i4++ ) {
+ for ( i3 = 0; i3 < S3; i3++ ) {
+ for ( i2 = 0; i2 < S2; i2++ ) {
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ if ( ( xbuf[ ix ] || xbuf[ ix+1 ] ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ ix += dx6;
+ }
+ ix += dx7;
+ }
+ ix += dx8;
+ }
+ ix += dx9;
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = some10d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/1d.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/1d.js
new file mode 100644
index 000000000000..b6099eb4a549
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/1d.js
@@ -0,0 +1,105 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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';
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 4 ];
+*
+* // Define the array strides:
+* var sx = [ 2 ];
+*
+* // Define the index offset:
+* var ox = 1;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = some1d( x, 4 );
+* // returns true
+*/
+function some1d( x, n ) {
+ var count;
+ var xbuf;
+ var dx0;
+ var S0;
+ var ix;
+ var i0;
+
+ // Note on variable naming convention: S#, dx#, i# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Extract loop variables: dimensions and loop offset (pointer) increments:
+ S0 = x.shape[ 0 ];
+ dx0 = x.strides[ 0 ];
+
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over the ndarray dimensions...
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ if ( xbuf[ ix ] ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = some1d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/1d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/1d_accessors.js
new file mode 100644
index 000000000000..0d3e295cb919
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/1d_accessors.js
@@ -0,0 +1,112 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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';
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} x.accessors - data buffer accessors
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+* var accessors = require( '@stdlib/array/base/accessors' );
+*
+* // Create a data buffer:
+* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 4 ];
+*
+* // Define the array strides:
+* var sx = [ 2 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'generic',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': accessors( xbuf ).accessors
+* };
+*
+* // Test elements:
+* var out = some1d( x, 4 );
+* // returns true
+*/
+function some1d( x, n ) {
+ var count;
+ var xbuf;
+ var get;
+ var dx0;
+ var S0;
+ var ix;
+ var i0;
+
+ // Note on variable naming convention: S#, dx#, i# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Extract loop variables: dimensions and loop offset (pointer) increments...
+ S0 = x.shape[ 0 ];
+ dx0 = x.strides[ 0 ];
+
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache accessor:
+ get = x.accessors[ 0 ];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over the ndarray dimensions...
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ if ( get( xbuf, ix ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = some1d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/1d_complex.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/1d_complex.js
new file mode 100644
index 000000000000..0b691de53e15
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/1d_complex.js
@@ -0,0 +1,105 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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';
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements of a reinterpreted complex number ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 4 ];
+*
+* // Define the array strides:
+* var sx = [ 2 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'complex128',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = some1d( x, 4 );
+* // returns true
+*/
+function some1d( x, n ) {
+ var count;
+ var xbuf;
+ var dx0;
+ var S0;
+ var ix;
+ var i0;
+
+ // Note on variable naming convention: S#, dx#, i# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Extract loop variables: dimensions and loop offset (pointer) increments:
+ S0 = x.shape[ 0 ];
+ dx0 = x.strides[ 0 ];
+
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over the ndarray dimensions...
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ if ( ( xbuf[ ix ] || xbuf[ ix+1 ] ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = some1d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/2d.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/2d.js
new file mode 100644
index 000000000000..f4c12cb7c636
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/2d.js
@@ -0,0 +1,130 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 strides2order = require( '@stdlib/ndarray/base/strides2order' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 4, 1 ];
+*
+* // Define the index offset:
+* var ox = 1;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = some2d( x, 4 );
+* // returns true
+*/
+function some2d( x, n ) {
+ var count;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var sh;
+ var S0;
+ var S1;
+ var sx;
+ var ix;
+ var i0;
+ var i1;
+
+ // Note on variable naming convention: S#, dx#, i# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...
+ sh = x.shape;
+ sx = x.strides;
+ if ( strides2order( sx ) === 1 ) {
+ // For row-major ndarrays, the last dimensions have the fastest changing indices...
+ S0 = sh[ 1 ];
+ S1 = sh[ 0 ];
+ dx0 = sx[ 1 ]; // offset increment for innermost loop
+ dx1 = sx[ 0 ] - ( S0*sx[1] ); // offset increment for outermost loop
+ } else { // order === 'column-major'
+ // For column-major ndarrays, the first dimensions have the fastest changing indices...
+ S0 = sh[ 0 ];
+ S1 = sh[ 1 ];
+ dx0 = sx[ 0 ]; // offset increment for innermost loop
+ dx1 = sx[ 1 ] - ( S0*sx[0] ); // offset increment for outermost loop
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over the ndarray dimensions...
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ if ( xbuf[ ix ] ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = some2d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/2d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/2d_accessors.js
new file mode 100644
index 000000000000..21793ff88150
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/2d_accessors.js
@@ -0,0 +1,137 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 strides2order = require( '@stdlib/ndarray/base/strides2order' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} x.accessors - data buffer accessors
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+* var accessors = require( '@stdlib/array/base/accessors' );
+*
+* // Create a data buffer:
+* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 4, 1 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'generic',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': accessors( xbuf ).accessors
+* };
+*
+* // Test elements:
+* var out = some2d( x, 4 );
+* // returns true
+*/
+function some2d( x, n ) {
+ var count;
+ var xbuf;
+ var get;
+ var dx0;
+ var dx1;
+ var sh;
+ var S0;
+ var S1;
+ var sx;
+ var ix;
+ var i0;
+ var i1;
+
+ // Note on variable naming convention: S#, dx#, i# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...
+ sh = x.shape;
+ sx = x.strides;
+ if ( strides2order( sx ) === 1 ) {
+ // For row-major ndarrays, the last dimensions have the fastest changing indices...
+ S0 = sh[ 1 ];
+ S1 = sh[ 0 ];
+ dx0 = sx[ 1 ]; // offset increment for innermost loop
+ dx1 = sx[ 0 ] - ( S0*sx[1] ); // offset increment for outermost loop
+ } else { // order === 'column-major'
+ // For column-major ndarrays, the first dimensions have the fastest changing indices...
+ S0 = sh[ 0 ];
+ S1 = sh[ 1 ];
+ dx0 = sx[ 0 ]; // offset increment for innermost loop
+ dx1 = sx[ 1 ] - ( S0*sx[0] ); // offset increment for outermost loop
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache accessor:
+ get = x.accessors[ 0 ];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over the ndarray dimensions...
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ if ( get( xbuf, ix ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = some2d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/2d_blocked.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/2d_blocked.js
new file mode 100644
index 000000000000..04a6abd5a13b
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/2d_blocked.js
@@ -0,0 +1,160 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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';
+
+/* eslint-disable max-depth */
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/nullary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/nullary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 4, 1 ];
+*
+* // Define the index offset:
+* var ox = 1;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = blockedsome2d( x, 4 );
+* // returns true
+*/
+function blockedsome2d( x, n ) {
+ var bsize;
+ var count;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var ox1;
+ var sh;
+ var s0;
+ var s1;
+ var sx;
+ var ox;
+ var ix;
+ var i0;
+ var i1;
+ var j0;
+ var j1;
+ var o;
+
+ // Note on variable naming convention: s#, dx#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( x.shape, x.strides );
+ sh = o.sh;
+ sx = o.sx;
+
+ // Determine the block size:
+ bsize = blockSize( x.dtype );
+
+ // Set a pointer to the first indexed element:
+ ox = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache the offset increment for the innermost loop:
+ dx0 = sx[0];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over blocks...
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ ox1 = ox + ( j1*sx[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute the index offset for the first input ndarray element in the current block:
+ ix = ox1 + ( j0*sx[0] );
+
+ // Compute the loop offset increment:
+ dx1 = sx[1] - ( s0*sx[0] );
+
+ // Iterate over the ndarray dimensions...
+ for ( i1 = 0; i1 < s1; i1++ ) {
+ for ( i0 = 0; i0 < s0; i0++ ) {
+ if ( xbuf[ ix ] ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ }
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = blockedsome2d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/2d_blocked_accessors.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/2d_blocked_accessors.js
new file mode 100644
index 000000000000..29556c820f61
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/2d_blocked_accessors.js
@@ -0,0 +1,167 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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';
+
+/* eslint-disable max-depth */
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/nullary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/nullary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} x.accessors - data buffer accessors
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+* var accessors = require( '@stdlib/array/base/accessors' );
+*
+* // Create a data buffer:
+* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 4, 1 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'generic',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': accessors( xbuf ).accessors
+* };
+*
+* // Test elements:
+* var out = blockedsome2d( x, 4 );
+* // returns true
+*/
+function blockedsome2d( x, n ) {
+ var bsize;
+ var count;
+ var xbuf;
+ var get;
+ var dx0;
+ var dx1;
+ var ox1;
+ var sh;
+ var s0;
+ var s1;
+ var sx;
+ var ox;
+ var ix;
+ var i0;
+ var i1;
+ var j0;
+ var j1;
+ var o;
+
+ // Note on variable naming convention: s#, dx#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( x.shape, x.strides );
+ sh = o.sh;
+ sx = o.sx;
+
+ // Determine the block size:
+ bsize = blockSize( x.dtype );
+
+ // Set a pointer to the first indexed element:
+ ox = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache the offset increment for the innermost loop:
+ dx0 = sx[0];
+
+ // Cache accessor:
+ get = x.accessors[0];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over blocks...
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ ox1 = ox + ( j1*sx[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute the index offset for the first input ndarray element in the current block:
+ ix = ox1 + ( j0*sx[0] );
+
+ // Compute the loop offset increment:
+ dx1 = sx[1] - ( s0*sx[0] );
+
+ // Iterate over the ndarray dimensions...
+ for ( i1 = 0; i1 < s1; i1++ ) {
+ for ( i0 = 0; i0 < s0; i0++ ) {
+ if ( get( xbuf, ix ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ }
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = blockedsome2d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/2d_blocked_complex.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/2d_blocked_complex.js
new file mode 100644
index 000000000000..f737090b7b9c
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/2d_blocked_complex.js
@@ -0,0 +1,160 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/nullary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/nullary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements of a reinterpreted complex number ndarray are truthy via loop blocking.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 4, 2 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'complex128',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = blockedsome2d( x, 4 );
+* // returns true
+*/
+function blockedsome2d( x, n ) {
+ var count;
+ var bsize;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var ox1;
+ var sh;
+ var s0;
+ var s1;
+ var sx;
+ var ox;
+ var ix;
+ var i0;
+ var i1;
+ var j0;
+ var j1;
+ var o;
+
+ // Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( x.shape, x.strides );
+ sh = o.sh;
+ sx = o.sx;
+
+ // Determine the block size:
+ bsize = blockSize( x.dtype );
+
+ // Set a pointer to the first indexed element:
+ ox = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache the offset increment for the innermost loop:
+ dx0 = sx[0];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over blocks...
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ ox1 = ox + ( j1*sx[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute the index offset for the first input ndarray element in the current block:
+ ix = ox1 + ( j0*sx[0] );
+
+ // Compute the loop offset increment:
+ dx1 = sx[1] - ( s0*sx[0] );
+
+ // Iterate over the ndarray dimensions...
+ for ( i1 = 0; i1 < s1; i1++ ) {
+ for ( i0 = 0; i0 < s0; i0++ ) {
+ if ( ( xbuf[ ix ] || xbuf[ ix+1 ] ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ }
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = blockedsome2d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/2d_complex.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/2d_complex.js
new file mode 100644
index 000000000000..82462941fa4a
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/2d_complex.js
@@ -0,0 +1,130 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 strides2order = require( '@stdlib/ndarray/base/strides2order' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements of a reinterpreted complex number ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 4, 2 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'complex128',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = some2d( x, 4 );
+* // returns true
+*/
+function some2d( x, n ) {
+ var count;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var sh;
+ var S0;
+ var S1;
+ var sx;
+ var ix;
+ var i0;
+ var i1;
+
+ // Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...
+ sh = x.shape;
+ sx = x.strides;
+ if ( strides2order( sx ) === 1 ) {
+ // For row-major ndarrays, the last dimensions have the fastest changing indices...
+ S0 = sh[ 1 ];
+ S1 = sh[ 0 ];
+ dx0 = sx[ 1 ]; // offset increment for innermost loop
+ dx1 = sx[ 0 ] - ( S0*sx[1] ); // offset increment for outermost loop
+ } else { // order === 'column-major'
+ // For column-major ndarrays, the first dimensions have the fastest changing indices...
+ S0 = sh[ 0 ];
+ S1 = sh[ 1 ];
+ dx0 = sx[ 0 ]; // offset increment for innermost loop
+ dx1 = sx[ 1 ] - ( S0*sx[0] ); // offset increment for outermost loop
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over the ndarray dimensions...
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ if ( ( xbuf[ ix ] || xbuf[ ix+1 ] ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = some2d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/3d.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/3d.js
new file mode 100644
index 000000000000..06bb78f40859
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/3d.js
@@ -0,0 +1,140 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 strides2order = require( '@stdlib/ndarray/base/strides2order' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 4, 4, 1 ];
+*
+* // Define the index offset:
+* var ox = 1;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = some3d( x, 4 );
+* // returns true
+*/
+function some3d( x, n ) {
+ var count;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var dx2;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var sx;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+
+ // Note on variable naming convention: S#, dx#, i# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...
+ sh = x.shape;
+ sx = x.strides;
+ if ( strides2order( sx ) === 1 ) {
+ // For row-major ndarrays, the last dimensions have the fastest changing indices...
+ S0 = sh[ 2 ];
+ S1 = sh[ 1 ];
+ S2 = sh[ 0 ];
+ dx0 = sx[ 2 ]; // offset increment for innermost loop
+ dx1 = sx[ 1 ] - ( S0*sx[2] );
+ dx2 = sx[ 0 ] - ( S1*sx[1] ); // offset increment for outermost loop
+ } else { // order === 'column-major'
+ // For column-major ndarrays, the first dimensions have the fastest changing indices...
+ S0 = sh[ 0 ];
+ S1 = sh[ 1 ];
+ S2 = sh[ 2 ];
+ dx0 = sx[ 0 ]; // offset increment for innermost loop
+ dx1 = sx[ 1 ] - ( S0*sx[0] );
+ dx2 = sx[ 2 ] - ( S1*sx[1] ); // offset increment for outermost loop
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over the ndarray dimensions...
+ for ( i2 = 0; i2 < S2; i2++ ) {
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ if ( xbuf[ ix ] ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = some3d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/3d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/3d_accessors.js
new file mode 100644
index 000000000000..0631420a2610
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/3d_accessors.js
@@ -0,0 +1,147 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 strides2order = require( '@stdlib/ndarray/base/strides2order' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} x.accessors - data buffer accessors
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+* var accessors = require( '@stdlib/array/base/accessors' );
+*
+* // Create a data buffer:
+* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 2, 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 4, 2, 1 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'generic',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': accessors( xbuf ).accessors
+* };
+*
+* // Test elements:
+* var out = some3d( x, 4 );
+* // returns true
+*/
+function some3d( x, n ) {
+ var count;
+ var xbuf;
+ var get;
+ var dx0;
+ var dx1;
+ var dx2;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var sx;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+
+ // Note on variable naming convention: S#, dx#, i# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...
+ sh = x.shape;
+ sx = x.strides;
+ if ( strides2order( sx ) === 1 ) {
+ // For row-major ndarrays, the last dimensions have the fastest changing indices...
+ S0 = sh[ 2 ];
+ S1 = sh[ 1 ];
+ S2 = sh[ 0 ];
+ dx0 = sx[ 2 ]; // offset increment for innermost loop
+ dx1 = sx[ 1 ] - ( S0*sx[2] );
+ dx2 = sx[ 0 ] - ( S1*sx[1] ); // offset increment for outermost loop
+ } else { // order === 'column-major'
+ // For column-major ndarrays, the first dimensions have the fastest changing indices...
+ S0 = sh[ 0 ];
+ S1 = sh[ 1 ];
+ S2 = sh[ 2 ];
+ dx0 = sx[ 0 ]; // offset increment for innermost loop
+ dx1 = sx[ 1 ] - ( S0*sx[0] );
+ dx2 = sx[ 2 ] - ( S1*sx[1] ); // offset increment for outermost loop
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache accessor:
+ get = x.accessors[ 0 ];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over the ndarray dimensions...
+ for ( i2 = 0; i2 < S2; i2++ ) {
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ if ( get( xbuf, ix ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = some3d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/3d_blocked.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/3d_blocked.js
new file mode 100644
index 000000000000..919b97cb0564
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/3d_blocked.js
@@ -0,0 +1,179 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/nullary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/nullary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 4, 4, 1 ];
+*
+* // Define the index offset:
+* var ox = 1;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = blockedsome3d( x, 4 );
+* // returns true
+*/
+function blockedsome3d( x, n ) {
+ var bsize;
+ var count;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var dx2;
+ var ox1;
+ var ox2;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var sx;
+ var ox;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var j0;
+ var j1;
+ var j2;
+ var o;
+
+ // Note on variable naming convention: s#, dx#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( x.shape, x.strides );
+ sh = o.sh;
+ sx = o.sx;
+
+ // Determine the block size:
+ bsize = blockSize( x.dtype );
+
+ // Set a pointer to the first indexed element:
+ ox = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache the offset increment for the innermost loop:
+ dx0 = sx[0];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over blocks...
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ ox2 = ox + ( j2*sx[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dx2 = sx[2] - ( s1*sx[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute the index offset for the first input ndarray element in the current block:
+ ix = ox1 + ( j0*sx[0] );
+
+ // Compute the loop offset increment:
+ dx1 = sx[1] - ( s0*sx[0] );
+
+ // Iterate over the ndarray dimensions...
+ for ( i2 = 0; i2 < s2; i2++ ) {
+ for ( i1 = 0; i1 < s1; i1++ ) {
+ for ( i0 = 0; i0 < s0; i0++ ) {
+ if ( xbuf[ ix ] ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ }
+ }
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = blockedsome3d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/3d_blocked_accessors.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/3d_blocked_accessors.js
new file mode 100644
index 000000000000..1195668cab4b
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/3d_blocked_accessors.js
@@ -0,0 +1,186 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/nullary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/nullary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} x.accessors - data buffer accessors
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+* var accessors = require( '@stdlib/array/base/accessors' );
+*
+* // Create a data buffer:
+* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 2, 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 4, 2, 1 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'generic',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': accessors( xbuf ).accessors
+* };
+*
+* // Test elements:
+* var out = blockedsome3d( x, 4 );
+* // returns true
+*/
+function blockedsome3d( x, n ) {
+ var bsize;
+ var count;
+ var xbuf;
+ var get;
+ var dx0;
+ var dx1;
+ var dx2;
+ var ox1;
+ var ox2;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var sx;
+ var ox;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var j0;
+ var j1;
+ var j2;
+ var o;
+
+ // Note on variable naming convention: s#, dx#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( x.shape, x.strides );
+ sh = o.sh;
+ sx = o.sx;
+
+ // Determine the block size:
+ bsize = blockSize( x.dtype );
+
+ // Set a pointer to the first indexed element:
+ ox = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache the offset increment for the innermost loop:
+ dx0 = sx[0];
+
+ // Cache accessor:
+ get = x.accessors[0];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over blocks...
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ ox2 = ox + ( j2*sx[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dx2 = sx[2] - ( s1*sx[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute the index offset for the first input ndarray element in the current block:
+ ix = ox1 + ( j0*sx[0] );
+
+ // Compute the loop offset increment:
+ dx1 = sx[1] - ( s0*sx[0] );
+
+ // Iterate over the ndarray dimensions...
+ for ( i2 = 0; i2 < s2; i2++ ) {
+ for ( i1 = 0; i1 < s1; i1++ ) {
+ for ( i0 = 0; i0 < s0; i0++ ) {
+ if ( get( xbuf, ix ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ }
+ }
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = blockedsome3d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/3d_blocked_complex.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/3d_blocked_complex.js
new file mode 100644
index 000000000000..d7c7d6b71947
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/3d_blocked_complex.js
@@ -0,0 +1,179 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/nullary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/nullary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements of a reinterpreted complex number ndarray is truthy via loop blocking.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 8, 4, 2 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'complex128',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = blockedsome3d( x, 4 );
+* // returns true
+*/
+function blockedsome3d( x, n ) {
+ var count;
+ var bsize;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var dx2;
+ var ox1;
+ var ox2;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var sx;
+ var ox;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var j0;
+ var j1;
+ var j2;
+ var o;
+
+ // Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( x.shape, x.strides );
+ sh = o.sh;
+ sx = o.sx;
+
+ // Determine the block size:
+ bsize = blockSize( x.dtype );
+
+ // Set a pointer to the first indexed element:
+ ox = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache the offset increment for the innermost loop:
+ dx0 = sx[0];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over blocks...
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ ox2 = ox + ( j2*sx[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dx2 = sx[2] - ( s1*sx[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute the index offset for the first input ndarray element in the current block:
+ ix = ox1 + ( j0*sx[0] );
+
+ // Compute the loop offset increment:
+ dx1 = sx[1] - ( s0*sx[0] );
+
+ // Iterate over the ndarray dimensions...
+ for ( i2 = 0; i2 < s2; i2++ ) {
+ for ( i1 = 0; i1 < s1; i1++ ) {
+ for ( i0 = 0; i0 < s0; i0++ ) {
+ if ( ( xbuf[ ix ] || xbuf[ ix+1 ] ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ }
+ }
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = blockedsome3d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/3d_complex.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/3d_complex.js
new file mode 100644
index 000000000000..fe1e5a23b218
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/3d_complex.js
@@ -0,0 +1,140 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 strides2order = require( '@stdlib/ndarray/base/strides2order' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements of a reinterpreted complex number ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 8, 4, 2 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'complex128',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = some3d( x, 4 );
+* // returns true
+*/
+function some3d( x, n ) {
+ var count;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var dx2;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var sx;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+
+ // Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...
+ sh = x.shape;
+ sx = x.strides;
+ if ( strides2order( sx ) === 1 ) {
+ // For row-major ndarrays, the last dimensions have the fastest changing indices...
+ S0 = sh[ 2 ];
+ S1 = sh[ 1 ];
+ S2 = sh[ 0 ];
+ dx0 = sx[ 2 ]; // offset increment for innermost loop
+ dx1 = sx[ 1 ] - ( S0*sx[2] );
+ dx2 = sx[ 0 ] - ( S1*sx[1] ); // offset increment for outermost loop
+ } else { // order === 'column-major'
+ // For column-major ndarrays, the first dimensions have the fastest changing indices...
+ S0 = sh[ 0 ];
+ S1 = sh[ 1 ];
+ S2 = sh[ 2 ];
+ dx0 = sx[ 0 ]; // offset increment for innermost loop
+ dx1 = sx[ 1 ] - ( S0*sx[0] );
+ dx2 = sx[ 2 ] - ( S1*sx[1] ); // offset increment for outermost loop
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over the ndarray dimensions...
+ for ( i2 = 0; i2 < S2; i2++ ) {
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ if ( ( xbuf[ ix ] || xbuf[ ix+1 ] ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = some3d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/4d.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/4d.js
new file mode 100644
index 000000000000..35e5554f6779
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/4d.js
@@ -0,0 +1,152 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth */
+
+'use strict';
+
+// MODULES //
+
+var strides2order = require( '@stdlib/ndarray/base/strides2order' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 12, 4, 4, 1 ];
+*
+* // Define the index offset:
+* var ox = 1;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = some4d( x, 4 );
+* // returns true
+*/
+function some4d( x, n ) {
+ var count;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var S3;
+ var sx;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+
+ // Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...
+ sh = x.shape;
+ sx = x.strides;
+ if ( strides2order( sx ) === 1 ) {
+ // For row-major ndarrays, the last dimensions have the fastest changing indices...
+ S0 = sh[ 3 ];
+ S1 = sh[ 2 ];
+ S2 = sh[ 1 ];
+ S3 = sh[ 0 ];
+ dx0 = sx[ 3 ]; // offset increment for innermost loop
+ dx1 = sx[ 2 ] - ( S0*sx[3] );
+ dx2 = sx[ 1 ] - ( S1*sx[2] );
+ dx3 = sx[ 0 ] - ( S2*sx[1] ); // offset increment for outermost loop
+ } else { // order === 'column-major'
+ // For column-major ndarrays, the first dimensions have the fastest changing indices...
+ S0 = sh[ 0 ];
+ S1 = sh[ 1 ];
+ S2 = sh[ 2 ];
+ S3 = sh[ 3 ];
+ dx0 = sx[ 0 ]; // offset increment for innermost loop
+ dx1 = sx[ 1 ] - ( S0*sx[0] );
+ dx2 = sx[ 2 ] - ( S1*sx[1] );
+ dx3 = sx[ 3 ] - ( S2*sx[2] ); // offset increment for outermost loop
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over the ndarray dimensions...
+ for ( i3 = 0; i3 < S3; i3++ ) {
+ for ( i2 = 0; i2 < S2; i2++ ) {
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ if ( xbuf[ ix ] ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = some4d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/4d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/4d_accessors.js
new file mode 100644
index 000000000000..8d8a772ff4e9
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/4d_accessors.js
@@ -0,0 +1,159 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth */
+
+'use strict';
+
+// MODULES //
+
+var strides2order = require( '@stdlib/ndarray/base/strides2order' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} x.accessors - data buffer accessors
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+* var accessors = require( '@stdlib/array/base/accessors' );
+*
+* // Create a data buffer:
+* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 4, 4, 2, 1 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'generic',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': accessors( xbuf ).accessors
+* };
+*
+* // Test elements:
+* var out = some4d( x, 4 );
+* // returns true
+*/
+function some4d( x, n ) {
+ var count;
+ var xbuf;
+ var get;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var S3;
+ var sx;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+
+ // Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...
+ sh = x.shape;
+ sx = x.strides;
+ if ( strides2order( sx ) === 1 ) {
+ // For row-major ndarrays, the last dimensions have the fastest changing indices...
+ S0 = sh[ 3 ];
+ S1 = sh[ 2 ];
+ S2 = sh[ 1 ];
+ S3 = sh[ 0 ];
+ dx0 = sx[ 3 ]; // offset increment for innermost loop
+ dx1 = sx[ 2 ] - ( S0*sx[3] );
+ dx2 = sx[ 1 ] - ( S1*sx[2] );
+ dx3 = sx[ 0 ] - ( S2*sx[1] ); // offset increment for outermost loop
+ } else { // order === 'column-major'
+ // For column-major ndarrays, the first dimensions have the fastest changing indices...
+ S0 = sh[ 0 ];
+ S1 = sh[ 1 ];
+ S2 = sh[ 2 ];
+ S3 = sh[ 3 ];
+ dx0 = sx[ 0 ]; // offset increment for innermost loop
+ dx1 = sx[ 1 ] - ( S0*sx[0] );
+ dx2 = sx[ 2 ] - ( S1*sx[1] );
+ dx3 = sx[ 3 ] - ( S2*sx[2] ); // offset increment for outermost loop
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache accessor:
+ get = x.accessors[ 0 ];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over the ndarray dimensions...
+ for ( i3 = 0; i3 < S3; i3++ ) {
+ for ( i2 = 0; i2 < S2; i2++ ) {
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ if ( get( xbuf, ix ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = some4d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/4d_blocked.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/4d_blocked.js
new file mode 100644
index 000000000000..4704bb66e32c
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/4d_blocked.js
@@ -0,0 +1,198 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/nullary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/nullary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy via loop blocking.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 12, 4, 4, 1 ];
+*
+* // Define the index offset:
+* var ox = 1;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = blockedsome4d( x, 4 );
+* // returns true
+*/
+function blockedsome4d( x, n ) {
+ var bsize;
+ var count;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var ox1;
+ var ox2;
+ var ox3;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var sx;
+ var ox;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var j0;
+ var j1;
+ var j2;
+ var j3;
+ var o;
+
+ // Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( x.shape, x.strides );
+ sh = o.sh;
+ sx = o.sx;
+
+ // Determine the block size:
+ bsize = blockSize( x.dtype );
+
+ // Set a pointer to the first indexed element:
+ ox = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache the offset increment for the innermost loop:
+ dx0 = sx[0];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over blocks...
+ for ( j3 = sh[3]; j3 > 0; ) {
+ if ( j3 < bsize ) {
+ s3 = j3;
+ j3 = 0;
+ } else {
+ s3 = bsize;
+ j3 -= bsize;
+ }
+ ox3 = ox + ( j3*sx[3] );
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ dx3 = sx[3] - ( s2*sx[2] );
+ ox2 = ox3 + ( j2*sx[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dx2 = sx[2] - ( s1*sx[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute the index offset for the first input ndarray element in the current block:
+ ix = ox1 + ( j0*sx[0] );
+
+ // Compute the loop offset increment:
+ dx1 = sx[1] - ( s0*sx[0] );
+
+ // Iterate over the ndarray dimensions...
+ for ( i3 = 0; i3 < s3; i3++ ) {
+ for ( i2 = 0; i2 < s2; i2++ ) {
+ for ( i1 = 0; i1 < s1; i1++ ) {
+ for ( i0 = 0; i0 < s0; i0++ ) {
+ if ( xbuf[ ix ] ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ }
+ }
+ }
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = blockedsome4d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/4d_blocked_accessors.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/4d_blocked_accessors.js
new file mode 100644
index 000000000000..ca728c40ffad
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/4d_blocked_accessors.js
@@ -0,0 +1,205 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/nullary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/nullary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy via loop blocking.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} x.accessors - data buffer accessors
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+* var accessors = require( '@stdlib/array/base/accessors' );
+*
+* // Create a data buffer:
+* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 4, 4, 2, 1 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'generic',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': accessors( xbuf ).accessors
+* };
+*
+* // Test elements:
+* var out = blockedsome4d( x, 4 );
+* // returns true
+*/
+function blockedsome4d( x, n ) {
+ var bsize;
+ var count;
+ var xbuf;
+ var get;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var ox1;
+ var ox2;
+ var ox3;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var sx;
+ var ox;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var j0;
+ var j1;
+ var j2;
+ var j3;
+ var o;
+
+ // Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( x.shape, x.strides );
+ sh = o.sh;
+ sx = o.sx;
+
+ // Determine the block size:
+ bsize = blockSize( x.dtype );
+
+ // Set a pointer to the first indexed element:
+ ox = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache the offset increment for the innermost loop:
+ dx0 = sx[0];
+
+ // Cache accessor:
+ get = x.accessors[0];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over blocks...
+ for ( j3 = sh[3]; j3 > 0; ) {
+ if ( j3 < bsize ) {
+ s3 = j3;
+ j3 = 0;
+ } else {
+ s3 = bsize;
+ j3 -= bsize;
+ }
+ ox3 = ox + ( j3*sx[3] );
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ dx3 = sx[3] - ( s2*sx[2] );
+ ox2 = ox3 + ( j2*sx[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dx2 = sx[2] - ( s1*sx[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute the index offset for the first input ndarray element in the current block:
+ ix = ox1 + ( j0*sx[0] );
+
+ // Compute the loop offset increment:
+ dx1 = sx[1] - ( s0*sx[0] );
+
+ // Iterate over the ndarray dimensions...
+ for ( i3 = 0; i3 < s3; i3++ ) {
+ for ( i2 = 0; i2 < s2; i2++ ) {
+ for ( i1 = 0; i1 < s1; i1++ ) {
+ for ( i0 = 0; i0 < s0; i0++ ) {
+ if ( get( xbuf, ix ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ }
+ }
+ }
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = blockedsome4d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/4d_blocked_complex.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/4d_blocked_complex.js
new file mode 100644
index 000000000000..dec6e6ba8fab
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/4d_blocked_complex.js
@@ -0,0 +1,198 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/nullary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/nullary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements of a reinterpreted complex number ndarray are truthy via loop blocking.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 8, 8, 4, 2 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'complex128',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = blockedsome4d( x, 4 );
+* // returns true
+*/
+function blockedsome4d( x, n ) {
+ var bsize;
+ var count;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var ox1;
+ var ox2;
+ var ox3;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var sx;
+ var ox;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var j0;
+ var j1;
+ var j2;
+ var j3;
+ var o;
+
+ // Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( x.shape, x.strides );
+ sh = o.sh;
+ sx = o.sx;
+
+ // Determine the block size:
+ bsize = blockSize( x.dtype );
+
+ // Set a pointer to the first indexed element:
+ ox = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache the offset increment for the innermost loop:
+ dx0 = sx[0];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over blocks...
+ for ( j3 = sh[3]; j3 > 0; ) {
+ if ( j3 < bsize ) {
+ s3 = j3;
+ j3 = 0;
+ } else {
+ s3 = bsize;
+ j3 -= bsize;
+ }
+ ox3 = ox + ( j3*sx[3] );
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ dx3 = sx[3] - ( s2*sx[2] );
+ ox2 = ox3 + ( j2*sx[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dx2 = sx[2] - ( s1*sx[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute the index offset for the first input ndarray element in the current block:
+ ix = ox1 + ( j0*sx[0] );
+
+ // Compute the loop offset increment:
+ dx1 = sx[1] - ( s0*sx[0] );
+
+ // Iterate over the ndarray dimensions...
+ for ( i3 = 0; i3 < s3; i3++ ) {
+ for ( i2 = 0; i2 < s2; i2++ ) {
+ for ( i1 = 0; i1 < s1; i1++ ) {
+ for ( i0 = 0; i0 < s0; i0++ ) {
+ if ( ( xbuf[ ix ] || xbuf[ ix+1 ] ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ }
+ }
+ }
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = blockedsome4d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/4d_complex.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/4d_complex.js
new file mode 100644
index 000000000000..4b9aca4c1560
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/4d_complex.js
@@ -0,0 +1,152 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth */
+
+'use strict';
+
+// MODULES //
+
+var strides2order = require( '@stdlib/ndarray/base/strides2order' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements of a reinterpreted complex number ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 8, 8, 4, 2 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'complex128',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = some4d( x, 4 );
+* // returns true
+*/
+function some4d( x, n ) {
+ var count;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var S3;
+ var sx;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+
+ // Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...
+ sh = x.shape;
+ sx = x.strides;
+ if ( strides2order( sx ) === 1 ) {
+ // For row-major ndarrays, the last dimensions have the fastest changing indices...
+ S0 = sh[ 3 ];
+ S1 = sh[ 2 ];
+ S2 = sh[ 1 ];
+ S3 = sh[ 0 ];
+ dx0 = sx[ 3 ]; // offset increment for innermost loop
+ dx1 = sx[ 2 ] - ( S0*sx[3] );
+ dx2 = sx[ 1 ] - ( S1*sx[2] );
+ dx3 = sx[ 0 ] - ( S2*sx[1] ); // offset increment for outermost loop
+ } else { // order === 'column-major'
+ // For column-major ndarrays, the first dimensions have the fastest changing indices...
+ S0 = sh[ 0 ];
+ S1 = sh[ 1 ];
+ S2 = sh[ 2 ];
+ S3 = sh[ 3 ];
+ dx0 = sx[ 0 ]; // offset increment for innermost loop
+ dx1 = sx[ 1 ] - ( S0*sx[0] );
+ dx2 = sx[ 2 ] - ( S1*sx[1] );
+ dx3 = sx[ 3 ] - ( S2*sx[2] ); // offset increment for outermost loop
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over the ndarray dimensions...
+ for ( i3 = 0; i3 < S3; i3++ ) {
+ for ( i2 = 0; i2 < S2; i2++ ) {
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ if ( ( xbuf[ ix ] || xbuf[ ix+1 ] ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = some4d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/5d.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/5d.js
new file mode 100644
index 000000000000..46c478a120d0
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/5d.js
@@ -0,0 +1,162 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth */
+
+'use strict';
+
+// MODULES //
+
+var strides2order = require( '@stdlib/ndarray/base/strides2order' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 12, 12, 4, 4, 1 ];
+*
+* // Define the index offset:
+* var ox = 1;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = some5d( x, 4 );
+* // returns true
+*/
+function some5d( x, n ) {
+ var count;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var S3;
+ var S4;
+ var sx;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+
+ // Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...
+ sh = x.shape;
+ sx = x.strides;
+ if ( strides2order( sx ) === 1 ) {
+ // For row-major ndarrays, the last dimensions have the fastest changing indices...
+ S0 = sh[ 4 ];
+ S1 = sh[ 3 ];
+ S2 = sh[ 2 ];
+ S3 = sh[ 1 ];
+ S4 = sh[ 0 ];
+ dx0 = sx[ 4 ]; // offset increment for innermost loop
+ dx1 = sx[ 3 ] - ( S0*sx[4] );
+ dx2 = sx[ 2 ] - ( S1*sx[3] );
+ dx3 = sx[ 1 ] - ( S2*sx[2] );
+ dx4 = sx[ 0 ] - ( S3*sx[1] ); // offset increment for outermost loop
+ } else { // order === 'column-major'
+ // For column-major ndarrays, the first dimensions have the fastest changing indices...
+ S0 = sh[ 0 ];
+ S1 = sh[ 1 ];
+ S2 = sh[ 2 ];
+ S3 = sh[ 3 ];
+ S4 = sh[ 4 ];
+ dx0 = sx[ 0 ]; // offset increment for innermost loop
+ dx1 = sx[ 1 ] - ( S0*sx[0] );
+ dx2 = sx[ 2 ] - ( S1*sx[1] );
+ dx3 = sx[ 3 ] - ( S2*sx[2] );
+ dx4 = sx[ 4 ] - ( S3*sx[3] ); // offset increment for outermost loop
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over the ndarray dimensions...
+ for ( i4 = 0; i4 < S4; i4++ ) {
+ for ( i3 = 0; i3 < S3; i3++ ) {
+ for ( i2 = 0; i2 < S2; i2++ ) {
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ if ( xbuf[ ix ] ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = some5d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/5d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/5d_accessors.js
new file mode 100644
index 000000000000..4cc8f3642bbd
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/5d_accessors.js
@@ -0,0 +1,169 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth */
+
+'use strict';
+
+// MODULES //
+
+var strides2order = require( '@stdlib/ndarray/base/strides2order' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} x.accessors - data buffer accessors
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+* var accessors = require( '@stdlib/array/base/accessors' );
+*
+* // Create a data buffer:
+* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 4, 4, 4, 2, 1 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'generic',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': accessors( xbuf ).accessors
+* };
+*
+* // Test elements:
+* var out = some5d( x, 4 );
+* // returns true
+*/
+function some5d( x, n ) {
+ var count;
+ var xbuf;
+ var get;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var S3;
+ var S4;
+ var sx;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+
+ // Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...
+ sh = x.shape;
+ sx = x.strides;
+ if ( strides2order( sx ) === 1 ) {
+ // For row-major ndarrays, the last dimensions have the fastest changing indices...
+ S0 = sh[ 4 ];
+ S1 = sh[ 3 ];
+ S2 = sh[ 2 ];
+ S3 = sh[ 1 ];
+ S4 = sh[ 0 ];
+ dx0 = sx[ 4 ]; // offset increment for innermost loop
+ dx1 = sx[ 3 ] - ( S0*sx[4] );
+ dx2 = sx[ 2 ] - ( S1*sx[3] );
+ dx3 = sx[ 1 ] - ( S2*sx[2] );
+ dx4 = sx[ 0 ] - ( S3*sx[1] ); // offset increment for outermost loop
+ } else { // order === 'column-major'
+ // For column-major ndarrays, the first dimensions have the fastest changing indices...
+ S0 = sh[ 0 ];
+ S1 = sh[ 1 ];
+ S2 = sh[ 2 ];
+ S3 = sh[ 3 ];
+ S4 = sh[ 4 ];
+ dx0 = sx[ 0 ]; // offset increment for innermost loop
+ dx1 = sx[ 1 ] - ( S0*sx[0] );
+ dx2 = sx[ 2 ] - ( S1*sx[1] );
+ dx3 = sx[ 3 ] - ( S2*sx[2] );
+ dx4 = sx[ 4 ] - ( S3*sx[3] ); // offset increment for outermost loop
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache accessor:
+ get = x.accessors[ 0 ];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over the ndarray dimensions...
+ for ( i4 = 0; i4 < S4; i4++ ) {
+ for ( i3 = 0; i3 < S3; i3++ ) {
+ for ( i2 = 0; i2 < S2; i2++ ) {
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ if ( get( xbuf, ix ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = some5d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/5d_blocked.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/5d_blocked.js
new file mode 100644
index 000000000000..006d4478acd1
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/5d_blocked.js
@@ -0,0 +1,217 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/nullary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/nullary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy via loop blocking.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 12, 12, 4, 4, 1 ];
+*
+* // Define the index offset:
+* var ox = 1;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = blockedsome5d( x, 4 );
+* // returns true
+*/
+function blockedsome5d( x, n ) {
+ var bsize;
+ var count;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var ox1;
+ var ox2;
+ var ox3;
+ var ox4;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var s4;
+ var sx;
+ var ox;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var j0;
+ var j1;
+ var j2;
+ var j3;
+ var j4;
+ var o;
+
+ // Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( x.shape, x.strides );
+ sh = o.sh;
+ sx = o.sx;
+
+ // Determine the block size:
+ bsize = blockSize( x.dtype );
+
+ // Set a pointer to the first indexed element:
+ ox = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache the offset increment for the innermost loop:
+ dx0 = sx[0];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over blocks...
+ for ( j4 = sh[4]; j4 > 0; ) {
+ if ( j4 < bsize ) {
+ s4 = j4;
+ j4 = 0;
+ } else {
+ s4 = bsize;
+ j4 -= bsize;
+ }
+ ox4 = ox + ( j4*sx[4] );
+ for ( j3 = sh[3]; j3 > 0; ) {
+ if ( j3 < bsize ) {
+ s3 = j3;
+ j3 = 0;
+ } else {
+ s3 = bsize;
+ j3 -= bsize;
+ }
+ dx4 = sx[4] - ( s3*sx[3] );
+ ox3 = ox4 + ( j3*sx[3] );
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ dx3 = sx[3] - ( s2*sx[2] );
+ ox2 = ox3 + ( j2*sx[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dx2 = sx[2] - ( s1*sx[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute the index offset for the first input ndarray element in the current block:
+ ix = ox1 + ( j0*sx[0] );
+
+ // Compute the loop offset increment:
+ dx1 = sx[1] - ( s0*sx[0] );
+
+ // Iterate over the ndarray dimensions...
+ for ( i4 = 0; i4 < s4; i4++ ) {
+ for ( i3 = 0; i3 < s3; i3++ ) {
+ for ( i2 = 0; i2 < s2; i2++ ) {
+ for ( i1 = 0; i1 < s1; i1++ ) {
+ for ( i0 = 0; i0 < s0; i0++ ) {
+ if ( xbuf[ ix ] ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ }
+ }
+ }
+ }
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = blockedsome5d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/5d_blocked_accessors.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/5d_blocked_accessors.js
new file mode 100644
index 000000000000..a102f0716878
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/5d_blocked_accessors.js
@@ -0,0 +1,224 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/nullary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/nullary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy via loop blocking.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} x.accessors - data buffer accessors
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+* var accessors = require( '@stdlib/array/base/accessors' );
+*
+* // Create a data buffer:
+* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 4, 4, 4, 2, 1 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'generic',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': accessors( xbuf ).accessors
+* };
+*
+* // Test elements:
+* var out = blockedsome5d( x, 4 );
+* // returns true
+*/
+function blockedsome5d( x, n ) {
+ var count;
+ var bsize;
+ var xbuf;
+ var get;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var ox1;
+ var ox2;
+ var ox3;
+ var ox4;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var s4;
+ var sx;
+ var ox;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var j0;
+ var j1;
+ var j2;
+ var j3;
+ var j4;
+ var o;
+
+ // Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( x.shape, x.strides );
+ sh = o.sh;
+ sx = o.sx;
+
+ // Determine the block size:
+ bsize = blockSize( x.dtype );
+
+ // Set a pointer to the first indexed element:
+ ox = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache the offset increment for the innermost loop:
+ dx0 = sx[0];
+
+ // Cache accessor:
+ get = x.accessors[0];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over blocks...
+ for ( j4 = sh[4]; j4 > 0; ) {
+ if ( j4 < bsize ) {
+ s4 = j4;
+ j4 = 0;
+ } else {
+ s4 = bsize;
+ j4 -= bsize;
+ }
+ ox4 = ox + ( j4*sx[4] );
+ for ( j3 = sh[3]; j3 > 0; ) {
+ if ( j3 < bsize ) {
+ s3 = j3;
+ j3 = 0;
+ } else {
+ s3 = bsize;
+ j3 -= bsize;
+ }
+ dx4 = sx[4] - ( s3*sx[3] );
+ ox3 = ox4 + ( j3*sx[3] );
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ dx3 = sx[3] - ( s2*sx[2] );
+ ox2 = ox3 + ( j2*sx[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dx2 = sx[2] - ( s1*sx[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute the index offset for the first input ndarray element in the current block:
+ ix = ox1 + ( j0*sx[0] );
+
+ // Compute the loop offset increment:
+ dx1 = sx[1] - ( s0*sx[0] );
+
+ // Iterate over the ndarray dimensions...
+ for ( i4 = 0; i4 < s4; i4++ ) {
+ for ( i3 = 0; i3 < s3; i3++ ) {
+ for ( i2 = 0; i2 < s2; i2++ ) {
+ for ( i1 = 0; i1 < s1; i1++ ) {
+ for ( i0 = 0; i0 < s0; i0++ ) {
+ if ( get( xbuf, ix ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ }
+ }
+ }
+ }
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = blockedsome5d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/5d_blocked_complex.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/5d_blocked_complex.js
new file mode 100644
index 000000000000..ec599defbc66
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/5d_blocked_complex.js
@@ -0,0 +1,217 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth, max-len */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/nullary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/nullary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements of a reinterpreted complex number ndarray are truthy via loop blocking.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 8, 8, 8, 4, 2 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'complex128',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = blockedsome5d( x, 4 );
+* // returns true
+*/
+function blockedsome5d( x, n ) {
+ var bsize;
+ var count;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var ox1;
+ var ox2;
+ var ox3;
+ var ox4;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var s4;
+ var sx;
+ var ox;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var j0;
+ var j1;
+ var j2;
+ var j3;
+ var j4;
+ var o;
+
+ // Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( x.shape, x.strides );
+ sh = o.sh;
+ sx = o.sx;
+
+ // Determine the block size:
+ bsize = blockSize( x.dtype );
+
+ // Set a pointer to the first indexed element:
+ ox = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache the offset increment for the innermost loop:
+ dx0 = sx[0];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over blocks...
+ for ( j4 = sh[4]; j4 > 0; ) {
+ if ( j4 < bsize ) {
+ s4 = j4;
+ j4 = 0;
+ } else {
+ s4 = bsize;
+ j4 -= bsize;
+ }
+ ox4 = ox + ( j4*sx[4] );
+ for ( j3 = sh[3]; j3 > 0; ) {
+ if ( j3 < bsize ) {
+ s3 = j3;
+ j3 = 0;
+ } else {
+ s3 = bsize;
+ j3 -= bsize;
+ }
+ dx4 = sx[4] - ( s3*sx[3] );
+ ox3 = ox4 + ( j3*sx[3] );
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ dx3 = sx[3] - ( s2*sx[2] );
+ ox2 = ox3 + ( j2*sx[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dx2 = sx[2] - ( s1*sx[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute the index offset for the first input ndarray element in the current block:
+ ix = ox1 + ( j0*sx[0] );
+
+ // Compute the loop offset increment:
+ dx1 = sx[1] - ( s0*sx[0] );
+
+ // Iterate over the ndarray dimensions...
+ for ( i4 = 0; i4 < s4; i4++ ) {
+ for ( i3 = 0; i3 < s3; i3++ ) {
+ for ( i2 = 0; i2 < s2; i2++ ) {
+ for ( i1 = 0; i1 < s1; i1++ ) {
+ for ( i0 = 0; i0 < s0; i0++ ) {
+ if ( ( xbuf[ ix ] || xbuf[ ix+1 ] ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ }
+ }
+ }
+ }
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = blockedsome5d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/5d_complex.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/5d_complex.js
new file mode 100644
index 000000000000..96919a12e9f3
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/5d_complex.js
@@ -0,0 +1,162 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth */
+
+'use strict';
+
+// MODULES //
+
+var strides2order = require( '@stdlib/ndarray/base/strides2order' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements of a reinterpreted complex number ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 8, 8, 8, 4, 2 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'complex128',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = some5d( x, 4 );
+* // returns true
+*/
+function some5d( x, n ) {
+ var count;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var S3;
+ var S4;
+ var sx;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+
+ // Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...
+ sh = x.shape;
+ sx = x.strides;
+ if ( strides2order( sx ) === 1 ) {
+ // For row-major ndarrays, the last dimensions have the fastest changing indices...
+ S0 = sh[ 4 ];
+ S1 = sh[ 3 ];
+ S2 = sh[ 2 ];
+ S3 = sh[ 1 ];
+ S4 = sh[ 0 ];
+ dx0 = sx[ 4 ]; // offset increment for innermost loop
+ dx1 = sx[ 3 ] - ( S0*sx[4] );
+ dx2 = sx[ 2 ] - ( S1*sx[3] );
+ dx3 = sx[ 1 ] - ( S2*sx[2] );
+ dx4 = sx[ 0 ] - ( S3*sx[1] ); // offset increment for outermost loop
+ } else { // order === 'column-major'
+ // For column-major ndarrays, the first dimensions have the fastest changing indices...
+ S0 = sh[ 0 ];
+ S1 = sh[ 1 ];
+ S2 = sh[ 2 ];
+ S3 = sh[ 3 ];
+ S4 = sh[ 4 ];
+ dx0 = sx[ 0 ]; // offset increment for innermost loop
+ dx1 = sx[ 1 ] - ( S0*sx[0] );
+ dx2 = sx[ 2 ] - ( S1*sx[1] );
+ dx3 = sx[ 3 ] - ( S2*sx[2] );
+ dx4 = sx[ 4 ] - ( S3*sx[3] ); // offset increment for outermost loop
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over the ndarray dimensions...
+ for ( i4 = 0; i4 < S4; i4++ ) {
+ for ( i3 = 0; i3 < S3; i3++ ) {
+ for ( i2 = 0; i2 < S2; i2++ ) {
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ if ( ( xbuf[ ix ] || xbuf[ ix+1 ] ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = some5d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/6d.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/6d.js
new file mode 100644
index 000000000000..3186d580cb00
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/6d.js
@@ -0,0 +1,172 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth */
+
+'use strict';
+
+// MODULES //
+
+var strides2order = require( '@stdlib/ndarray/base/strides2order' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 1, 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 12, 12, 12, 4, 4, 1 ];
+*
+* // Define the index offset:
+* var ox = 1;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = some6d( x, 4 );
+* // returns true
+*/
+function some6d( x, n ) {
+ var count;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var S3;
+ var S4;
+ var S5;
+ var sx;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+
+ // Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...
+ sh = x.shape;
+ sx = x.strides;
+ if ( strides2order( sx ) === 1 ) {
+ // For row-major ndarrays, the last dimensions have the fastest changing indices...
+ S0 = sh[ 5 ];
+ S1 = sh[ 4 ];
+ S2 = sh[ 3 ];
+ S3 = sh[ 2 ];
+ S4 = sh[ 1 ];
+ S5 = sh[ 0 ];
+ dx0 = sx[ 5 ]; // offset increment for innermost loop
+ dx1 = sx[ 4 ] - ( S0*sx[5] );
+ dx2 = sx[ 3 ] - ( S1*sx[4] );
+ dx3 = sx[ 2 ] - ( S2*sx[3] );
+ dx4 = sx[ 1 ] - ( S3*sx[2] );
+ dx5 = sx[ 0 ] - ( S4*sx[1] ); // offset increment for outermost loop
+ } else { // order === 'column-major'
+ // For column-major ndarrays, the first dimensions have the fastest changing indices...
+ S0 = sh[ 0 ];
+ S1 = sh[ 1 ];
+ S2 = sh[ 2 ];
+ S3 = sh[ 3 ];
+ S4 = sh[ 4 ];
+ S5 = sh[ 5 ];
+ dx0 = sx[ 0 ]; // offset increment for innermost loop
+ dx1 = sx[ 1 ] - ( S0*sx[0] );
+ dx2 = sx[ 2 ] - ( S1*sx[1] );
+ dx3 = sx[ 3 ] - ( S2*sx[2] );
+ dx4 = sx[ 4 ] - ( S3*sx[3] );
+ dx5 = sx[ 5 ] - ( S4*sx[4] ); // offset increment for outermost loop
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over the ndarray dimensions...
+ for ( i5 = 0; i5 < S5; i5++ ) {
+ for ( i4 = 0; i4 < S4; i4++ ) {
+ for ( i3 = 0; i3 < S3; i3++ ) {
+ for ( i2 = 0; i2 < S2; i2++ ) {
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ if ( xbuf[ ix ] ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = some6d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/6d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/6d_accessors.js
new file mode 100644
index 000000000000..48dcefcfbe37
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/6d_accessors.js
@@ -0,0 +1,179 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth */
+
+'use strict';
+
+// MODULES //
+
+var strides2order = require( '@stdlib/ndarray/base/strides2order' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} x.accessors - data buffer accessors
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+* var accessors = require( '@stdlib/array/base/accessors' );
+*
+* // Create a data buffer:
+* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 4, 4, 4, 4, 2, 1 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'generic',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': accessors( xbuf ).accessors
+* };
+*
+* // Test elements:
+* var out = some6d( x, 4 );
+* // returns true
+*/
+function some6d( x, n ) {
+ var count;
+ var xbuf;
+ var get;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var S3;
+ var S4;
+ var S5;
+ var sx;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+
+ // Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...
+ sh = x.shape;
+ sx = x.strides;
+ if ( strides2order( sx ) === 1 ) {
+ // For row-major ndarrays, the last dimensions have the fastest changing indices...
+ S0 = sh[ 5 ];
+ S1 = sh[ 4 ];
+ S2 = sh[ 3 ];
+ S3 = sh[ 2 ];
+ S4 = sh[ 1 ];
+ S5 = sh[ 0 ];
+ dx0 = sx[ 5 ]; // offset increment for innermost loop
+ dx1 = sx[ 4 ] - ( S0*sx[5] );
+ dx2 = sx[ 3 ] - ( S1*sx[4] );
+ dx3 = sx[ 2 ] - ( S2*sx[3] );
+ dx4 = sx[ 1 ] - ( S3*sx[2] );
+ dx5 = sx[ 0 ] - ( S4*sx[1] ); // offset increment for outermost loop
+ } else { // order === 'column-major'
+ // For column-major ndarrays, the first dimensions have the fastest changing indices...
+ S0 = sh[ 0 ];
+ S1 = sh[ 1 ];
+ S2 = sh[ 2 ];
+ S3 = sh[ 3 ];
+ S4 = sh[ 4 ];
+ S5 = sh[ 5 ];
+ dx0 = sx[ 0 ]; // offset increment for innermost loop
+ dx1 = sx[ 1 ] - ( S0*sx[0] );
+ dx2 = sx[ 2 ] - ( S1*sx[1] );
+ dx3 = sx[ 3 ] - ( S2*sx[2] );
+ dx4 = sx[ 4 ] - ( S3*sx[3] );
+ dx5 = sx[ 5 ] - ( S4*sx[4] ); // offset increment for outermost loop
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache accessor:
+ get = x.accessors[ 0 ];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over the ndarray dimensions...
+ for ( i5 = 0; i5 < S5; i5++ ) {
+ for ( i4 = 0; i4 < S4; i4++ ) {
+ for ( i3 = 0; i3 < S3; i3++ ) {
+ for ( i2 = 0; i2 < S2; i2++ ) {
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ if ( get( xbuf, ix ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = some6d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/6d_blocked.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/6d_blocked.js
new file mode 100644
index 000000000000..d033f8f229b4
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/6d_blocked.js
@@ -0,0 +1,236 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/nullary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/nullary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy via loop blocking.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 1, 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 12, 12, 12, 4, 4, 1 ];
+*
+* // Define the index offset:
+* var ox = 1;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = blockedsome6d( x, 4 );
+* // returns true
+*/
+function blockedsome6d( x, n ) { // eslint-disable-line max-statements
+ var count;
+ var bsize;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var ox1;
+ var ox2;
+ var ox3;
+ var ox4;
+ var ox5;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var s4;
+ var s5;
+ var sx;
+ var ox;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var j0;
+ var j1;
+ var j2;
+ var j3;
+ var j4;
+ var j5;
+ var o;
+
+ // Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( x.shape, x.strides );
+ sh = o.sh;
+ sx = o.sx;
+
+ // Determine the block size:
+ bsize = blockSize( x.dtype );
+
+ // Set a pointer to the first indexed element:
+ ox = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache the offset increment for the innermost loop:
+ dx0 = sx[0];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over blocks...
+ for ( j5 = sh[5]; j5 > 0; ) {
+ if ( j5 < bsize ) {
+ s5 = j5;
+ j5 = 0;
+ } else {
+ s5 = bsize;
+ j5 -= bsize;
+ }
+ ox5 = ox + ( j5*sx[5] );
+ for ( j4 = sh[4]; j4 > 0; ) {
+ if ( j4 < bsize ) {
+ s4 = j4;
+ j4 = 0;
+ } else {
+ s4 = bsize;
+ j4 -= bsize;
+ }
+ dx5 = sx[5] - ( s4*sx[4] );
+ ox4 = ox5 + ( j4*sx[4] );
+ for ( j3 = sh[3]; j3 > 0; ) {
+ if ( j3 < bsize ) {
+ s3 = j3;
+ j3 = 0;
+ } else {
+ s3 = bsize;
+ j3 -= bsize;
+ }
+ dx4 = sx[4] - ( s3*sx[3] );
+ ox3 = ox4 + ( j3*sx[3] );
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ dx3 = sx[3] - ( s2*sx[2] );
+ ox2 = ox3 + ( j2*sx[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dx2 = sx[2] - ( s1*sx[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute the index offset for the first input ndarray element in the current block:
+ ix = ox1 + ( j0*sx[0] );
+
+ // Compute the loop offset increment:
+ dx1 = sx[1] - ( s0*sx[0] );
+
+ // Iterate over the ndarray dimensions...
+ for ( i5 = 0; i5 < s5; i5++ ) {
+ for ( i4 = 0; i4 < s4; i4++ ) {
+ for ( i3 = 0; i3 < s3; i3++ ) {
+ for ( i2 = 0; i2 < s2; i2++ ) {
+ for ( i1 = 0; i1 < s1; i1++ ) {
+ for ( i0 = 0; i0 < s0; i0++ ) {
+ if ( xbuf[ ix ] ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = blockedsome6d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/6d_blocked_accessors.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/6d_blocked_accessors.js
new file mode 100644
index 000000000000..347a64e219bd
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/6d_blocked_accessors.js
@@ -0,0 +1,243 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/nullary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/nullary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy via loop blocking.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} x.accessors - data buffer accessors
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+* var accessors = require( '@stdlib/array/base/accessors' );
+*
+* // Create a data buffer:
+* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 4, 4, 4, 4, 2, 1 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'generic',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': accessors( xbuf ).accessors
+* };
+*
+* // Test elements:
+* var out = blockedsome6d( x, 4 );
+* // returns true
+*/
+function blockedsome6d( x, n ) { // eslint-disable-line max-statements
+ var count;
+ var bsize;
+ var xbuf;
+ var get;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var ox1;
+ var ox2;
+ var ox3;
+ var ox4;
+ var ox5;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var s4;
+ var s5;
+ var sx;
+ var ox;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var j0;
+ var j1;
+ var j2;
+ var j3;
+ var j4;
+ var j5;
+ var o;
+
+ // Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( x.shape, x.strides );
+ sh = o.sh;
+ sx = o.sx;
+
+ // Determine the block size:
+ bsize = blockSize( x.dtype );
+
+ // Set a pointer to the first indexed element:
+ ox = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache the offset increment for the innermost loop:
+ dx0 = sx[0];
+
+ // Cache accessor:
+ get = x.accessors[0];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over blocks...
+ for ( j5 = sh[5]; j5 > 0; ) {
+ if ( j5 < bsize ) {
+ s5 = j5;
+ j5 = 0;
+ } else {
+ s5 = bsize;
+ j5 -= bsize;
+ }
+ ox5 = ox + ( j5*sx[5] );
+ for ( j4 = sh[4]; j4 > 0; ) {
+ if ( j4 < bsize ) {
+ s4 = j4;
+ j4 = 0;
+ } else {
+ s4 = bsize;
+ j4 -= bsize;
+ }
+ dx5 = sx[5] - ( s4*sx[4] );
+ ox4 = ox5 + ( j4*sx[4] );
+ for ( j3 = sh[3]; j3 > 0; ) {
+ if ( j3 < bsize ) {
+ s3 = j3;
+ j3 = 0;
+ } else {
+ s3 = bsize;
+ j3 -= bsize;
+ }
+ dx4 = sx[4] - ( s3*sx[3] );
+ ox3 = ox4 + ( j3*sx[3] );
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ dx3 = sx[3] - ( s2*sx[2] );
+ ox2 = ox3 + ( j2*sx[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dx2 = sx[2] - ( s1*sx[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute the index offset for the first input ndarray element in the current block:
+ ix = ox1 + ( j0*sx[0] );
+
+ // Compute the loop offset increment:
+ dx1 = sx[1] - ( s0*sx[0] );
+
+ // Iterate over the ndarray dimensions...
+ for ( i5 = 0; i5 < s5; i5++ ) {
+ for ( i4 = 0; i4 < s4; i4++ ) {
+ for ( i3 = 0; i3 < s3; i3++ ) {
+ for ( i2 = 0; i2 < s2; i2++ ) {
+ for ( i1 = 0; i1 < s1; i1++ ) {
+ for ( i0 = 0; i0 < s0; i0++ ) {
+ if ( get( xbuf, ix ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = blockedsome6d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/6d_blocked_complex.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/6d_blocked_complex.js
new file mode 100644
index 000000000000..16b74cc0c7e7
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/6d_blocked_complex.js
@@ -0,0 +1,236 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth, max-len */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/nullary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/nullary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements of a reinterpreted complex number ndarray are truthy via loop blocking.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 8, 8, 8, 8, 4, 2 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'complex128',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = blockedsome6d( x, 4 );
+* // returns true
+*/
+function blockedsome6d( x, n ) { // eslint-disable-line max-statements
+ var count;
+ var bsize;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var ox1;
+ var ox2;
+ var ox3;
+ var ox4;
+ var ox5;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var s4;
+ var s5;
+ var sx;
+ var ox;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var j0;
+ var j1;
+ var j2;
+ var j3;
+ var j4;
+ var j5;
+ var o;
+
+ // Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( x.shape, x.strides );
+ sh = o.sh;
+ sx = o.sx;
+
+ // Determine the block size:
+ bsize = blockSize( x.dtype );
+
+ // Set a pointer to the first indexed element:
+ ox = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache the offset increment for the innermost loop:
+ dx0 = sx[0];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over blocks...
+ for ( j5 = sh[5]; j5 > 0; ) {
+ if ( j5 < bsize ) {
+ s5 = j5;
+ j5 = 0;
+ } else {
+ s5 = bsize;
+ j5 -= bsize;
+ }
+ ox5 = ox + ( j5*sx[5] );
+ for ( j4 = sh[4]; j4 > 0; ) {
+ if ( j4 < bsize ) {
+ s4 = j4;
+ j4 = 0;
+ } else {
+ s4 = bsize;
+ j4 -= bsize;
+ }
+ dx5 = sx[5] - ( s4*sx[4] );
+ ox4 = ox5 + ( j4*sx[4] );
+ for ( j3 = sh[3]; j3 > 0; ) {
+ if ( j3 < bsize ) {
+ s3 = j3;
+ j3 = 0;
+ } else {
+ s3 = bsize;
+ j3 -= bsize;
+ }
+ dx4 = sx[4] - ( s3*sx[3] );
+ ox3 = ox4 + ( j3*sx[3] );
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ dx3 = sx[3] - ( s2*sx[2] );
+ ox2 = ox3 + ( j2*sx[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dx2 = sx[2] - ( s1*sx[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute the index offset for the first input ndarray element in the current block:
+ ix = ox1 + ( j0*sx[0] );
+
+ // Compute the loop offset increment:
+ dx1 = sx[1] - ( s0*sx[0] );
+
+ // Iterate over the ndarray dimensions...
+ for ( i5 = 0; i5 < s5; i5++ ) {
+ for ( i4 = 0; i4 < s4; i4++ ) {
+ for ( i3 = 0; i3 < s3; i3++ ) {
+ for ( i2 = 0; i2 < s2; i2++ ) {
+ for ( i1 = 0; i1 < s1; i1++ ) {
+ for ( i0 = 0; i0 < s0; i0++ ) {
+ if ( ( xbuf[ ix ] || xbuf[ ix+1 ] ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = blockedsome6d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/6d_complex.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/6d_complex.js
new file mode 100644
index 000000000000..e75d0d166791
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/6d_complex.js
@@ -0,0 +1,172 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth */
+
+'use strict';
+
+// MODULES //
+
+var strides2order = require( '@stdlib/ndarray/base/strides2order' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements of a reinterpreted complex number ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 8, 8, 8, 8, 4, 2 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'complex128',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = some6d( x, 4 );
+* // returns true
+*/
+function some6d( x, n ) {
+ var count;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var S3;
+ var S4;
+ var S5;
+ var sx;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+
+ // Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...
+ sh = x.shape;
+ sx = x.strides;
+ if ( strides2order( sx ) === 1 ) {
+ // For row-major ndarrays, the last dimensions have the fastest changing indices...
+ S0 = sh[ 5 ];
+ S1 = sh[ 4 ];
+ S2 = sh[ 3 ];
+ S3 = sh[ 2 ];
+ S4 = sh[ 1 ];
+ S5 = sh[ 0 ];
+ dx0 = sx[ 5 ]; // offset increment for innermost loop
+ dx1 = sx[ 4 ] - ( S0*sx[5] );
+ dx2 = sx[ 3 ] - ( S1*sx[4] );
+ dx3 = sx[ 2 ] - ( S2*sx[3] );
+ dx4 = sx[ 1 ] - ( S3*sx[2] );
+ dx5 = sx[ 0 ] - ( S4*sx[1] ); // offset increment for outermost loop
+ } else { // order === 'column-major'
+ // For column-major ndarrays, the first dimensions have the fastest changing indices...
+ S0 = sh[ 0 ];
+ S1 = sh[ 1 ];
+ S2 = sh[ 2 ];
+ S3 = sh[ 3 ];
+ S4 = sh[ 4 ];
+ S5 = sh[ 5 ];
+ dx0 = sx[ 0 ]; // offset increment for innermost loop
+ dx1 = sx[ 1 ] - ( S0*sx[0] );
+ dx2 = sx[ 2 ] - ( S1*sx[1] );
+ dx3 = sx[ 3 ] - ( S2*sx[2] );
+ dx4 = sx[ 4 ] - ( S3*sx[3] );
+ dx5 = sx[ 5 ] - ( S4*sx[4] ); // offset increment for outermost loop
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over the ndarray dimensions...
+ for ( i5 = 0; i5 < S5; i5++ ) {
+ for ( i4 = 0; i4 < S4; i4++ ) {
+ for ( i3 = 0; i3 < S3; i3++ ) {
+ for ( i2 = 0; i2 < S2; i2++ ) {
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ if ( ( xbuf[ ix ] || xbuf[ ix+1 ] ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = some6d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/7d.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/7d.js
new file mode 100644
index 000000000000..47f3f6701d6f
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/7d.js
@@ -0,0 +1,182 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth */
+
+'use strict';
+
+// MODULES //
+
+var strides2order = require( '@stdlib/ndarray/base/strides2order' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 1, 1, 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 12, 12, 12, 12, 4, 4, 1 ];
+*
+* // Define the index offset:
+* var ox = 1;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = some7d( x, 4 );
+* // returns true
+*/
+function some7d( x, n ) {
+ var count;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var S3;
+ var S4;
+ var S5;
+ var S6;
+ var sx;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+
+ // Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...
+ sh = x.shape;
+ sx = x.strides;
+ if ( strides2order( sx ) === 1 ) {
+ // For row-major ndarrays, the last dimensions have the fastest changing indices...
+ S0 = sh[ 6 ];
+ S1 = sh[ 5 ];
+ S2 = sh[ 4 ];
+ S3 = sh[ 3 ];
+ S4 = sh[ 2 ];
+ S5 = sh[ 1 ];
+ S6 = sh[ 0 ];
+ dx0 = sx[ 6 ]; // offset increment for innermost loop
+ dx1 = sx[ 5 ] - ( S0*sx[6] );
+ dx2 = sx[ 4 ] - ( S1*sx[5] );
+ dx3 = sx[ 3 ] - ( S2*sx[4] );
+ dx4 = sx[ 2 ] - ( S3*sx[3] );
+ dx5 = sx[ 1 ] - ( S4*sx[2] );
+ dx6 = sx[ 0 ] - ( S5*sx[1] ); // offset increment for outermost loop
+ } else { // order === 'column-major'
+ // For column-major ndarrays, the first dimensions have the fastest changing indices...
+ S0 = sh[ 0 ];
+ S1 = sh[ 1 ];
+ S2 = sh[ 2 ];
+ S3 = sh[ 3 ];
+ S4 = sh[ 4 ];
+ S5 = sh[ 5 ];
+ S6 = sh[ 6 ];
+ dx0 = sx[ 0 ]; // offset increment for innermost loop
+ dx1 = sx[ 1 ] - ( S0*sx[0] );
+ dx2 = sx[ 2 ] - ( S1*sx[1] );
+ dx3 = sx[ 3 ] - ( S2*sx[2] );
+ dx4 = sx[ 4 ] - ( S3*sx[3] );
+ dx5 = sx[ 5 ] - ( S4*sx[4] );
+ dx6 = sx[ 6 ] - ( S5*sx[5] ); // offset increment for outermost loop
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over the ndarray dimensions...
+ for ( i6 = 0; i6 < S6; i6++ ) {
+ for ( i5 = 0; i5 < S5; i5++ ) {
+ for ( i4 = 0; i4 < S4; i4++ ) {
+ for ( i3 = 0; i3 < S3; i3++ ) {
+ for ( i2 = 0; i2 < S2; i2++ ) {
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ if ( xbuf[ ix ] ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ ix += dx6;
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = some7d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/7d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/7d_accessors.js
new file mode 100644
index 000000000000..93951f3b99d8
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/7d_accessors.js
@@ -0,0 +1,189 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth */
+
+'use strict';
+
+// MODULES //
+
+var strides2order = require( '@stdlib/ndarray/base/strides2order' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} x.accessors - data buffer accessors
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+* var accessors = require( '@stdlib/array/base/accessors' );
+*
+* // Create a data buffer:
+* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 4, 4, 4, 4, 4, 2, 1 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'generic',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': accessors( xbuf ).accessors
+* };
+*
+* // Test elements:
+* var out = some7d( x, 4 );
+* // returns true
+*/
+function some7d( x, n ) {
+ var count;
+ var xbuf;
+ var get;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var S3;
+ var S4;
+ var S5;
+ var S6;
+ var sx;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+
+ // Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...
+ sh = x.shape;
+ sx = x.strides;
+ if ( strides2order( sx ) === 1 ) {
+ // For row-major ndarrays, the last dimensions have the fastest changing indices...
+ S0 = sh[ 6 ];
+ S1 = sh[ 5 ];
+ S2 = sh[ 4 ];
+ S3 = sh[ 3 ];
+ S4 = sh[ 2 ];
+ S5 = sh[ 1 ];
+ S6 = sh[ 0 ];
+ dx0 = sx[ 6 ]; // offset increment for innermost loop
+ dx1 = sx[ 5 ] - ( S0*sx[6] );
+ dx2 = sx[ 4 ] - ( S1*sx[5] );
+ dx3 = sx[ 3 ] - ( S2*sx[4] );
+ dx4 = sx[ 2 ] - ( S3*sx[3] );
+ dx5 = sx[ 1 ] - ( S4*sx[2] );
+ dx6 = sx[ 0 ] - ( S5*sx[1] ); // offset increment for outermost loop
+ } else { // order === 'column-major'
+ // For column-major ndarrays, the first dimensions have the fastest changing indices...
+ S0 = sh[ 0 ];
+ S1 = sh[ 1 ];
+ S2 = sh[ 2 ];
+ S3 = sh[ 3 ];
+ S4 = sh[ 4 ];
+ S5 = sh[ 5 ];
+ S6 = sh[ 6 ];
+ dx0 = sx[ 0 ]; // offset increment for innermost loop
+ dx1 = sx[ 1 ] - ( S0*sx[0] );
+ dx2 = sx[ 2 ] - ( S1*sx[1] );
+ dx3 = sx[ 3 ] - ( S2*sx[2] );
+ dx4 = sx[ 4 ] - ( S3*sx[3] );
+ dx5 = sx[ 5 ] - ( S4*sx[4] );
+ dx6 = sx[ 6 ] - ( S5*sx[5] ); // offset increment for outermost loop
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache accessor:
+ get = x.accessors[ 0 ];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over the ndarray dimensions...
+ for ( i6 = 0; i6 < S6; i6++ ) {
+ for ( i5 = 0; i5 < S5; i5++ ) {
+ for ( i4 = 0; i4 < S4; i4++ ) {
+ for ( i3 = 0; i3 < S3; i3++ ) {
+ for ( i2 = 0; i2 < S2; i2++ ) {
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ if ( get( xbuf, ix ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ ix += dx6;
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = some7d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/7d_blocked.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/7d_blocked.js
new file mode 100644
index 000000000000..fbc0ab2f21ce
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/7d_blocked.js
@@ -0,0 +1,255 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth, max-len */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/nullary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/nullary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy via loop blocking.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 1, 1, 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 12, 12, 12, 12, 4, 4, 1 ];
+*
+* // Define the index offset:
+* var ox = 1;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = blockedsome7d( x, 4 );
+* // returns true
+*/
+function blockedsome7d( x, n ) { // eslint-disable-line max-statements
+ var count;
+ var bsize;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var ox1;
+ var ox2;
+ var ox3;
+ var ox4;
+ var ox5;
+ var ox6;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var s4;
+ var s5;
+ var s6;
+ var sx;
+ var ox;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+ var j0;
+ var j1;
+ var j2;
+ var j3;
+ var j4;
+ var j5;
+ var j6;
+ var o;
+
+ // Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( x.shape, x.strides );
+ sh = o.sh;
+ sx = o.sx;
+
+ // Determine the block size:
+ bsize = blockSize( x.dtype );
+
+ // Set a pointer to the first indexed element:
+ ox = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache the offset increment for the innermost loop:
+ dx0 = sx[0];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over blocks...
+ for ( j6 = sh[6]; j6 > 0; ) {
+ if ( j6 < bsize ) {
+ s6 = j6;
+ j6 = 0;
+ } else {
+ s6 = bsize;
+ j6 -= bsize;
+ }
+ ox6 = ox + ( j6*sx[6] );
+ for ( j5 = sh[5]; j5 > 0; ) {
+ if ( j5 < bsize ) {
+ s5 = j5;
+ j5 = 0;
+ } else {
+ s5 = bsize;
+ j5 -= bsize;
+ }
+ dx6 = sx[6] - ( s5*sx[5] );
+ ox5 = ox6 + ( j5*sx[5] );
+ for ( j4 = sh[4]; j4 > 0; ) {
+ if ( j4 < bsize ) {
+ s4 = j4;
+ j4 = 0;
+ } else {
+ s4 = bsize;
+ j4 -= bsize;
+ }
+ dx5 = sx[5] - ( s4*sx[4] );
+ ox4 = ox5 + ( j4*sx[4] );
+ for ( j3 = sh[3]; j3 > 0; ) {
+ if ( j3 < bsize ) {
+ s3 = j3;
+ j3 = 0;
+ } else {
+ s3 = bsize;
+ j3 -= bsize;
+ }
+ dx4 = sx[4] - ( s3*sx[3] );
+ ox3 = ox4 + ( j3*sx[3] );
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ dx3 = sx[3] - ( s2*sx[2] );
+ ox2 = ox3 + ( j2*sx[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dx2 = sx[2] - ( s1*sx[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute the index offset for the first input ndarray element in the current block:
+ ix = ox1 + ( j0*sx[0] );
+
+ // Compute the loop offset increment:
+ dx1 = sx[1] - ( s0*sx[0] );
+
+ // Iterate over the ndarray dimensions...
+ for ( i6 = 0; i6 < s6; i6++ ) {
+ for ( i5 = 0; i5 < s5; i5++ ) {
+ for ( i4 = 0; i4 < s4; i4++ ) {
+ for ( i3 = 0; i3 < s3; i3++ ) {
+ for ( i2 = 0; i2 < s2; i2++ ) {
+ for ( i1 = 0; i1 < s1; i1++ ) {
+ for ( i0 = 0; i0 < s0; i0++ ) {
+ if ( xbuf[ ix ] ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ ix += dx6;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = blockedsome7d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/7d_blocked_accessors.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/7d_blocked_accessors.js
new file mode 100644
index 000000000000..b1185e0f500c
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/7d_blocked_accessors.js
@@ -0,0 +1,262 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth, max-len */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/nullary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/nullary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy via loop blocking.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} x.accessors - data buffer accessors
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+* var accessors = require( '@stdlib/array/base/accessors' );
+*
+* // Create a data buffer:
+* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 4, 4, 4, 4, 4, 2, 1 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'generic',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': accessors( xbuf ).accessors
+* };
+*
+* // Test elements:
+* var out = blockedsome7d( x, 4 );
+* // returns true
+*/
+function blockedsome7d( x, n ) { // eslint-disable-line max-statements
+ var count;
+ var bsize;
+ var xbuf;
+ var get;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var ox1;
+ var ox2;
+ var ox3;
+ var ox4;
+ var ox5;
+ var ox6;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var s4;
+ var s5;
+ var s6;
+ var sx;
+ var ox;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+ var j0;
+ var j1;
+ var j2;
+ var j3;
+ var j4;
+ var j5;
+ var j6;
+ var o;
+
+ // Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( x.shape, x.strides );
+ sh = o.sh;
+ sx = o.sx;
+
+ // Determine the block size:
+ bsize = blockSize( x.dtype );
+
+ // Set a pointer to the first indexed element:
+ ox = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache the offset increment for the innermost loop:
+ dx0 = sx[0];
+
+ // Cache accessor:
+ get = x.accessors[0];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over blocks...
+ for ( j6 = sh[6]; j6 > 0; ) {
+ if ( j6 < bsize ) {
+ s6 = j6;
+ j6 = 0;
+ } else {
+ s6 = bsize;
+ j6 -= bsize;
+ }
+ ox6 = ox + ( j6*sx[6] );
+ for ( j5 = sh[5]; j5 > 0; ) {
+ if ( j5 < bsize ) {
+ s5 = j5;
+ j5 = 0;
+ } else {
+ s5 = bsize;
+ j5 -= bsize;
+ }
+ dx6 = sx[6] - ( s5*sx[5] );
+ ox5 = ox6 + ( j5*sx[5] );
+ for ( j4 = sh[4]; j4 > 0; ) {
+ if ( j4 < bsize ) {
+ s4 = j4;
+ j4 = 0;
+ } else {
+ s4 = bsize;
+ j4 -= bsize;
+ }
+ dx5 = sx[5] - ( s4*sx[4] );
+ ox4 = ox5 + ( j4*sx[4] );
+ for ( j3 = sh[3]; j3 > 0; ) {
+ if ( j3 < bsize ) {
+ s3 = j3;
+ j3 = 0;
+ } else {
+ s3 = bsize;
+ j3 -= bsize;
+ }
+ dx4 = sx[4] - ( s3*sx[3] );
+ ox3 = ox4 + ( j3*sx[3] );
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ dx3 = sx[3] - ( s2*sx[2] );
+ ox2 = ox3 + ( j2*sx[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dx2 = sx[2] - ( s1*sx[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute the index offset for the first input ndarray element in the current block:
+ ix = ox1 + ( j0*sx[0] );
+
+ // Compute the loop offset increment:
+ dx1 = sx[1] - ( s0*sx[0] );
+
+ // Iterate over the ndarray dimensions...
+ for ( i6 = 0; i6 < s6; i6++ ) {
+ for ( i5 = 0; i5 < s5; i5++ ) {
+ for ( i4 = 0; i4 < s4; i4++ ) {
+ for ( i3 = 0; i3 < s3; i3++ ) {
+ for ( i2 = 0; i2 < s2; i2++ ) {
+ for ( i1 = 0; i1 < s1; i1++ ) {
+ for ( i0 = 0; i0 < s0; i0++ ) {
+ if ( get( xbuf, ix ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ ix += dx6;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = blockedsome7d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/7d_blocked_complex.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/7d_blocked_complex.js
new file mode 100644
index 000000000000..2a894a3a157b
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/7d_blocked_complex.js
@@ -0,0 +1,255 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth, max-len */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/nullary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/nullary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements of a reinterpreted complex number ndarray are truthy via loop blocking.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 8, 8, 8, 8, 8, 4, 2 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'complex128',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = blockedsome7d( x, 4 );
+* // returns true
+*/
+function blockedsome7d( x, n ) { // eslint-disable-line max-statements
+ var count;
+ var bsize;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var ox1;
+ var ox2;
+ var ox3;
+ var ox4;
+ var ox5;
+ var ox6;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var s4;
+ var s5;
+ var s6;
+ var sx;
+ var ox;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+ var j0;
+ var j1;
+ var j2;
+ var j3;
+ var j4;
+ var j5;
+ var j6;
+ var o;
+
+ // Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( x.shape, x.strides );
+ sh = o.sh;
+ sx = o.sx;
+
+ // Determine the block size:
+ bsize = blockSize( x.dtype );
+
+ // Set a pointer to the first indexed element:
+ ox = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache the offset increment for the innermost loop:
+ dx0 = sx[0];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over blocks...
+ for ( j6 = sh[6]; j6 > 0; ) {
+ if ( j6 < bsize ) {
+ s6 = j6;
+ j6 = 0;
+ } else {
+ s6 = bsize;
+ j6 -= bsize;
+ }
+ ox6 = ox + ( j6*sx[6] );
+ for ( j5 = sh[5]; j5 > 0; ) {
+ if ( j5 < bsize ) {
+ s5 = j5;
+ j5 = 0;
+ } else {
+ s5 = bsize;
+ j5 -= bsize;
+ }
+ dx6 = sx[6] - ( s5*sx[5] );
+ ox5 = ox6 + ( j5*sx[5] );
+ for ( j4 = sh[4]; j4 > 0; ) {
+ if ( j4 < bsize ) {
+ s4 = j4;
+ j4 = 0;
+ } else {
+ s4 = bsize;
+ j4 -= bsize;
+ }
+ dx5 = sx[5] - ( s4*sx[4] );
+ ox4 = ox5 + ( j4*sx[4] );
+ for ( j3 = sh[3]; j3 > 0; ) {
+ if ( j3 < bsize ) {
+ s3 = j3;
+ j3 = 0;
+ } else {
+ s3 = bsize;
+ j3 -= bsize;
+ }
+ dx4 = sx[4] - ( s3*sx[3] );
+ ox3 = ox4 + ( j3*sx[3] );
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ dx3 = sx[3] - ( s2*sx[2] );
+ ox2 = ox3 + ( j2*sx[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dx2 = sx[2] - ( s1*sx[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute the index offset for the first input ndarray element in the current block:
+ ix = ox1 + ( j0*sx[0] );
+
+ // Compute the loop offset increment:
+ dx1 = sx[1] - ( s0*sx[0] );
+
+ // Iterate over the ndarray dimensions...
+ for ( i6 = 0; i6 < s6; i6++ ) {
+ for ( i5 = 0; i5 < s5; i5++ ) {
+ for ( i4 = 0; i4 < s4; i4++ ) {
+ for ( i3 = 0; i3 < s3; i3++ ) {
+ for ( i2 = 0; i2 < s2; i2++ ) {
+ for ( i1 = 0; i1 < s1; i1++ ) {
+ for ( i0 = 0; i0 < s0; i0++ ) {
+ if ( ( xbuf[ ix ] || xbuf[ ix+1 ] ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ ix += dx6;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = blockedsome7d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/7d_complex.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/7d_complex.js
new file mode 100644
index 000000000000..63ccf404038b
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/7d_complex.js
@@ -0,0 +1,182 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth */
+
+'use strict';
+
+// MODULES //
+
+var strides2order = require( '@stdlib/ndarray/base/strides2order' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements of a reinterpreted complex number ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 8, 8, 8, 8, 8, 4, 2 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'complex128',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = some7d( x, 4 );
+* // returns true
+*/
+function some7d( x, n ) {
+ var count;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var S3;
+ var S4;
+ var S5;
+ var S6;
+ var sx;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+
+ // Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...
+ sh = x.shape;
+ sx = x.strides;
+ if ( strides2order( sx ) === 1 ) {
+ // For row-major ndarrays, the last dimensions have the fastest changing indices...
+ S0 = sh[ 6 ];
+ S1 = sh[ 5 ];
+ S2 = sh[ 4 ];
+ S3 = sh[ 3 ];
+ S4 = sh[ 2 ];
+ S5 = sh[ 1 ];
+ S6 = sh[ 0 ];
+ dx0 = sx[ 6 ]; // offset increment for innermost loop
+ dx1 = sx[ 5 ] - ( S0*sx[6] );
+ dx2 = sx[ 4 ] - ( S1*sx[5] );
+ dx3 = sx[ 3 ] - ( S2*sx[4] );
+ dx4 = sx[ 2 ] - ( S3*sx[3] );
+ dx5 = sx[ 1 ] - ( S4*sx[2] );
+ dx6 = sx[ 0 ] - ( S5*sx[1] ); // offset increment for outermost loop
+ } else { // order === 'column-major'
+ // For column-major ndarrays, the first dimensions have the fastest changing indices...
+ S0 = sh[ 0 ];
+ S1 = sh[ 1 ];
+ S2 = sh[ 2 ];
+ S3 = sh[ 3 ];
+ S4 = sh[ 4 ];
+ S5 = sh[ 5 ];
+ S6 = sh[ 6 ];
+ dx0 = sx[ 0 ]; // offset increment for innermost loop
+ dx1 = sx[ 1 ] - ( S0*sx[0] );
+ dx2 = sx[ 2 ] - ( S1*sx[1] );
+ dx3 = sx[ 3 ] - ( S2*sx[2] );
+ dx4 = sx[ 4 ] - ( S3*sx[3] );
+ dx5 = sx[ 5 ] - ( S4*sx[4] );
+ dx6 = sx[ 6 ] - ( S5*sx[5] ); // offset increment for outermost loop
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over the ndarray dimensions...
+ for ( i6 = 0; i6 < S6; i6++ ) {
+ for ( i5 = 0; i5 < S5; i5++ ) {
+ for ( i4 = 0; i4 < S4; i4++ ) {
+ for ( i3 = 0; i3 < S3; i3++ ) {
+ for ( i2 = 0; i2 < S2; i2++ ) {
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ if ( ( xbuf[ ix ] || xbuf[ ix+1 ] ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ ix += dx6;
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = some7d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/8d.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/8d.js
new file mode 100644
index 000000000000..1ca293af6dc7
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/8d.js
@@ -0,0 +1,192 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth */
+
+'use strict';
+
+// MODULES //
+
+var strides2order = require( '@stdlib/ndarray/base/strides2order' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 1, 1, 1, 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 12, 12, 12, 12, 12, 4, 4, 1 ];
+*
+* // Define the index offset:
+* var ox = 1;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = some8d( x, 4 );
+* // returns true
+*/
+function some8d( x, n ) {
+ var count;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var dx7;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var S3;
+ var S4;
+ var S5;
+ var S6;
+ var S7;
+ var sx;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+ var i7;
+
+ // Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...
+ sh = x.shape;
+ sx = x.strides;
+ if ( strides2order( sx ) === 1 ) {
+ // For row-major ndarrays, the last dimensions have the fastest changing indices...
+ S0 = sh[ 7 ];
+ S1 = sh[ 6 ];
+ S2 = sh[ 5 ];
+ S3 = sh[ 4 ];
+ S4 = sh[ 3 ];
+ S5 = sh[ 2 ];
+ S6 = sh[ 1 ];
+ S7 = sh[ 0 ];
+ dx0 = sx[ 7 ]; // offset increment for innermost loop
+ dx1 = sx[ 6 ] - ( S0*sx[7] );
+ dx2 = sx[ 5 ] - ( S1*sx[6] );
+ dx3 = sx[ 4 ] - ( S2*sx[5] );
+ dx4 = sx[ 3 ] - ( S3*sx[4] );
+ dx5 = sx[ 2 ] - ( S4*sx[3] );
+ dx6 = sx[ 1 ] - ( S5*sx[2] );
+ dx7 = sx[ 0 ] - ( S6*sx[1] ); // offset increment for outermost loop
+ } else { // order === 'column-major'
+ // For column-major ndarrays, the first dimensions have the fastest changing indices...
+ S0 = sh[ 0 ];
+ S1 = sh[ 1 ];
+ S2 = sh[ 2 ];
+ S3 = sh[ 3 ];
+ S4 = sh[ 4 ];
+ S5 = sh[ 5 ];
+ S6 = sh[ 6 ];
+ S7 = sh[ 7 ];
+ dx0 = sx[ 0 ]; // offset increment for innermost loop
+ dx1 = sx[ 1 ] - ( S0*sx[0] );
+ dx2 = sx[ 2 ] - ( S1*sx[1] );
+ dx3 = sx[ 3 ] - ( S2*sx[2] );
+ dx4 = sx[ 4 ] - ( S3*sx[3] );
+ dx5 = sx[ 5 ] - ( S4*sx[4] );
+ dx6 = sx[ 6 ] - ( S5*sx[5] );
+ dx7 = sx[ 7 ] - ( S6*sx[6] ); // offset increment for outermost loop
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over the ndarray dimensions...
+ for ( i7 = 0; i7 < S7; i7++ ) {
+ for ( i6 = 0; i6 < S6; i6++ ) {
+ for ( i5 = 0; i5 < S5; i5++ ) {
+ for ( i4 = 0; i4 < S4; i4++ ) {
+ for ( i3 = 0; i3 < S3; i3++ ) {
+ for ( i2 = 0; i2 < S2; i2++ ) {
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ if ( xbuf[ ix ] ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ ix += dx6;
+ }
+ ix += dx7;
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = some8d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/8d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/8d_accessors.js
new file mode 100644
index 000000000000..d94f1186fedc
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/8d_accessors.js
@@ -0,0 +1,199 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth */
+
+'use strict';
+
+// MODULES //
+
+var strides2order = require( '@stdlib/ndarray/base/strides2order' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} x.accessors - data buffer accessors
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+* var accessors = require( '@stdlib/array/base/accessors' );
+*
+* // Create a data buffer:
+* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 1, 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 4, 4, 4, 4, 4, 4, 2, 1 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'generic',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': accessors( xbuf ).accessors
+* };
+*
+* // Test elements:
+* var out = some8d( x, 4 );
+* // returns true
+*/
+function some8d( x, n ) {
+ var count;
+ var xbuf;
+ var get;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var dx7;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var S3;
+ var S4;
+ var S5;
+ var S6;
+ var S7;
+ var sx;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+ var i7;
+
+ // Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...
+ sh = x.shape;
+ sx = x.strides;
+ if ( strides2order( sx ) === 1 ) {
+ // For row-major ndarrays, the last dimensions have the fastest changing indices...
+ S0 = sh[ 7 ];
+ S1 = sh[ 6 ];
+ S2 = sh[ 5 ];
+ S3 = sh[ 4 ];
+ S4 = sh[ 3 ];
+ S5 = sh[ 2 ];
+ S6 = sh[ 1 ];
+ S7 = sh[ 0 ];
+ dx0 = sx[ 7 ]; // offset increment for innermost loop
+ dx1 = sx[ 6 ] - ( S0*sx[7] );
+ dx2 = sx[ 5 ] - ( S1*sx[6] );
+ dx3 = sx[ 4 ] - ( S2*sx[5] );
+ dx4 = sx[ 3 ] - ( S3*sx[4] );
+ dx5 = sx[ 2 ] - ( S4*sx[3] );
+ dx6 = sx[ 1 ] - ( S5*sx[2] );
+ dx7 = sx[ 0 ] - ( S6*sx[1] ); // offset increment for outermost loop
+ } else { // order === 'column-major'
+ // For column-major ndarrays, the first dimensions have the fastest changing indices...
+ S0 = sh[ 0 ];
+ S1 = sh[ 1 ];
+ S2 = sh[ 2 ];
+ S3 = sh[ 3 ];
+ S4 = sh[ 4 ];
+ S5 = sh[ 5 ];
+ S6 = sh[ 6 ];
+ S7 = sh[ 7 ];
+ dx0 = sx[ 0 ]; // offset increment for innermost loop
+ dx1 = sx[ 1 ] - ( S0*sx[0] );
+ dx2 = sx[ 2 ] - ( S1*sx[1] );
+ dx3 = sx[ 3 ] - ( S2*sx[2] );
+ dx4 = sx[ 4 ] - ( S3*sx[3] );
+ dx5 = sx[ 5 ] - ( S4*sx[4] );
+ dx6 = sx[ 6 ] - ( S5*sx[5] );
+ dx7 = sx[ 7 ] - ( S6*sx[6] ); // offset increment for outermost loop
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache accessor:
+ get = x.accessors[ 0 ];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over the ndarray dimensions...
+ for ( i7 = 0; i7 < S7; i7++ ) {
+ for ( i6 = 0; i6 < S6; i6++ ) {
+ for ( i5 = 0; i5 < S5; i5++ ) {
+ for ( i4 = 0; i4 < S4; i4++ ) {
+ for ( i3 = 0; i3 < S3; i3++ ) {
+ for ( i2 = 0; i2 < S2; i2++ ) {
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ if ( get( xbuf, ix ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ ix += dx6;
+ }
+ ix += dx7;
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = some8d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/8d_blocked.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/8d_blocked.js
new file mode 100644
index 000000000000..52f55b585213
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/8d_blocked.js
@@ -0,0 +1,274 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth, max-len */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/nullary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/nullary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy via loop blocking.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 1, 1, 1, 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 12, 12, 12, 12, 12, 4, 4, 1 ];
+*
+* // Define the index offset:
+* var ox = 1;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = blockedsome8d( x, 4 );
+* // returns true
+*/
+function blockedsome8d( x, n ) { // eslint-disable-line max-statements
+ var count;
+ var bsize;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var dx7;
+ var ox1;
+ var ox2;
+ var ox3;
+ var ox4;
+ var ox5;
+ var ox6;
+ var ox7;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var s4;
+ var s5;
+ var s6;
+ var s7;
+ var sx;
+ var ox;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+ var i7;
+ var j0;
+ var j1;
+ var j2;
+ var j3;
+ var j4;
+ var j5;
+ var j6;
+ var j7;
+ var o;
+
+ // Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( x.shape, x.strides );
+ sh = o.sh;
+ sx = o.sx;
+
+ // Determine the block size:
+ bsize = blockSize( x.dtype );
+
+ // Set a pointer to the first indexed element:
+ ox = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache the offset increment for the innermost loop:
+ dx0 = sx[0];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over blocks...
+ for ( j7 = sh[7]; j7 > 0; ) {
+ if ( j7 < bsize ) {
+ s7 = j7;
+ j7 = 0;
+ } else {
+ s7 = bsize;
+ j7 -= bsize;
+ }
+ ox7 = ox + ( j7*sx[7] );
+ for ( j6 = sh[6]; j6 > 0; ) {
+ if ( j6 < bsize ) {
+ s6 = j6;
+ j6 = 0;
+ } else {
+ s6 = bsize;
+ j6 -= bsize;
+ }
+ dx7 = sx[7] - ( s6*sx[6] );
+ ox6 = ox7 + ( j6*sx[6] );
+ for ( j5 = sh[5]; j5 > 0; ) {
+ if ( j5 < bsize ) {
+ s5 = j5;
+ j5 = 0;
+ } else {
+ s5 = bsize;
+ j5 -= bsize;
+ }
+ dx6 = sx[6] - ( s5*sx[5] );
+ ox5 = ox6 + ( j5*sx[5] );
+ for ( j4 = sh[4]; j4 > 0; ) {
+ if ( j4 < bsize ) {
+ s4 = j4;
+ j4 = 0;
+ } else {
+ s4 = bsize;
+ j4 -= bsize;
+ }
+ dx5 = sx[5] - ( s4*sx[4] );
+ ox4 = ox5 + ( j4*sx[4] );
+ for ( j3 = sh[3]; j3 > 0; ) {
+ if ( j3 < bsize ) {
+ s3 = j3;
+ j3 = 0;
+ } else {
+ s3 = bsize;
+ j3 -= bsize;
+ }
+ dx4 = sx[4] - ( s3*sx[3] );
+ ox3 = ox4 + ( j3*sx[3] );
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ dx3 = sx[3] - ( s2*sx[2] );
+ ox2 = ox3 + ( j2*sx[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dx2 = sx[2] - ( s1*sx[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute the index offset for the first input ndarray element in the current block:
+ ix = ox1 + ( j0*sx[0] );
+
+ // Compute the loop offset increment:
+ dx1 = sx[1] - ( s0*sx[0] );
+
+ // Iterate over the ndarray dimensions...
+ for ( i7 = 0; i7 < s7; i7++ ) {
+ for ( i6 = 0; i6 < s6; i6++ ) {
+ for ( i5 = 0; i5 < s5; i5++ ) {
+ for ( i4 = 0; i4 < s4; i4++ ) {
+ for ( i3 = 0; i3 < s3; i3++ ) {
+ for ( i2 = 0; i2 < s2; i2++ ) {
+ for ( i1 = 0; i1 < s1; i1++ ) {
+ for ( i0 = 0; i0 < s0; i0++ ) {
+ if ( xbuf[ ix ] ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ ix += dx6;
+ }
+ ix += dx7;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = blockedsome8d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/8d_blocked_accessors.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/8d_blocked_accessors.js
new file mode 100644
index 000000000000..2ef7743e11e4
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/8d_blocked_accessors.js
@@ -0,0 +1,281 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth, max-len */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/nullary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/nullary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy via loop blocking.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} x.accessors - data buffer accessors
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+* var accessors = require( '@stdlib/array/base/accessors' );
+*
+* // Create a data buffer:
+* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 1, 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 4, 4, 4, 4, 4, 4, 2, 1 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'generic',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': accessors( xbuf ).accessors
+* };
+*
+* // Test elements:
+* var out = blockedsome8d( x, 4 );
+* // returns true
+*/
+function blockedsome8d( x, n ) { // eslint-disable-line max-statements
+ var count;
+ var bsize;
+ var xbuf;
+ var get;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var dx7;
+ var ox1;
+ var ox2;
+ var ox3;
+ var ox4;
+ var ox5;
+ var ox6;
+ var ox7;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var s4;
+ var s5;
+ var s6;
+ var s7;
+ var sx;
+ var ox;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+ var i7;
+ var j0;
+ var j1;
+ var j2;
+ var j3;
+ var j4;
+ var j5;
+ var j6;
+ var j7;
+ var o;
+
+ // Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( x.shape, x.strides );
+ sh = o.sh;
+ sx = o.sx;
+
+ // Determine the block size:
+ bsize = blockSize( x.dtype );
+
+ // Set a pointer to the first indexed element:
+ ox = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache the offset increment for the innermost loop:
+ dx0 = sx[0];
+
+ // Cache accessor:
+ get = x.accessors[0];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over blocks...
+ for ( j7 = sh[7]; j7 > 0; ) {
+ if ( j7 < bsize ) {
+ s7 = j7;
+ j7 = 0;
+ } else {
+ s7 = bsize;
+ j7 -= bsize;
+ }
+ ox7 = ox + ( j7*sx[7] );
+ for ( j6 = sh[6]; j6 > 0; ) {
+ if ( j6 < bsize ) {
+ s6 = j6;
+ j6 = 0;
+ } else {
+ s6 = bsize;
+ j6 -= bsize;
+ }
+ dx7 = sx[7] - ( s6*sx[6] );
+ ox6 = ox7 + ( j6*sx[6] );
+ for ( j5 = sh[5]; j5 > 0; ) {
+ if ( j5 < bsize ) {
+ s5 = j5;
+ j5 = 0;
+ } else {
+ s5 = bsize;
+ j5 -= bsize;
+ }
+ dx6 = sx[6] - ( s5*sx[5] );
+ ox5 = ox6 + ( j5*sx[5] );
+ for ( j4 = sh[4]; j4 > 0; ) {
+ if ( j4 < bsize ) {
+ s4 = j4;
+ j4 = 0;
+ } else {
+ s4 = bsize;
+ j4 -= bsize;
+ }
+ dx5 = sx[5] - ( s4*sx[4] );
+ ox4 = ox5 + ( j4*sx[4] );
+ for ( j3 = sh[3]; j3 > 0; ) {
+ if ( j3 < bsize ) {
+ s3 = j3;
+ j3 = 0;
+ } else {
+ s3 = bsize;
+ j3 -= bsize;
+ }
+ dx4 = sx[4] - ( s3*sx[3] );
+ ox3 = ox4 + ( j3*sx[3] );
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ dx3 = sx[3] - ( s2*sx[2] );
+ ox2 = ox3 + ( j2*sx[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dx2 = sx[2] - ( s1*sx[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute the index offset for the first input ndarray element in the current block:
+ ix = ox1 + ( j0*sx[0] );
+
+ // Compute the loop offset increment:
+ dx1 = sx[1] - ( s0*sx[0] );
+
+ // Iterate over the ndarray dimensions...
+ for ( i7 = 0; i7 < s7; i7++ ) {
+ for ( i6 = 0; i6 < s6; i6++ ) {
+ for ( i5 = 0; i5 < s5; i5++ ) {
+ for ( i4 = 0; i4 < s4; i4++ ) {
+ for ( i3 = 0; i3 < s3; i3++ ) {
+ for ( i2 = 0; i2 < s2; i2++ ) {
+ for ( i1 = 0; i1 < s1; i1++ ) {
+ for ( i0 = 0; i0 < s0; i0++ ) {
+ if ( get( xbuf, ix ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ ix += dx6;
+ }
+ ix += dx7;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = blockedsome8d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/8d_blocked_complex.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/8d_blocked_complex.js
new file mode 100644
index 000000000000..64581ef5d056
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/8d_blocked_complex.js
@@ -0,0 +1,274 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth, max-len */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/nullary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/nullary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements of a reinterpreted complex number ndarray are truthy via loop blocking.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 1, 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 8, 8, 8, 8, 8, 8, 4, 2 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'complex128',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = blockedsome8d( x, 4 );
+* // returns true
+*/
+function blockedsome8d( x, n ) { // eslint-disable-line max-statements
+ var count;
+ var bsize;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var dx7;
+ var ox1;
+ var ox2;
+ var ox3;
+ var ox4;
+ var ox5;
+ var ox6;
+ var ox7;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var s4;
+ var s5;
+ var s6;
+ var s7;
+ var sx;
+ var ox;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+ var i7;
+ var j0;
+ var j1;
+ var j2;
+ var j3;
+ var j4;
+ var j5;
+ var j6;
+ var j7;
+ var o;
+
+ // Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( x.shape, x.strides );
+ sh = o.sh;
+ sx = o.sx;
+
+ // Determine the block size:
+ bsize = blockSize( x.dtype );
+
+ // Set a pointer to the first indexed element:
+ ox = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache the offset increment for the innermost loop:
+ dx0 = sx[0];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over blocks...
+ for ( j7 = sh[7]; j7 > 0; ) {
+ if ( j7 < bsize ) {
+ s7 = j7;
+ j7 = 0;
+ } else {
+ s7 = bsize;
+ j7 -= bsize;
+ }
+ ox7 = ox + ( j7*sx[7] );
+ for ( j6 = sh[6]; j6 > 0; ) {
+ if ( j6 < bsize ) {
+ s6 = j6;
+ j6 = 0;
+ } else {
+ s6 = bsize;
+ j6 -= bsize;
+ }
+ dx7 = sx[7] - ( s6*sx[6] );
+ ox6 = ox7 + ( j6*sx[6] );
+ for ( j5 = sh[5]; j5 > 0; ) {
+ if ( j5 < bsize ) {
+ s5 = j5;
+ j5 = 0;
+ } else {
+ s5 = bsize;
+ j5 -= bsize;
+ }
+ dx6 = sx[6] - ( s5*sx[5] );
+ ox5 = ox6 + ( j5*sx[5] );
+ for ( j4 = sh[4]; j4 > 0; ) {
+ if ( j4 < bsize ) {
+ s4 = j4;
+ j4 = 0;
+ } else {
+ s4 = bsize;
+ j4 -= bsize;
+ }
+ dx5 = sx[5] - ( s4*sx[4] );
+ ox4 = ox5 + ( j4*sx[4] );
+ for ( j3 = sh[3]; j3 > 0; ) {
+ if ( j3 < bsize ) {
+ s3 = j3;
+ j3 = 0;
+ } else {
+ s3 = bsize;
+ j3 -= bsize;
+ }
+ dx4 = sx[4] - ( s3*sx[3] );
+ ox3 = ox4 + ( j3*sx[3] );
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ dx3 = sx[3] - ( s2*sx[2] );
+ ox2 = ox3 + ( j2*sx[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dx2 = sx[2] - ( s1*sx[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute the index offset for the first input ndarray element in the current block:
+ ix = ox1 + ( j0*sx[0] );
+
+ // Compute the loop offset increment:
+ dx1 = sx[1] - ( s0*sx[0] );
+
+ // Iterate over the ndarray dimensions...
+ for ( i7 = 0; i7 < s7; i7++ ) {
+ for ( i6 = 0; i6 < s6; i6++ ) {
+ for ( i5 = 0; i5 < s5; i5++ ) {
+ for ( i4 = 0; i4 < s4; i4++ ) {
+ for ( i3 = 0; i3 < s3; i3++ ) {
+ for ( i2 = 0; i2 < s2; i2++ ) {
+ for ( i1 = 0; i1 < s1; i1++ ) {
+ for ( i0 = 0; i0 < s0; i0++ ) {
+ if ( ( xbuf[ ix ] || xbuf[ ix+1 ] ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ ix += dx6;
+ }
+ ix += dx7;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = blockedsome8d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/8d_complex.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/8d_complex.js
new file mode 100644
index 000000000000..c6accdbf9698
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/8d_complex.js
@@ -0,0 +1,192 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth */
+
+'use strict';
+
+// MODULES //
+
+var strides2order = require( '@stdlib/ndarray/base/strides2order' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements of a reinterpreted complex number ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 1, 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 8, 8, 8, 8, 8, 8, 4, 2 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'complex128',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = some8d( x, 4 );
+* // returns true
+*/
+function some8d( x, n ) {
+ var count;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var dx7;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var S3;
+ var S4;
+ var S5;
+ var S6;
+ var S7;
+ var sx;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+ var i7;
+
+ // Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...
+ sh = x.shape;
+ sx = x.strides;
+ if ( strides2order( sx ) === 1 ) {
+ // For row-major ndarrays, the last dimensions have the fastest changing indices...
+ S0 = sh[ 7 ];
+ S1 = sh[ 6 ];
+ S2 = sh[ 5 ];
+ S3 = sh[ 4 ];
+ S4 = sh[ 3 ];
+ S5 = sh[ 2 ];
+ S6 = sh[ 1 ];
+ S7 = sh[ 0 ];
+ dx0 = sx[ 7 ]; // offset increment for innermost loop
+ dx1 = sx[ 6 ] - ( S0*sx[7] );
+ dx2 = sx[ 5 ] - ( S1*sx[6] );
+ dx3 = sx[ 4 ] - ( S2*sx[5] );
+ dx4 = sx[ 3 ] - ( S3*sx[4] );
+ dx5 = sx[ 2 ] - ( S4*sx[3] );
+ dx6 = sx[ 1 ] - ( S5*sx[2] );
+ dx7 = sx[ 0 ] - ( S6*sx[1] ); // offset increment for outermost loop
+ } else { // order === 'column-major'
+ // For column-major ndarrays, the first dimensions have the fastest changing indices...
+ S0 = sh[ 0 ];
+ S1 = sh[ 1 ];
+ S2 = sh[ 2 ];
+ S3 = sh[ 3 ];
+ S4 = sh[ 4 ];
+ S5 = sh[ 5 ];
+ S6 = sh[ 6 ];
+ S7 = sh[ 7 ];
+ dx0 = sx[ 0 ]; // offset increment for innermost loop
+ dx1 = sx[ 1 ] - ( S0*sx[0] );
+ dx2 = sx[ 2 ] - ( S1*sx[1] );
+ dx3 = sx[ 3 ] - ( S2*sx[2] );
+ dx4 = sx[ 4 ] - ( S3*sx[3] );
+ dx5 = sx[ 5 ] - ( S4*sx[4] );
+ dx6 = sx[ 6 ] - ( S5*sx[5] );
+ dx7 = sx[ 7 ] - ( S6*sx[6] ); // offset increment for outermost loop
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over the ndarray dimensions...
+ for ( i7 = 0; i7 < S7; i7++ ) {
+ for ( i6 = 0; i6 < S6; i6++ ) {
+ for ( i5 = 0; i5 < S5; i5++ ) {
+ for ( i4 = 0; i4 < S4; i4++ ) {
+ for ( i3 = 0; i3 < S3; i3++ ) {
+ for ( i2 = 0; i2 < S2; i2++ ) {
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ if ( ( xbuf[ ix ] || xbuf[ ix+1 ] ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ ix += dx6;
+ }
+ ix += dx7;
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = some8d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/9d.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/9d.js
new file mode 100644
index 000000000000..8169bab7610c
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/9d.js
@@ -0,0 +1,202 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth */
+
+'use strict';
+
+// MODULES //
+
+var strides2order = require( '@stdlib/ndarray/base/strides2order' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 1, 1, 1, 1, 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 12, 12, 12, 12, 12, 12, 4, 4, 1 ];
+*
+* // Define the index offset:
+* var ox = 1;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = some9d( x, 4 );
+* // returns true
+*/
+function some9d( x, n ) {
+ var count;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var dx7;
+ var dx8;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var S3;
+ var S4;
+ var S5;
+ var S6;
+ var S7;
+ var S8;
+ var sx;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+ var i7;
+ var i8;
+
+ // Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...
+ sh = x.shape;
+ sx = x.strides;
+ if ( strides2order( sx ) === 1 ) {
+ // For row-major ndarrays, the last dimensions have the fastest changing indices...
+ S0 = sh[ 8 ];
+ S1 = sh[ 7 ];
+ S2 = sh[ 6 ];
+ S3 = sh[ 5 ];
+ S4 = sh[ 4 ];
+ S5 = sh[ 3 ];
+ S6 = sh[ 2 ];
+ S7 = sh[ 1 ];
+ S8 = sh[ 0 ];
+ dx0 = sx[ 8 ]; // offset increment for innermost loop
+ dx1 = sx[ 7 ] - ( S0*sx[8] );
+ dx2 = sx[ 6 ] - ( S1*sx[7] );
+ dx3 = sx[ 5 ] - ( S2*sx[6] );
+ dx4 = sx[ 4 ] - ( S3*sx[5] );
+ dx5 = sx[ 3 ] - ( S4*sx[4] );
+ dx6 = sx[ 2 ] - ( S5*sx[3] );
+ dx7 = sx[ 1 ] - ( S6*sx[2] );
+ dx8 = sx[ 0 ] - ( S7*sx[1] ); // offset increment for outermost loop
+ } else { // order === 'column-major'
+ // For column-major ndarrays, the first dimensions have the fastest changing indices...
+ S0 = sh[ 0 ];
+ S1 = sh[ 1 ];
+ S2 = sh[ 2 ];
+ S3 = sh[ 3 ];
+ S4 = sh[ 4 ];
+ S5 = sh[ 5 ];
+ S6 = sh[ 6 ];
+ S7 = sh[ 7 ];
+ S8 = sh[ 8 ];
+ dx0 = sx[ 0 ]; // offset increment for innermost loop
+ dx1 = sx[ 1 ] - ( S0*sx[0] );
+ dx2 = sx[ 2 ] - ( S1*sx[1] );
+ dx3 = sx[ 3 ] - ( S2*sx[2] );
+ dx4 = sx[ 4 ] - ( S3*sx[3] );
+ dx5 = sx[ 5 ] - ( S4*sx[4] );
+ dx6 = sx[ 6 ] - ( S5*sx[5] );
+ dx7 = sx[ 7 ] - ( S6*sx[6] );
+ dx8 = sx[ 8 ] - ( S7*sx[7] ); // offset increment for outermost loop
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over the ndarray dimensions...
+ for ( i8 = 0; i8 < S8; i8++ ) {
+ for ( i7 = 0; i7 < S7; i7++ ) {
+ for ( i6 = 0; i6 < S6; i6++ ) {
+ for ( i5 = 0; i5 < S5; i5++ ) {
+ for ( i4 = 0; i4 < S4; i4++ ) {
+ for ( i3 = 0; i3 < S3; i3++ ) {
+ for ( i2 = 0; i2 < S2; i2++ ) {
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ if ( xbuf[ ix ] ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ ix += dx6;
+ }
+ ix += dx7;
+ }
+ ix += dx8;
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = some9d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/9d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/9d_accessors.js
new file mode 100644
index 000000000000..266bb7b03e67
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/9d_accessors.js
@@ -0,0 +1,209 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth */
+
+'use strict';
+
+// MODULES //
+
+var strides2order = require( '@stdlib/ndarray/base/strides2order' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} x.accessors - data buffer accessors
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+* var accessors = require( '@stdlib/array/base/accessors' );
+*
+* // Create a data buffer:
+* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 1, 1, 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 4, 4, 4, 4, 4, 4, 4, 2, 1 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'generic',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': accessors( xbuf ).accessors
+* };
+*
+* // Test elements:
+* var out = some9d( x, 4 );
+* // returns true
+*/
+function some9d( x, n ) {
+ var count;
+ var xbuf;
+ var get;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var dx7;
+ var dx8;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var S3;
+ var S4;
+ var S5;
+ var S6;
+ var S7;
+ var S8;
+ var sx;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+ var i7;
+ var i8;
+
+ // Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...
+ sh = x.shape;
+ sx = x.strides;
+ if ( strides2order( sx ) === 1 ) {
+ // For row-major ndarrays, the last dimensions have the fastest changing indices...
+ S0 = sh[ 8 ];
+ S1 = sh[ 7 ];
+ S2 = sh[ 6 ];
+ S3 = sh[ 5 ];
+ S4 = sh[ 4 ];
+ S5 = sh[ 3 ];
+ S6 = sh[ 2 ];
+ S7 = sh[ 1 ];
+ S8 = sh[ 0 ];
+ dx0 = sx[ 8 ]; // offset increment for innermost loop
+ dx1 = sx[ 7 ] - ( S0*sx[8] );
+ dx2 = sx[ 6 ] - ( S1*sx[7] );
+ dx3 = sx[ 5 ] - ( S2*sx[6] );
+ dx4 = sx[ 4 ] - ( S3*sx[5] );
+ dx5 = sx[ 3 ] - ( S4*sx[4] );
+ dx6 = sx[ 2 ] - ( S5*sx[3] );
+ dx7 = sx[ 1 ] - ( S6*sx[2] );
+ dx8 = sx[ 0 ] - ( S7*sx[1] ); // offset increment for outermost loop
+ } else { // order === 'column-major'
+ // For column-major ndarrays, the first dimensions have the fastest changing indices...
+ S0 = sh[ 0 ];
+ S1 = sh[ 1 ];
+ S2 = sh[ 2 ];
+ S3 = sh[ 3 ];
+ S4 = sh[ 4 ];
+ S5 = sh[ 5 ];
+ S6 = sh[ 6 ];
+ S7 = sh[ 7 ];
+ S8 = sh[ 8 ];
+ dx0 = sx[ 0 ]; // offset increment for innermost loop
+ dx1 = sx[ 1 ] - ( S0*sx[0] );
+ dx2 = sx[ 2 ] - ( S1*sx[1] );
+ dx3 = sx[ 3 ] - ( S2*sx[2] );
+ dx4 = sx[ 4 ] - ( S3*sx[3] );
+ dx5 = sx[ 5 ] - ( S4*sx[4] );
+ dx6 = sx[ 6 ] - ( S5*sx[5] );
+ dx7 = sx[ 7 ] - ( S6*sx[6] );
+ dx8 = sx[ 8 ] - ( S7*sx[7] ); // offset increment for outermost loop
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache accessor:
+ get = x.accessors[ 0 ];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over the ndarray dimensions...
+ for ( i8 = 0; i8 < S8; i8++ ) {
+ for ( i7 = 0; i7 < S7; i7++ ) {
+ for ( i6 = 0; i6 < S6; i6++ ) {
+ for ( i5 = 0; i5 < S5; i5++ ) {
+ for ( i4 = 0; i4 < S4; i4++ ) {
+ for ( i3 = 0; i3 < S3; i3++ ) {
+ for ( i2 = 0; i2 < S2; i2++ ) {
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ if ( get( xbuf, ix ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ ix += dx6;
+ }
+ ix += dx7;
+ }
+ ix += dx8;
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = some9d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/9d_blocked.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/9d_blocked.js
new file mode 100644
index 000000000000..ec5b20f9a72f
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/9d_blocked.js
@@ -0,0 +1,293 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth, max-len */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/nullary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/nullary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy via loop blocking.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 1, 1, 1, 1, 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 12, 12, 12, 12, 12, 12, 4, 4, 1 ];
+*
+* // Define the index offset:
+* var ox = 1;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = blockedsome9d( x, 4 );
+* // returns true
+*/
+function blockedsome9d( x, n ) { // eslint-disable-line max-statements
+ var count;
+ var bsize;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var dx7;
+ var dx8;
+ var ox1;
+ var ox2;
+ var ox3;
+ var ox4;
+ var ox5;
+ var ox6;
+ var ox7;
+ var ox8;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var s4;
+ var s5;
+ var s6;
+ var s7;
+ var s8;
+ var sx;
+ var ox;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+ var i7;
+ var i8;
+ var j0;
+ var j1;
+ var j2;
+ var j3;
+ var j4;
+ var j5;
+ var j6;
+ var j7;
+ var j8;
+ var o;
+
+ // Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( x.shape, x.strides );
+ sh = o.sh;
+ sx = o.sx;
+
+ // Determine the block size:
+ bsize = blockSize( x.dtype );
+
+ // Set a pointer to the first indexed element:
+ ox = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache the offset increment for the innermost loop:
+ dx0 = sx[0];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over blocks...
+ for ( j8 = sh[8]; j8 > 0; ) {
+ if ( j8 < bsize ) {
+ s8 = j8;
+ j8 = 0;
+ } else {
+ s8 = bsize;
+ j8 -= bsize;
+ }
+ ox8 = ox + ( j8*sx[8] );
+ for ( j7 = sh[7]; j7 > 0; ) {
+ if ( j7 < bsize ) {
+ s7 = j7;
+ j7 = 0;
+ } else {
+ s7 = bsize;
+ j7 -= bsize;
+ }
+ dx8 = sx[8] - ( s7*sx[7] );
+ ox7 = ox8 + ( j7*sx[7] );
+ for ( j6 = sh[6]; j6 > 0; ) {
+ if ( j6 < bsize ) {
+ s6 = j6;
+ j6 = 0;
+ } else {
+ s6 = bsize;
+ j6 -= bsize;
+ }
+ dx7 = sx[7] - ( s6*sx[6] );
+ ox6 = ox7 + ( j6*sx[6] );
+ for ( j5 = sh[5]; j5 > 0; ) {
+ if ( j5 < bsize ) {
+ s5 = j5;
+ j5 = 0;
+ } else {
+ s5 = bsize;
+ j5 -= bsize;
+ }
+ dx6 = sx[6] - ( s5*sx[5] );
+ ox5 = ox6 + ( j5*sx[5] );
+ for ( j4 = sh[4]; j4 > 0; ) {
+ if ( j4 < bsize ) {
+ s4 = j4;
+ j4 = 0;
+ } else {
+ s4 = bsize;
+ j4 -= bsize;
+ }
+ dx5 = sx[5] - ( s4*sx[4] );
+ ox4 = ox5 + ( j4*sx[4] );
+ for ( j3 = sh[3]; j3 > 0; ) {
+ if ( j3 < bsize ) {
+ s3 = j3;
+ j3 = 0;
+ } else {
+ s3 = bsize;
+ j3 -= bsize;
+ }
+ dx4 = sx[4] - ( s3*sx[3] );
+ ox3 = ox4 + ( j3*sx[3] );
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ dx3 = sx[3] - ( s2*sx[2] );
+ ox2 = ox3 + ( j2*sx[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dx2 = sx[2] - ( s1*sx[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute the index offset for the first input ndarray element in the current block:
+ ix = ox1 + ( j0*sx[0] );
+
+ // Compute the loop offset increment:
+ dx1 = sx[1] - ( s0*sx[0] );
+
+ // Iterate over the ndarray dimensions...
+ for ( i8 = 0; i8 < s8; i8++ ) {
+ for ( i7 = 0; i7 < s7; i7++ ) {
+ for ( i6 = 0; i6 < s6; i6++ ) {
+ for ( i5 = 0; i5 < s5; i5++ ) {
+ for ( i4 = 0; i4 < s4; i4++ ) {
+ for ( i3 = 0; i3 < s3; i3++ ) {
+ for ( i2 = 0; i2 < s2; i2++ ) {
+ for ( i1 = 0; i1 < s1; i1++ ) {
+ for ( i0 = 0; i0 < s0; i0++ ) {
+ if ( xbuf[ ix ] ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ ix += dx6;
+ }
+ ix += dx7;
+ }
+ ix += dx8;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = blockedsome9d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/9d_blocked_accessors.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/9d_blocked_accessors.js
new file mode 100644
index 000000000000..1ce711274442
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/9d_blocked_accessors.js
@@ -0,0 +1,300 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth, max-len */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/nullary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/nullary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy via loop blocking.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} x.accessors - data buffer accessors
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+* var accessors = require( '@stdlib/array/base/accessors' );
+*
+* // Create a data buffer:
+* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 1, 1, 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 4, 4, 4, 4, 4, 4, 4, 2, 1 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'generic',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': accessors( xbuf ).accessors
+* };
+*
+* // Test elements:
+* var out = blockedsome9d( x, 4 );
+* // returns true
+*/
+function blockedsome9d( x, n ) { // eslint-disable-line max-statements
+ var count;
+ var bsize;
+ var xbuf;
+ var get;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var dx7;
+ var dx8;
+ var ox1;
+ var ox2;
+ var ox3;
+ var ox4;
+ var ox5;
+ var ox6;
+ var ox7;
+ var ox8;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var s4;
+ var s5;
+ var s6;
+ var s7;
+ var s8;
+ var sx;
+ var ox;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+ var i7;
+ var i8;
+ var j0;
+ var j1;
+ var j2;
+ var j3;
+ var j4;
+ var j5;
+ var j6;
+ var j7;
+ var j8;
+ var o;
+
+ // Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( x.shape, x.strides );
+ sh = o.sh;
+ sx = o.sx;
+
+ // Determine the block size:
+ bsize = blockSize( x.dtype );
+
+ // Set a pointer to the first indexed element:
+ ox = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache the offset increment for the innermost loop:
+ dx0 = sx[0];
+
+ // Cache accessor:
+ get = x.accessors[0];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over blocks...
+ for ( j8 = sh[8]; j8 > 0; ) {
+ if ( j8 < bsize ) {
+ s8 = j8;
+ j8 = 0;
+ } else {
+ s8 = bsize;
+ j8 -= bsize;
+ }
+ ox8 = ox + ( j8*sx[8] );
+ for ( j7 = sh[7]; j7 > 0; ) {
+ if ( j7 < bsize ) {
+ s7 = j7;
+ j7 = 0;
+ } else {
+ s7 = bsize;
+ j7 -= bsize;
+ }
+ dx8 = sx[8] - ( s7*sx[7] );
+ ox7 = ox8 + ( j7*sx[7] );
+ for ( j6 = sh[6]; j6 > 0; ) {
+ if ( j6 < bsize ) {
+ s6 = j6;
+ j6 = 0;
+ } else {
+ s6 = bsize;
+ j6 -= bsize;
+ }
+ dx7 = sx[7] - ( s6*sx[6] );
+ ox6 = ox7 + ( j6*sx[6] );
+ for ( j5 = sh[5]; j5 > 0; ) {
+ if ( j5 < bsize ) {
+ s5 = j5;
+ j5 = 0;
+ } else {
+ s5 = bsize;
+ j5 -= bsize;
+ }
+ dx6 = sx[6] - ( s5*sx[5] );
+ ox5 = ox6 + ( j5*sx[5] );
+ for ( j4 = sh[4]; j4 > 0; ) {
+ if ( j4 < bsize ) {
+ s4 = j4;
+ j4 = 0;
+ } else {
+ s4 = bsize;
+ j4 -= bsize;
+ }
+ dx5 = sx[5] - ( s4*sx[4] );
+ ox4 = ox5 + ( j4*sx[4] );
+ for ( j3 = sh[3]; j3 > 0; ) {
+ if ( j3 < bsize ) {
+ s3 = j3;
+ j3 = 0;
+ } else {
+ s3 = bsize;
+ j3 -= bsize;
+ }
+ dx4 = sx[4] - ( s3*sx[3] );
+ ox3 = ox4 + ( j3*sx[3] );
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ dx3 = sx[3] - ( s2*sx[2] );
+ ox2 = ox3 + ( j2*sx[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dx2 = sx[2] - ( s1*sx[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute the index offset for the first input ndarray element in the current block:
+ ix = ox1 + ( j0*sx[0] );
+
+ // Compute the loop offset increment:
+ dx1 = sx[1] - ( s0*sx[0] );
+
+ // Iterate over the ndarray dimensions...
+ for ( i8 = 0; i8 < s8; i8++ ) {
+ for ( i7 = 0; i7 < s7; i7++ ) {
+ for ( i6 = 0; i6 < s6; i6++ ) {
+ for ( i5 = 0; i5 < s5; i5++ ) {
+ for ( i4 = 0; i4 < s4; i4++ ) {
+ for ( i3 = 0; i3 < s3; i3++ ) {
+ for ( i2 = 0; i2 < s2; i2++ ) {
+ for ( i1 = 0; i1 < s1; i1++ ) {
+ for ( i0 = 0; i0 < s0; i0++ ) {
+ if ( get( xbuf, ix ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ ix += dx6;
+ }
+ ix += dx7;
+ }
+ ix += dx8;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = blockedsome9d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/9d_blocked_complex.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/9d_blocked_complex.js
new file mode 100644
index 000000000000..27606d0b392a
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/9d_blocked_complex.js
@@ -0,0 +1,293 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth, max-len */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/nullary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/nullary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements of a reinterpreted complex number ndarray are truthy via loop blocking.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 1, 1, 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 8, 8, 8, 8, 8, 8, 8, 4, 2 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'complex128',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = blockedsome9d( x, 4 );
+* // returns true
+*/
+function blockedsome9d( x, n ) { // eslint-disable-line max-statements
+ var count;
+ var bsize;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var dx7;
+ var dx8;
+ var ox1;
+ var ox2;
+ var ox3;
+ var ox4;
+ var ox5;
+ var ox6;
+ var ox7;
+ var ox8;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var s4;
+ var s5;
+ var s6;
+ var s7;
+ var s8;
+ var sx;
+ var ox;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+ var i7;
+ var i8;
+ var j0;
+ var j1;
+ var j2;
+ var j3;
+ var j4;
+ var j5;
+ var j6;
+ var j7;
+ var j8;
+ var o;
+
+ // Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( x.shape, x.strides );
+ sh = o.sh;
+ sx = o.sx;
+
+ // Determine the block size:
+ bsize = blockSize( x.dtype );
+
+ // Set a pointer to the first indexed element:
+ ox = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Cache the offset increment for the innermost loop:
+ dx0 = sx[0];
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over blocks...
+ for ( j8 = sh[8]; j8 > 0; ) {
+ if ( j8 < bsize ) {
+ s8 = j8;
+ j8 = 0;
+ } else {
+ s8 = bsize;
+ j8 -= bsize;
+ }
+ ox8 = ox + ( j8*sx[8] );
+ for ( j7 = sh[7]; j7 > 0; ) {
+ if ( j7 < bsize ) {
+ s7 = j7;
+ j7 = 0;
+ } else {
+ s7 = bsize;
+ j7 -= bsize;
+ }
+ dx8 = sx[8] - ( s7*sx[7] );
+ ox7 = ox8 + ( j7*sx[7] );
+ for ( j6 = sh[6]; j6 > 0; ) {
+ if ( j6 < bsize ) {
+ s6 = j6;
+ j6 = 0;
+ } else {
+ s6 = bsize;
+ j6 -= bsize;
+ }
+ dx7 = sx[7] - ( s6*sx[6] );
+ ox6 = ox7 + ( j6*sx[6] );
+ for ( j5 = sh[5]; j5 > 0; ) {
+ if ( j5 < bsize ) {
+ s5 = j5;
+ j5 = 0;
+ } else {
+ s5 = bsize;
+ j5 -= bsize;
+ }
+ dx6 = sx[6] - ( s5*sx[5] );
+ ox5 = ox6 + ( j5*sx[5] );
+ for ( j4 = sh[4]; j4 > 0; ) {
+ if ( j4 < bsize ) {
+ s4 = j4;
+ j4 = 0;
+ } else {
+ s4 = bsize;
+ j4 -= bsize;
+ }
+ dx5 = sx[5] - ( s4*sx[4] );
+ ox4 = ox5 + ( j4*sx[4] );
+ for ( j3 = sh[3]; j3 > 0; ) {
+ if ( j3 < bsize ) {
+ s3 = j3;
+ j3 = 0;
+ } else {
+ s3 = bsize;
+ j3 -= bsize;
+ }
+ dx4 = sx[4] - ( s3*sx[3] );
+ ox3 = ox4 + ( j3*sx[3] );
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ dx3 = sx[3] - ( s2*sx[2] );
+ ox2 = ox3 + ( j2*sx[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dx2 = sx[2] - ( s1*sx[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute the index offset for the first input ndarray element in the current block:
+ ix = ox1 + ( j0*sx[0] );
+
+ // Compute the loop offset increment:
+ dx1 = sx[1] - ( s0*sx[0] );
+
+ // Iterate over the ndarray dimensions...
+ for ( i8 = 0; i8 < s8; i8++ ) {
+ for ( i7 = 0; i7 < s7; i7++ ) {
+ for ( i6 = 0; i6 < s6; i6++ ) {
+ for ( i5 = 0; i5 < s5; i5++ ) {
+ for ( i4 = 0; i4 < s4; i4++ ) {
+ for ( i3 = 0; i3 < s3; i3++ ) {
+ for ( i2 = 0; i2 < s2; i2++ ) {
+ for ( i1 = 0; i1 < s1; i1++ ) {
+ for ( i0 = 0; i0 < s0; i0++ ) {
+ if ( ( xbuf[ ix ] || xbuf[ ix+1 ] ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ ix += dx6;
+ }
+ ix += dx7;
+ }
+ ix += dx8;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = blockedsome9d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/9d_complex.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/9d_complex.js
new file mode 100644
index 000000000000..716323f16575
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/9d_complex.js
@@ -0,0 +1,202 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 max-depth */
+
+'use strict';
+
+// MODULES //
+
+var strides2order = require( '@stdlib/ndarray/base/strides2order' );
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements of a reinterpreted complex number ndarray are truthy.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {string} x.dtype - data type
+* @param {Collection} x.data - data buffer
+* @param {NonNegativeIntegerArray} x.shape - dimensions
+* @param {IntegerArray} x.strides - stride lengths
+* @param {NonNegativeInteger} x.offset - index offset
+* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
+* @param {PositiveInteger} n - number of elements
+* @returns {boolean} boolean indicating whether at least `n` elements are truthy
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 1, 1, 1, 1, 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 8, 8, 8, 8, 8, 8, 8, 4, 2 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'complex128',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Test elements:
+* var out = some9d( x, 4 );
+* // returns true
+*/
+function some9d( x, n ) {
+ var count;
+ var xbuf;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var dx7;
+ var dx8;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var S3;
+ var S4;
+ var S5;
+ var S6;
+ var S7;
+ var S8;
+ var sx;
+ var ix;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+ var i7;
+ var i8;
+
+ // Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...
+ sh = x.shape;
+ sx = x.strides;
+ if ( strides2order( sx ) === 1 ) {
+ // For row-major ndarrays, the last dimensions have the fastest changing indices...
+ S0 = sh[ 8 ];
+ S1 = sh[ 7 ];
+ S2 = sh[ 6 ];
+ S3 = sh[ 5 ];
+ S4 = sh[ 4 ];
+ S5 = sh[ 3 ];
+ S6 = sh[ 2 ];
+ S7 = sh[ 1 ];
+ S8 = sh[ 0 ];
+ dx0 = sx[ 8 ]; // offset increment for innermost loop
+ dx1 = sx[ 7 ] - ( S0*sx[8] );
+ dx2 = sx[ 6 ] - ( S1*sx[7] );
+ dx3 = sx[ 5 ] - ( S2*sx[6] );
+ dx4 = sx[ 4 ] - ( S3*sx[5] );
+ dx5 = sx[ 3 ] - ( S4*sx[4] );
+ dx6 = sx[ 2 ] - ( S5*sx[3] );
+ dx7 = sx[ 1 ] - ( S6*sx[2] );
+ dx8 = sx[ 0 ] - ( S7*sx[1] ); // offset increment for outermost loop
+ } else { // order === 'column-major'
+ // For column-major ndarrays, the first dimensions have the fastest changing indices...
+ S0 = sh[ 0 ];
+ S1 = sh[ 1 ];
+ S2 = sh[ 2 ];
+ S3 = sh[ 3 ];
+ S4 = sh[ 4 ];
+ S5 = sh[ 5 ];
+ S6 = sh[ 6 ];
+ S7 = sh[ 7 ];
+ S8 = sh[ 8 ];
+ dx0 = sx[ 0 ]; // offset increment for innermost loop
+ dx1 = sx[ 1 ] - ( S0*sx[0] );
+ dx2 = sx[ 2 ] - ( S1*sx[1] );
+ dx3 = sx[ 3 ] - ( S2*sx[2] );
+ dx4 = sx[ 4 ] - ( S3*sx[3] );
+ dx5 = sx[ 5 ] - ( S4*sx[4] );
+ dx6 = sx[ 6 ] - ( S5*sx[5] );
+ dx7 = sx[ 7 ] - ( S6*sx[6] );
+ dx8 = sx[ 8 ] - ( S7*sx[7] ); // offset increment for outermost loop
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Initialize a counter:
+ count = 0;
+
+ // Iterate over the ndarray dimensions...
+ for ( i8 = 0; i8 < S8; i8++ ) {
+ for ( i7 = 0; i7 < S7; i7++ ) {
+ for ( i6 = 0; i6 < S6; i6++ ) {
+ for ( i5 = 0; i5 < S5; i5++ ) {
+ for ( i4 = 0; i4 < S4; i4++ ) {
+ for ( i3 = 0; i3 < S3; i3++ ) {
+ for ( i2 = 0; i2 < S2; i2++ ) {
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ if ( ( xbuf[ ix ] || xbuf[ ix+1 ] ) ) {
+ count += 1;
+ if ( count >= n ) {
+ return true;
+ }
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ ix += dx6;
+ }
+ ix += dx7;
+ }
+ ix += dx8;
+ }
+ return false;
+}
+
+
+// EXPORTS //
+
+module.exports = some9d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/index.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/index.js
new file mode 100644
index 000000000000..38f19a993445
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/index.js
@@ -0,0 +1,70 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 `n` elements in an ndarray are truthy.
+*
+* @module @stdlib/ndarray/base/some
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+* var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' );
+* var some = require( '@stdlib/ndarray/base/some' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+*
+* // Define the shape of the input array:
+* var shape = [ 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 4, 4, 1 ];
+*
+* // Define the index offset:
+* var ox = 1;
+*
+* // Create an input ndarray-like object:
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Define the success criterion:
+* var n = scalar2ndarray( 3, {
+* 'dtype': 'generic'
+* });
+*
+* // Test elements:
+* var out = some( [ x, n ] );
+* // returns true
+*/
+
+// MODULES //
+
+var main = require( './main.js' );
+
+
+// EXPORTS //
+
+module.exports = main;
diff --git a/lib/node_modules/@stdlib/ndarray/base/some/lib/main.js b/lib/node_modules/@stdlib/ndarray/base/some/lib/main.js
new file mode 100644
index 000000000000..8249e2628a0b
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/some/lib/main.js
@@ -0,0 +1,391 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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 isComplexArray = require( '@stdlib/array/base/assert/is-complex-typed-array' );
+var isBooleanArray = require( '@stdlib/array/base/assert/is-booleanarray' );
+var iterationOrder = require( '@stdlib/ndarray/base/iteration-order' );
+var minmaxViewBufferIndex = require( '@stdlib/ndarray/base/minmax-view-buffer-index' );
+var ndarray2object = require( '@stdlib/ndarray/base/ndarraylike2object' );
+var reinterpretComplex = require( '@stdlib/strided/base/reinterpret-complex' );
+var reinterpretBoolean = require( '@stdlib/strided/base/reinterpret-boolean' );
+var gscal = require( '@stdlib/blas/base/gscal' );
+var blockedaccessorsome2d = require( './2d_blocked_accessors.js' );
+var blockedaccessorsome3d = require( './3d_blocked_accessors.js' );
+var blockedaccessorsome4d = require( './4d_blocked_accessors.js' );
+var blockedaccessorsome5d = require( './5d_blocked_accessors.js' );
+var blockedaccessorsome6d = require( './6d_blocked_accessors.js' );
+var blockedaccessorsome7d = require( './7d_blocked_accessors.js' );
+var blockedaccessorsome8d = require( './8d_blocked_accessors.js' );
+var blockedaccessorsome9d = require( './9d_blocked_accessors.js' );
+var blockedaccessorsome10d = require( './10d_blocked_accessors.js' );
+var blockedcomplexsome2d = require( './2d_blocked_complex.js' );
+var blockedcomplexsome3d = require( './3d_blocked_complex.js' );
+var blockedcomplexsome4d = require( './4d_blocked_complex.js' );
+var blockedcomplexsome5d = require( './5d_blocked_complex.js' );
+var blockedcomplexsome6d = require( './6d_blocked_complex.js' );
+var blockedcomplexsome7d = require( './7d_blocked_complex.js' );
+var blockedcomplexsome8d = require( './8d_blocked_complex.js' );
+var blockedcomplexsome9d = require( './9d_blocked_complex.js' );
+var blockedcomplexsome10d = require( './10d_blocked_complex.js' );
+var blockedsome2d = require( './2d_blocked.js' );
+var blockedsome3d = require( './3d_blocked.js' );
+var blockedsome4d = require( './4d_blocked.js' );
+var blockedsome5d = require( './5d_blocked.js' );
+var blockedsome6d = require( './6d_blocked.js' );
+var blockedsome7d = require( './7d_blocked.js' );
+var blockedsome8d = require( './8d_blocked.js' );
+var blockedsome9d = require( './9d_blocked.js' );
+var blockedsome10d = require( './10d_blocked.js' );
+var accessorsome0d = require( './0d_accessors.js' );
+var accessorsome1d = require( './1d_accessors.js' );
+var accessorsome2d = require( './2d_accessors.js' );
+var accessorsome3d = require( './3d_accessors.js' );
+var accessorsome4d = require( './4d_accessors.js' );
+var accessorsome5d = require( './5d_accessors.js' );
+var accessorsome6d = require( './6d_accessors.js' );
+var accessorsome7d = require( './7d_accessors.js' );
+var accessorsome8d = require( './8d_accessors.js' );
+var accessorsome9d = require( './9d_accessors.js' );
+var accessorsome10d = require( './10d_accessors.js' );
+var accessorsomend = require( './nd_accessors.js' );
+var complexsome0d = require( './0d_complex.js' );
+var complexsome1d = require( './1d_complex.js' );
+var complexsome2d = require( './2d_complex.js' );
+var complexsome3d = require( './3d_complex.js' );
+var complexsome4d = require( './4d_complex.js' );
+var complexsome5d = require( './5d_complex.js' );
+var complexsome6d = require( './6d_complex.js' );
+var complexsome7d = require( './7d_complex.js' );
+var complexsome8d = require( './8d_complex.js' );
+var complexsome9d = require( './9d_complex.js' );
+var complexsome10d = require( './10d_complex.js' );
+var complexsomend = require( './nd_complex.js' );
+var some0d = require( './0d.js' );
+var some1d = require( './1d.js' );
+var some2d = require( './2d.js' );
+var some3d = require( './3d.js' );
+var some4d = require( './4d.js' );
+var some5d = require( './5d.js' );
+var some6d = require( './6d.js' );
+var some7d = require( './7d.js' );
+var some8d = require( './8d.js' );
+var some9d = require( './9d.js' );
+var some10d = require( './10d.js' );
+var somend = require( './nd.js' );
+
+
+// VARIABLES //
+
+var SOME = [
+ some0d,
+ some1d,
+ some2d,
+ some3d,
+ some4d,
+ some5d,
+ some6d,
+ some7d,
+ some8d,
+ some9d,
+ some10d,
+ somend
+];
+var ACCESSOR_SOME = [
+ accessorsome0d,
+ accessorsome1d,
+ accessorsome2d,
+ accessorsome3d,
+ accessorsome4d,
+ accessorsome5d,
+ accessorsome6d,
+ accessorsome7d,
+ accessorsome8d,
+ accessorsome9d,
+ accessorsome10d,
+ accessorsomend
+];
+var COMPLEX_SOME = [
+ complexsome0d,
+ complexsome1d,
+ complexsome2d,
+ complexsome3d,
+ complexsome4d,
+ complexsome5d,
+ complexsome6d,
+ complexsome7d,
+ complexsome8d,
+ complexsome9d,
+ complexsome10d,
+ complexsomend
+];
+var BLOCKED_SOME = [
+ blockedsome2d, // 0
+ blockedsome3d,
+ blockedsome4d,
+ blockedsome5d,
+ blockedsome6d,
+ blockedsome7d,
+ blockedsome8d,
+ blockedsome9d,
+ blockedsome10d // 8
+];
+var BLOCKED_ACCESSOR_SOME = [
+ blockedaccessorsome2d, // 0
+ blockedaccessorsome3d,
+ blockedaccessorsome4d,
+ blockedaccessorsome5d,
+ blockedaccessorsome6d,
+ blockedaccessorsome7d,
+ blockedaccessorsome8d,
+ blockedaccessorsome9d,
+ blockedaccessorsome10d // 8
+];
+var BLOCKED_COMPLEX_SOME = [
+ blockedcomplexsome2d, // 0
+ blockedcomplexsome3d,
+ blockedcomplexsome4d,
+ blockedcomplexsome5d,
+ blockedcomplexsome6d,
+ blockedcomplexsome7d,
+ blockedcomplexsome8d,
+ blockedcomplexsome9d,
+ blockedcomplexsome10d // 8
+];
+var MAX_DIMS = SOME.length - 1;
+
+
+// MAIN //
+
+/**
+* Tests whether at least `n` elements in an ndarray are truthy.
+*
+* ## Notes
+*
+* - A provided ndarray should be an object with the following properties:
+*
+* - **dtype**: data type.
+* - **data**: data buffer.
+* - **shape**: dimensions.
+* - **strides**: stride lengths.
+* - **offset**: index offset.
+* - **order**: specifies whether an ndarray is row-major (C-style) or column major (Fortran-style).
+*
+* @param {ArrayLikeObject