diff --git a/lib/node_modules/@stdlib/ndarray/base/find/README.md b/lib/node_modules/@stdlib/ndarray/base/find/README.md
new file mode 100644
index 000000000000..728cb41f5ac3
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/README.md
@@ -0,0 +1,246 @@
+
+
+# find
+
+> Return the first element in an ndarray which passes a test implemented by a predicate function.
+
+
+
+
+
+
+
+## Usage
+
+
+
+```javascript
+var find = require( '@stdlib/ndarray/base/find' );
+```
+
+
+
+#### find( arrays, predicate\[, thisArg] )
+
+Returns the first element in an ndarray which passes a test implemented by a predicate function.
+
+
+
+```javascript
+var Float64Array = require( '@stdlib/array/float64' );
+
+function isEven( value ) {
+ return value % 2.0 === 0.0;
+}
+
+// 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 = 0;
+
+// Create the input ndarray-like object:
+var x = {
+ 'dtype': 'float64',
+ 'data': xbuf,
+ 'shape': shape,
+ 'strides': sx,
+ 'offset': ox,
+ 'order': 'row-major'
+};
+
+// Create an ndarray-like object containing a sentinel value:
+var sentinelValue = {
+ 'dtype': 'float64',
+ 'data': new Float64Array( [ NaN ] ),
+ 'shape': [],
+ 'strides': [ 0 ],
+ 'offset': 0,
+ 'order': 'row-major'
+};
+
+// Perform reduction:
+var out = find( [ x, sentinelValue ], isEven );
+// returns 2.0
+```
+
+The function accepts the following arguments:
+
+- **arrays**: array-like object containing an input ndarray and a zero-dimensional ndarray containing a sentinel value. The sentinel value is returned when no element in an input ndarray passes a test implemented by the predicate function.
+- **predicate**: predicate function.
+- **thisArg**: predicate function execution context (_optional_).
+
+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).
+
+The predicate function is provided the following arguments:
+
+- **value**: current array element.
+- **indices**: current array element indices.
+- **arr**: the input ndarray.
+
+To set the predicate function execution context, provide a `thisArg`.
+
+
+
+```javascript
+var Float64Array = require( '@stdlib/array/float64' );
+
+function isEven( value ) {
+ this.count += 1;
+ return value % 2.0 === 0.0;
+}
+
+// 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 = 0;
+
+// Create the input ndarray-like object:
+var x = {
+ 'dtype': 'float64',
+ 'data': xbuf,
+ 'shape': shape,
+ 'strides': sx,
+ 'offset': ox,
+ 'order': 'row-major'
+};
+
+// Create an ndarray-like object containing a sentinel value:
+var sentinelValue = {
+ 'dtype': 'float64',
+ 'data': new Float64Array( [ NaN ] ),
+ 'shape': [],
+ 'strides': [ 0 ],
+ 'offset': 0,
+ 'order': 'row-major'
+};
+
+var ctx = {
+ 'count': 0
+};
+
+// Perform reduction:
+var out = find( [ x, sentinelValue ], isEven, ctx );
+// returns 2.0
+
+var count = ctx.count;
+// returns 2
+```
+
+
+
+
+
+
+
+## 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 Float64Array = require( '@stdlib/array/float64' );
+var ndarray2array = require( '@stdlib/ndarray/base/to-array' );
+var find = require( '@stdlib/ndarray/base/find' );
+
+function isEven( value ) {
+ return value % 2.0 === 0.0;
+}
+
+var x = {
+ 'dtype': 'float64',
+ 'data': discreteUniform( 10, 0.0, 10.0, {
+ 'dtype': 'float64'
+ }),
+ '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 sv = {
+ 'dtype': 'float64',
+ 'data': new Float64Array( [ NaN ] ),
+ 'shape': [],
+ 'strides': [ 0 ],
+ 'offset': 0,
+ 'order': x.order
+};
+console.log( 'Sentinel Value: %d', sv.data[ 0 ] );
+
+var out = find( [ x, sv ], isEven );
+console.log( out );
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.10d_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.10d_columnmajor.js
new file mode 100644
index 000000000000..0a3201158af7
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.10d_columnmajor.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';
+
+/* eslint-disable stdlib/no-redeclare */
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var isInteger = require( '@stdlib/math/base/assert/is-integer' );
+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 find = require( './../lib/10d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Callback function.
+*
+* @param {*} value - ndarray element
+* @returns {boolean} result
+*/
+function clbk( value ) {
+ return value < 0.0;
+}
+
+/**
+* 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, {
+ 'dtype': xtype
+ });
+ 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 = find( x, NaN, clbk );
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ }
+ b.toc();
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ 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, 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/find/benchmark/benchmark.10d_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.10d_rowmajor.js
new file mode 100644
index 000000000000..6dd30721890d
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.10d_rowmajor.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';
+
+/* eslint-disable stdlib/no-redeclare */
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var isInteger = require( '@stdlib/math/base/assert/is-integer' );
+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 find = require( './../lib/10d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Callback function.
+*
+* @param {*} value - ndarray element
+* @returns {boolean} result
+*/
+function clbk( value ) {
+ return value < 0.0;
+}
+
+/**
+* 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, {
+ 'dtype': xtype
+ });
+ 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 = find( x, NaN, clbk );
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ }
+ b.toc();
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ 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, 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/find/benchmark/benchmark.11d_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.11d_columnmajor.js
new file mode 100644
index 000000000000..a3112f6151df
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.11d_columnmajor.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';
+
+/* eslint-disable stdlib/no-redeclare */
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var isInteger = require( '@stdlib/math/base/assert/is-integer' );
+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 find = require( './../lib/nd.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Callback function.
+*
+* @param {*} value - ndarray element
+* @returns {boolean} result
+*/
+function clbk( value ) {
+ return value < 0.0;
+}
+
+/**
+* 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, {
+ 'dtype': xtype
+ });
+ 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 = find( x, NaN, clbk );
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ }
+ b.toc();
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ 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, 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/find/benchmark/benchmark.11d_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.11d_rowmajor.js
new file mode 100644
index 000000000000..65bb86bbebb8
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.11d_rowmajor.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';
+
+/* eslint-disable stdlib/no-redeclare */
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var isInteger = require( '@stdlib/math/base/assert/is-integer' );
+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 find = require( './../lib/nd.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Callback function.
+*
+* @param {*} value - ndarray element
+* @returns {boolean} result
+*/
+function clbk( value ) {
+ return value < 0.0;
+}
+
+/**
+* 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, {
+ 'dtype': xtype
+ });
+ 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 = find( x, NaN, clbk );
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ }
+ b.toc();
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ 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, 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/find/benchmark/benchmark.1d_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.1d_columnmajor.js
new file mode 100644
index 000000000000..e36c2b5c3189
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.1d_columnmajor.js
@@ -0,0 +1,146 @@
+/**
+* @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 stdlib/no-redeclare */
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var isInteger = require( '@stdlib/math/base/assert/is-integer' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var filledarray = require( '@stdlib/array/filled' );
+var pkg = require( './../package.json' ).name;
+var find = require( './../lib' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Callback function.
+*
+* @param {*} value - ndarray element
+* @returns {boolean} result
+*/
+function clbk( value ) {
+ return value < 0.0;
+}
+
+/**
+* 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 sv;
+ var x;
+
+ x = discreteUniform( len, 1, 100, {
+ 'dtype': xtype
+ });
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ sv = {
+ 'dtype': xtype,
+ 'data': filledarray( NaN, 1, xtype ),
+ 'shape': [],
+ 'strides': [ 0 ],
+ '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 = find( [ x, sv ], clbk );
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ }
+ b.toc();
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ 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 ];
+ 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/find/benchmark/benchmark.1d_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.1d_rowmajor.js
new file mode 100644
index 000000000000..e005048bba96
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.1d_rowmajor.js
@@ -0,0 +1,146 @@
+/**
+* @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 stdlib/no-redeclare */
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var isInteger = require( '@stdlib/math/base/assert/is-integer' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var filledarray = require( '@stdlib/array/filled' );
+var pkg = require( './../package.json' ).name;
+var find = require( './../lib' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Callback function.
+*
+* @param {*} value - ndarray element
+* @returns {boolean} result
+*/
+function clbk( value ) {
+ return value < 0.0;
+}
+
+/**
+* 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 sv;
+ var x;
+
+ x = discreteUniform( len, 1, 100, {
+ 'dtype': xtype
+ });
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ sv = {
+ 'dtype': xtype,
+ 'data': filledarray( NaN, 1, xtype ),
+ 'shape': [],
+ 'strides': [ 0 ],
+ '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 = find( [ x, sv ], clbk );
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ }
+ b.toc();
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ 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 ];
+ 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/find/benchmark/benchmark.2d_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.2d_columnmajor.js
new file mode 100644
index 000000000000..5cfffc2970f4
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.2d_columnmajor.js
@@ -0,0 +1,148 @@
+/**
+* @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 stdlib/no-redeclare */
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var isInteger = require( '@stdlib/math/base/assert/is-integer' );
+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 find = require( './../lib/2d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Callback function.
+*
+* @param {*} value - ndarray element
+* @returns {boolean} result
+*/
+function clbk( value ) {
+ return value < 0.0;
+}
+
+/**
+* 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, {
+ 'dtype': xtype
+ });
+ 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 = find( x, NaN, clbk );
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ }
+ b.toc();
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ 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+':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/find/benchmark/benchmark.2d_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.2d_rowmajor.js
new file mode 100644
index 000000000000..1ff8ac2286e7
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.2d_rowmajor.js
@@ -0,0 +1,148 @@
+/**
+* @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 stdlib/no-redeclare */
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var isInteger = require( '@stdlib/math/base/assert/is-integer' );
+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 find = require( './../lib/2d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Callback function.
+*
+* @param {*} value - ndarray element
+* @returns {boolean} result
+*/
+function clbk( value ) {
+ return value < 0.0;
+}
+
+/**
+* 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, {
+ 'dtype': xtype
+ });
+ 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 = find( x, NaN, clbk );
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ }
+ b.toc();
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ 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+':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/find/benchmark/benchmark.2d_rowmajor_accessors.js b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.2d_rowmajor_accessors.js
new file mode 100644
index 000000000000..13dda7453041
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.2d_rowmajor_accessors.js
@@ -0,0 +1,174 @@
+/**
+* @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 stdlib/no-redeclare */
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var isInteger = require( '@stdlib/math/base/assert/is-integer' );
+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 find = require( './../lib/2d_accessors.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Callback function.
+*
+* @param {*} value - ndarray element
+* @returns {boolean} result
+*/
+function clbk( value ) {
+ return value < 0.0;
+}
+
+/**
+* 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, {
+ 'dtype': xtype
+ });
+ 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 = find( x, NaN, clbk );
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ }
+ b.toc();
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ 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/find/benchmark/benchmark.3d_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.3d_columnmajor.js
new file mode 100644
index 000000000000..5969a47cf871
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.3d_columnmajor.js
@@ -0,0 +1,148 @@
+/**
+* @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 stdlib/no-redeclare */
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var isInteger = require( '@stdlib/math/base/assert/is-integer' );
+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 find = require( './../lib/3d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Callback function.
+*
+* @param {*} value - ndarray element
+* @returns {boolean} result
+*/
+function clbk( value ) {
+ return value < 0.0;
+}
+
+/**
+* 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, {
+ 'dtype': xtype
+ });
+ 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 = find( x, NaN, clbk );
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ }
+ b.toc();
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ 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, 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/find/benchmark/benchmark.3d_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.3d_rowmajor.js
new file mode 100644
index 000000000000..161f35c3f52c
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.3d_rowmajor.js
@@ -0,0 +1,148 @@
+/**
+* @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 stdlib/no-redeclare */
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var isInteger = require( '@stdlib/math/base/assert/is-integer' );
+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 find = require( './../lib/3d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Callback function.
+*
+* @param {*} value - ndarray element
+* @returns {boolean} result
+*/
+function clbk( value ) {
+ return value < 0.0;
+}
+
+/**
+* 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, {
+ 'dtype': xtype
+ });
+ 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 = find( x, NaN, clbk );
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ }
+ b.toc();
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ 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, 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/find/benchmark/benchmark.4d_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.4d_columnmajor.js
new file mode 100644
index 000000000000..43b0eeeed54c
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.4d_columnmajor.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';
+
+/* eslint-disable stdlib/no-redeclare */
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var isInteger = require( '@stdlib/math/base/assert/is-integer' );
+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 find = require( './../lib/4d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Callback function.
+*
+* @param {*} value - ndarray element
+* @returns {boolean} result
+*/
+function clbk( value ) {
+ return value < 0.0;
+}
+
+/**
+* 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, {
+ 'dtype': xtype
+ });
+ 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 = find( x, NaN, clbk );
+ if ( isInteger( out ) ) {
+ b.fail( 'should return an integer' );
+ }
+ }
+ b.toc();
+ if ( isInteger( out ) ) {
+ b.fail( 'should return an integer' );
+ }
+ 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, 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/find/benchmark/benchmark.4d_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.4d_rowmajor.js
new file mode 100644
index 000000000000..b469f3225cf5
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.4d_rowmajor.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';
+
+/* eslint-disable stdlib/no-redeclare */
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var isInteger = require( '@stdlib/math/base/assert/is-integer' );
+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 find = require( './../lib/4d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Callback function.
+*
+* @param {*} value - ndarray element
+* @returns {boolean} result
+*/
+function clbk( value ) {
+ return value < 0.0;
+}
+
+/**
+* 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, {
+ 'dtype': xtype
+ });
+ 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 = find( x, NaN, clbk );
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ }
+ b.toc();
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ 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, 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/find/benchmark/benchmark.5d_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.5d_columnmajor.js
new file mode 100644
index 000000000000..ded1f8a7c997
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.5d_columnmajor.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';
+
+/* eslint-disable stdlib/no-redeclare */
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var isInteger = require( '@stdlib/math/base/assert/is-integer' );
+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 find = require( './../lib/5d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Callback function.
+*
+* @param {*} value - ndarray element
+* @returns {boolean} result
+*/
+function clbk( value ) {
+ return value < 0.0;
+}
+
+/**
+* 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, {
+ 'dtype': xtype
+ });
+ 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 = find( x, NaN, clbk );
+ if ( isInteger( out ) ) {
+ b.fail( 'should return an integer' );
+ }
+ }
+ b.toc();
+ if ( isInteger( out ) ) {
+ b.fail( 'should return an integer' );
+ }
+ 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, 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/find/benchmark/benchmark.5d_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.5d_rowmajor.js
new file mode 100644
index 000000000000..9d0fbd1b7f28
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.5d_rowmajor.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';
+
+/* eslint-disable stdlib/no-redeclare */
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var isInteger = require( '@stdlib/math/base/assert/is-integer' );
+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 find = require( './../lib/5d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Callback function.
+*
+* @param {*} value - ndarray element
+* @returns {boolean} result
+*/
+function clbk( value ) {
+ return value < 0.0;
+}
+
+/**
+* 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, {
+ 'dtype': xtype
+ });
+ 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 = find( x, NaN, clbk );
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ }
+ b.toc();
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ 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, 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/find/benchmark/benchmark.6d_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.6d_columnmajor.js
new file mode 100644
index 000000000000..d5c725df4e24
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.6d_columnmajor.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';
+
+/* eslint-disable stdlib/no-redeclare */
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var isInteger = require( '@stdlib/math/base/assert/is-integer' );
+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 find = require( './../lib/6d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Callback function.
+*
+* @param {*} value - ndarray element
+* @returns {boolean} result
+*/
+function clbk( value ) {
+ return value < 0.0;
+}
+
+/**
+* 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, {
+ 'dtype': xtype
+ });
+ 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 = find( x, NaN, clbk );
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ }
+ b.toc();
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ 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, 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/find/benchmark/benchmark.6d_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.6d_rowmajor.js
new file mode 100644
index 000000000000..faade617d98f
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.6d_rowmajor.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';
+
+/* eslint-disable stdlib/no-redeclare */
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var isInteger = require( '@stdlib/math/base/assert/is-integer' );
+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 find = require( './../lib/6d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Callback function.
+*
+* @param {*} value - ndarray element
+* @returns {boolean} result
+*/
+function clbk( value ) {
+ return value < 0.0;
+}
+
+/**
+* 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, {
+ 'dtype': xtype
+ });
+ 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 = find( x, NaN, clbk );
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ }
+ b.toc();
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ 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, 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/find/benchmark/benchmark.7d_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.7d_columnmajor.js
new file mode 100644
index 000000000000..f5af07908b80
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.7d_columnmajor.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';
+
+/* eslint-disable stdlib/no-redeclare */
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var isInteger = require( '@stdlib/math/base/assert/is-integer' );
+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 find = require( './../lib/7d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Callback function.
+*
+* @param {*} value - ndarray element
+* @returns {boolean} result
+*/
+function clbk( value ) {
+ return value < 0.0;
+}
+
+/**
+* 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, {
+ 'dtype': xtype
+ });
+ 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 = find( x, NaN, clbk );
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ }
+ b.toc();
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ 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, 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/find/benchmark/benchmark.7d_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.7d_rowmajor.js
new file mode 100644
index 000000000000..4243ef0f9a93
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.7d_rowmajor.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';
+
+/* eslint-disable stdlib/no-redeclare */
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var isInteger = require( '@stdlib/math/base/assert/is-integer' );
+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 find = require( './../lib/7d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Callback function.
+*
+* @param {*} value - ndarray element
+* @returns {boolean} result
+*/
+function clbk( value ) {
+ return value < 0.0;
+}
+
+/**
+* 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, {
+ 'dtype': xtype
+ });
+ 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 = find( x, NaN, clbk );
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ }
+ b.toc();
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ 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, 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/find/benchmark/benchmark.8d_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.8d_columnmajor.js
new file mode 100644
index 000000000000..b53127b76e9c
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.8d_columnmajor.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';
+
+/* eslint-disable stdlib/no-redeclare */
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var isInteger = require( '@stdlib/math/base/assert/is-integer' );
+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 find = require( './../lib/8d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Callback function.
+*
+* @param {*} value - ndarray element
+* @returns {boolean} result
+*/
+function clbk( value ) {
+ return value < 0.0;
+}
+
+/**
+* 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, {
+ 'dtype': xtype
+ });
+ 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 = find( x, NaN, clbk );
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ }
+ b.toc();
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ 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, 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/find/benchmark/benchmark.8d_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.8d_rowmajor.js
new file mode 100644
index 000000000000..d17432230202
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.8d_rowmajor.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';
+
+/* eslint-disable stdlib/no-redeclare */
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var isInteger = require( '@stdlib/math/base/assert/is-integer' );
+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 find = require( './../lib/8d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Callback function.
+*
+* @param {*} value - ndarray element
+* @returns {boolean} result
+*/
+function clbk( value ) {
+ return value < 0.0;
+}
+
+/**
+* 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, {
+ 'dtype': xtype
+ });
+ 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 = find( x, NaN, clbk );
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ }
+ b.toc();
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ 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, 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/find/benchmark/benchmark.9d_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.9d_columnmajor.js
new file mode 100644
index 000000000000..1c1e73d81675
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.9d_columnmajor.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';
+
+/* eslint-disable stdlib/no-redeclare */
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var isInteger = require( '@stdlib/math/base/assert/is-integer' );
+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 find = require( './../lib/9d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Callback function.
+*
+* @param {*} value - ndarray element
+* @returns {boolean} result
+*/
+function clbk( value ) {
+ return value < 0.0;
+}
+
+/**
+* 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, {
+ 'dtype': xtype
+ });
+ 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 = find( x, NaN, clbk );
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ }
+ b.toc();
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ 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, 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/find/benchmark/benchmark.9d_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.9d_rowmajor.js
new file mode 100644
index 000000000000..8cf2ea6a4765
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/benchmark/benchmark.9d_rowmajor.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';
+
+/* eslint-disable stdlib/no-redeclare */
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var isInteger = require( '@stdlib/math/base/assert/is-integer' );
+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 find = require( './../lib/9d.js' );
+
+
+// VARIABLES //
+
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Callback function.
+*
+* @param {*} value - ndarray element
+* @returns {boolean} result
+*/
+function clbk( value ) {
+ return value < 0.0;
+}
+
+/**
+* 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, {
+ 'dtype': xtype
+ });
+ 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 = find( x, NaN, clbk );
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ }
+ b.toc();
+ if ( isInteger( out ) ) {
+ b.fail( 'should not return an integer' );
+ }
+ 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, 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/find/docs/repl.txt b/lib/node_modules/@stdlib/ndarray/base/find/docs/repl.txt
new file mode 100644
index 000000000000..f94c2642a8fa
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/docs/repl.txt
@@ -0,0 +1,62 @@
+
+{{alias}}( arrays, predicate[, thisArg] )
+ Returns the first element in an ndarray which passes a test implemented by a
+ predicate function.
+
+ 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).
+
+ The predicate function is provided the following arguments:
+
+ - value: current array element.
+ - indices: current array element indices.
+ - arr: the input ndarray.
+
+ Parameters
+ ----------
+ arrays: ArrayLikeObject
+ Array-like object containing an input ndarray and a zero-dimensional
+ ndarray containing a sentinel value. The sentinel value is returned when
+ no element in an input ndarray passes a test implemented by the
+ predicate function.
+
+ predicate: Function
+ Predicate function.
+
+ thisArg: any (optional)
+ Predicate function execution context.
+
+ Returns
+ -------
+ out: any
+ Result.
+
+ Examples
+ --------
+ // Define a callback...
+ > function clbk( v ) { return v % 2.0 === 0.0; };
+
+ // Define ndarray data and meta data...
+ > var xbuf = new {{alias:@stdlib/array/float64}}( [ 1.0, 2.0, 3.0, 4.0 ] );
+ > var dt = 'float64';
+ > var sh = [ 2, 2 ];
+ > var sx = [ 2, 1 ];
+ > var ox = 0;
+ > var ord = 'row-major';
+
+ // Perform operation...
+ > var x = {{alias:@stdlib/ndarray/ctor}}( dt, xbuf, sh, sx, ox, ord );
+ > var sv = {{alias:@stdlib/ndarray/from-scalar}}( NaN, { 'dtype': dt } );
+ > {{alias}}( [ x, sv ], clbk )
+ 2.0
+
+ See Also
+ --------
+
diff --git a/lib/node_modules/@stdlib/ndarray/base/find/docs/types/index.d.ts b/lib/node_modules/@stdlib/ndarray/base/find/docs/types/index.d.ts
new file mode 100644
index 000000000000..c51797739dd9
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/docs/types/index.d.ts
@@ -0,0 +1,119 @@
+/*
+* @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 { typedndarray } from '@stdlib/types/ndarray';
+
+/**
+* Returns a boolean indicating whether an element passes a test.
+*
+* @returns boolean indicating whether an ndarray element passes a test
+*/
+type Nullary = ( this: ThisArg ) => boolean;
+
+/**
+* Returns a boolean indicating whether an element passes a test.
+*
+* @param value - current array element
+* @returns boolean indicating whether an ndarray element passes a test
+*/
+type Unary = ( this: ThisArg, value: T ) => boolean;
+
+/**
+* Returns a boolean indicating whether an element passes a test.
+*
+* @param value - current array element
+* @param indices - current array element indices
+* @returns boolean indicating whether an ndarray element passes a test
+*/
+type Binary = ( this: ThisArg, value: T, indices: Array ) => boolean;
+
+/**
+* Returns a boolean indicating whether an element passes a test.
+*
+* @param value - current array element
+* @param indices - current array element indices
+* @param arr - input array
+* @returns boolean indicating whether an ndarray element passes a test
+*/
+type Ternary = ( this: ThisArg, value: T, indices: Array, arr: U ) => boolean;
+
+/**
+* Returns a boolean indicating whether an element passes a test.
+*
+* @param value - current array element
+* @param indices - current array element indices
+* @param arr - input array
+* @returns boolean indicating whether an ndarray element passes a test
+*/
+type Predicate = Nullary | Unary | Binary | Ternary;
+
+/**
+* Returns the first element in an ndarray which passes a test implemented by a predicate function.
+*
+* ## Notes
+*
+* - The function returns the sentinel value if no element in an input ndarray passes a test implemented by a predicate function.
+*
+* @param arrays - array-like object containing an input ndarray and a zero-dimensional ndarray containing a sentinel value
+* @param predicate - predicate function
+* @param thisArg - predicate function execution context
+* @returns result
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+* var ndarray = require( '@stdlib/ndarray/ctor' );
+* var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' );
+*
+* function predicate( value ) {
+* return value % 2.0 === 0.0;
+* }
+*
+* // Create data buffers:
+* 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 = 0;
+*
+* // Create the input ndarray:
+* var x = ndarray( 'float64', xbuf, shape, sx, ox, 'row-major' );
+*
+* // Create a zero-dimensional ndarray containing a sentinel value:
+* var sv = scalar2ndarray( NaN, {
+* 'dtype': 'float64'
+* });
+*
+* // Perform reduction:
+* var out = find( [ x, sv ], predicate );
+* // returns 2.0
+*/
+declare function find = typedndarray, V = unknown, ThisArg = unknown >( arrays: [ typedndarray, typedndarray ], predicate: Predicate, thisArg?: ThisParameterType> ): T | V;
+
+
+// EXPORTS //
+
+export = find;
diff --git a/lib/node_modules/@stdlib/ndarray/base/find/docs/types/test.ts b/lib/node_modules/@stdlib/ndarray/base/find/docs/types/test.ts
new file mode 100644
index 000000000000..f878d9f050ef
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/docs/types/test.ts
@@ -0,0 +1,114 @@
+/*
+* @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 scalar2ndarray = require( '@stdlib/ndarray/from-scalar' );
+import find = require( './index' );
+
+/**
+* Predicate function.
+*
+* @param v - ndarray element
+* @returns result
+*/
+function clbk( v: any ): boolean {
+ return v > 0.0;
+}
+
+
+// TESTS //
+
+// The function returns a number...
+{
+ const x = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+ const sv = scalar2ndarray( NaN, {
+ 'dtype': 'float64'
+ });
+
+ find( [ x, sv ], clbk ); // $ExpectType number
+ find( [ x, sv ], clbk, {} ); // $ExpectType number
+}
+
+// The compiler throws an error if the function is provided a first argument which is not an array-like object containing ndarray-like objects...
+{
+ find( 5, clbk ); // $ExpectError
+ find( true, clbk ); // $ExpectError
+ find( false, clbk ); // $ExpectError
+ find( null, clbk ); // $ExpectError
+ find( undefined, clbk ); // $ExpectError
+ find( {}, clbk ); // $ExpectError
+ find( [ 1 ], clbk ); // $ExpectError
+ find( ( x: number ): number => x, clbk ); // $ExpectError
+
+ find( 5, clbk, {} ); // $ExpectError
+ find( true, clbk, {} ); // $ExpectError
+ find( false, clbk, {} ); // $ExpectError
+ find( null, clbk, {} ); // $ExpectError
+ find( undefined, clbk, {} ); // $ExpectError
+ find( {}, clbk, {} ); // $ExpectError
+ find( [ 1 ], clbk, {} ); // $ExpectError
+ find( ( x: number ): number => x, clbk, {} ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a second argument which is not a callback function...
+{
+ const x = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+ const sv = scalar2ndarray( NaN, {
+ 'dtype': 'float64'
+ });
+
+ find( [ x, sv ], '10' ); // $ExpectError
+ find( [ x, sv ], 5 ); // $ExpectError
+ find( [ x, sv ], true ); // $ExpectError
+ find( [ x, sv ], false ); // $ExpectError
+ find( [ x, sv ], null ); // $ExpectError
+ find( [ x, sv ], undefined ); // $ExpectError
+ find( [ x, sv ], [] ); // $ExpectError
+ find( [ x, sv ], {} ); // $ExpectError
+
+ find( [ x, sv ], '10', {} ); // $ExpectError
+ find( [ x, sv ], 5, {} ); // $ExpectError
+ find( [ x, sv ], true, {} ); // $ExpectError
+ find( [ x, sv ], false, {} ); // $ExpectError
+ find( [ x, sv ], null, {} ); // $ExpectError
+ find( [ x, sv ], undefined, {} ); // $ExpectError
+ find( [ x, sv ], [], {} ); // $ExpectError
+ find( [ x, sv ], {}, {} ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an unsupported number of arguments...
+{
+ const x = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+ const sv = scalar2ndarray( NaN, {
+ 'dtype': 'float64'
+ });
+
+ find(); // $ExpectError
+ find( [ x, sv ] ); // $ExpectError
+ find( [ x, sv ], clbk, {}, {} ); // $ExpectError
+}
diff --git a/lib/node_modules/@stdlib/ndarray/base/find/examples/index.js b/lib/node_modules/@stdlib/ndarray/base/find/examples/index.js
new file mode 100644
index 000000000000..ca4ccc10201f
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/examples/index.js
@@ -0,0 +1,55 @@
+/**
+* @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 stdlib/no-redeclare */
+
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var Float64Array = require( '@stdlib/array/float64' );
+var ndarray2array = require( '@stdlib/ndarray/base/to-array' );
+var find = require( './../lib' );
+
+function isEven( value ) {
+ return value % 2.0 === 0.0;
+}
+
+var x = {
+ 'dtype': 'float64',
+ 'data': discreteUniform( 10, 0.0, 10.0, {
+ 'dtype': 'float64'
+ }),
+ '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 sv = {
+ 'dtype': 'float64',
+ 'data': new Float64Array( [ NaN ] ),
+ 'shape': [],
+ 'strides': [ 0 ],
+ 'offset': 0,
+ 'order': x.order
+};
+console.log( 'Sentinel Value: %d', sv.data[ 0 ] );
+
+var out = find( [ x, sv ], isEven );
+console.log( out );
diff --git a/lib/node_modules/@stdlib/ndarray/base/find/lib/0d.js b/lib/node_modules/@stdlib/ndarray/base/find/lib/0d.js
new file mode 100644
index 000000000000..d3401467846b
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/lib/0d.js
@@ -0,0 +1,84 @@
+/**
+* @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 //
+
+/**
+* Returns the first element in an ndarray which passes a test implemented by a predicate function.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {ndarrayLike} x.ref - reference to the original ndarray-like object
+* @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 {*} sentinelValue - sentinel value
+* @param {Function} predicate - predicate function
+* @param {*} thisArg - predicate function execution context
+* @returns {*} result
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* function predicate( value ) {
+* return value % 2.0 === 0.0;
+* }
+*
+* // 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 the input ndarray-like object:
+* var x = {
+* 'ref': null,
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Perform operation:
+* var out = find0d( x, NaN, predicate, {} );
+* // returns 2.0
+*/
+function find0d( x, sentinelValue, predicate, thisArg ) {
+ if ( predicate.call( thisArg, x.data[ x.offset ], [], x.ref ) ) {
+ return x.data[ x.offset ];
+ }
+ return sentinelValue;
+}
+
+
+// EXPORTS //
+
+module.exports = find0d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/find/lib/0d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/find/lib/0d_accessors.js
new file mode 100644
index 000000000000..24974669a1e0
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/lib/0d_accessors.js
@@ -0,0 +1,88 @@
+/**
+* @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 //
+
+/**
+* Returns the first element in an ndarray which passes a test implemented by a predicate function.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {ndarrayLike} x.ref - reference to the original ndarray-like object
+* @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 {*} sentinelValue - sentinel value
+* @param {Function} predicate - predicate function
+* @param {*} thisArg - predicate function execution context
+* @returns {*} result
+*
+* @example
+* var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+* var accessors = require( '@stdlib/array/base/accessors' );
+*
+* function predicate( value ) {
+* return value % 2.0 === 0.0;
+* }
+*
+* // 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 the input ndarray-like object:
+* var x = {
+* 'ref': null,
+* 'dtype': 'generic',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': accessors( xbuf ).accessors
+* };
+*
+* // Perform operation:
+* var out = find0d( x, NaN, predicate, {} );
+* // returns 2.0
+*/
+function find0d( x, sentinelValue, predicate, thisArg ) {
+ var v = x.accessors[ 0 ]( x.data, x.offset );
+ if ( predicate.call( thisArg, v, [], x.ref ) ) {
+ return v;
+ }
+ return sentinelValue;
+}
+
+
+// EXPORTS //
+
+module.exports = find0d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/find/lib/10d.js b/lib/node_modules/@stdlib/ndarray/base/find/lib/10d.js
new file mode 100644
index 000000000000..408192074c13
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/lib/10d.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' );
+var zeroTo = require( '@stdlib/array/base/zero-to' );
+var reverse = require( '@stdlib/array/base/reverse' );
+var take = require( '@stdlib/array/base/take-indexed' );
+
+
+// MAIN //
+
+/**
+* Returns the first element in an ndarray which passes a test implemented by a predicate function.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {ndarrayLike} x.ref - reference to the original ndarray-like object
+* @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 {*} sentinelValue - sentinel value
+* @param {Function} predicate - predicate function
+* @param {*} thisArg - predicate function execution context
+* @returns {*} result
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* function predicate( value ) {
+* return value % 2.0 === 0.0;
+* }
+*
+* // 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 the input ndarray-like object:
+* var x = {
+* 'ref': null,
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Perform operation:
+* var out = find10d( x, NaN, predicate, {} );
+* // returns 2.0
+*/
+function find10d( x, sentinelValue, predicate, thisArg ) { // eslint-disable-line max-statements
+ var xbuf;
+ var idx;
+ 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#, 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;
+ idx = zeroTo( sh.length );
+ 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
+ idx = reverse( idx );
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // 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 ( predicate.call( thisArg, xbuf[ ix ], take( [ i9, i8, i7, i6, i5, i4, i3, i2, i1, i0 ], idx ), x.ref ) ) { // eslint-disable-line max-len
+ return xbuf[ ix ];
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ ix += dx6;
+ }
+ ix += dx7;
+ }
+ ix += dx8;
+ }
+ ix += dx9;
+ }
+ return sentinelValue;
+}
+
+
+// EXPORTS //
+
+module.exports = find10d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/find/lib/10d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/find/lib/10d_accessors.js
new file mode 100644
index 000000000000..a3b744af1c0a
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/lib/10d_accessors.js
@@ -0,0 +1,228 @@
+/**
+* @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' );
+var zeroTo = require( '@stdlib/array/base/zero-to' );
+var reverse = require( '@stdlib/array/base/reverse' );
+var take = require( '@stdlib/array/base/take-indexed' );
+
+
+// MAIN //
+
+/**
+* Returns the first element in an ndarray which passes a test implemented by a predicate function.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {ndarrayLike} x.ref - reference to the original ndarray-like object
+* @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 {*} sentinelValue - sentinel value
+* @param {Function} predicate - predicate function
+* @param {*} thisArg - predicate function execution context
+* @returns {*} result
+*
+* @example
+* var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+* var accessors = require( '@stdlib/array/base/accessors' );
+*
+* function predicate( value ) {
+* return value % 2.0 === 0.0;
+* }
+*
+* // 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, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 8, 8, 8, 8, 8, 8, 8, 4, 2, 1 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create the input ndarray-like object:
+* var x = {
+* 'ref': null,
+* 'dtype': 'generic',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': accessors( xbuf ).accessors
+* };
+*
+* // Perform operation:
+* var out = find10d( x, NaN, predicate, {} );
+* // returns 2.0
+*/
+function find10d( x, sentinelValue, predicate, thisArg ) { // eslint-disable-line max-statements
+ var xbuf;
+ var idx;
+ 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;
+ var v;
+
+ // 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;
+ idx = zeroTo( sh.length );
+ 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
+ idx = reverse( idx );
+ }
+ // 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 ];
+
+ // 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++ ) {
+ v = get( xbuf, ix );
+ if ( predicate.call( thisArg, v, take( [ i9, i8, i7, i6, i5, i4, i3, i2, i1, i0 ], idx ), x.ref ) ) { // eslint-disable-line max-len
+ return v;
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ ix += dx6;
+ }
+ ix += dx7;
+ }
+ ix += dx8;
+ }
+ ix += dx9;
+ }
+ return sentinelValue;
+}
+
+
+// EXPORTS //
+
+module.exports = find10d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/find/lib/1d.js b/lib/node_modules/@stdlib/ndarray/base/find/lib/1d.js
new file mode 100644
index 000000000000..48fcd06d58e1
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/lib/1d.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';
+
+// MAIN //
+
+/**
+* Returns the first element in an ndarray which passes a test implemented by a predicate function.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {ndarrayLike} x.ref - reference to the original ndarray-like object
+* @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 {*} sentinelValue - sentinel value
+* @param {Function} predicate - predicate function
+* @param {*} thisArg - predicate function execution context
+* @returns {*} result
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* function predicate( value ) {
+* return value % 2.0 === 0.0;
+* }
+*
+* // 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 the input ndarray-like object:
+* var x = {
+* 'ref': null,
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Perform operation:
+* var out = find1d( x, NaN, predicate, {} );
+* // returns 2.0
+*/
+function find1d( x, sentinelValue, predicate, thisArg ) {
+ 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;
+
+ // Iterate over the ndarray dimensions...
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ if ( predicate.call( thisArg, xbuf[ ix ], [ i0 ], x.ref ) ) {
+ return xbuf[ ix ];
+ }
+ ix += dx0;
+ }
+ return sentinelValue;
+}
+
+
+// EXPORTS //
+
+module.exports = find1d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/find/lib/1d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/find/lib/1d_accessors.js
new file mode 100644
index 000000000000..572e05e7a664
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/lib/1d_accessors.js
@@ -0,0 +1,115 @@
+/**
+* @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 //
+
+/**
+* Returns the first element in an ndarray which passes a test implemented by a predicate function.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {ndarrayLike} x.ref - reference to the original ndarray-like object
+* @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 {*} sentinelValue - sentinel value
+* @param {Function} predicate - predicate function
+* @param {*} thisArg - predicate function execution context
+* @returns {*} result
+*
+* @example
+* var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+* var accessors = require( '@stdlib/array/base/accessors' );
+*
+* function predicate( value ) {
+* return value % 2.0 === 0.0;
+* }
+*
+* // 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 = 1;
+*
+* // Create the input ndarray-like object:
+* var x = {
+* 'ref': null,
+* 'dtype': 'generic',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': accessors( xbuf ).accessors
+* };
+*
+* // Perform operation:
+* var out = find1d( x, NaN, predicate, {} );
+* // returns 2.0
+*/
+function find1d( x, sentinelValue, predicate, thisArg ) {
+ var xbuf;
+ var get;
+ var dx0;
+ var S0;
+ var ix;
+ var i0;
+ var v;
+
+ // 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 ];
+
+ // Iterate over the ndarray dimensions...
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ v = get( xbuf, ix );
+ if ( predicate.call( thisArg, v, [ i0 ], x.ref ) ) {
+ return v;
+ }
+ ix += dx0;
+ }
+ return sentinelValue;
+}
+
+
+// EXPORTS //
+
+module.exports = find1d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/find/lib/2d.js b/lib/node_modules/@stdlib/ndarray/base/find/lib/2d.js
new file mode 100644
index 000000000000..4aedd0a7201d
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/lib/2d.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' );
+var zeroTo = require( '@stdlib/array/base/zero-to' );
+var reverse = require( '@stdlib/array/base/reverse' );
+var take = require( '@stdlib/array/base/take-indexed' );
+
+
+// MAIN //
+
+/**
+* Returns the first element in an ndarray which passes a test implemented by a predicate function.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {ndarrayLike} x.ref - reference to the original ndarray-like object
+* @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 {*} sentinelValue - sentinel value
+* @param {Function} predicate - predicate function
+* @param {*} thisArg - predicate function execution context
+* @returns {*} result
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* function predicate( value ) {
+* return value % 2.0 === 0.0;
+* }
+*
+* // 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 the input ndarray-like object:
+* var x = {
+* 'ref': null,
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Perform operation:
+* var out = find2d( x, NaN, predicate, {} );
+* // returns 2.0
+*/
+function find2d( x, sentinelValue, predicate, thisArg ) {
+ var xbuf;
+ var idx;
+ 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;
+ idx = zeroTo( sh.length );
+ 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
+ idx = reverse( idx );
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Iterate over the ndarray dimensions...
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ if ( predicate.call( thisArg, xbuf[ ix ], take( [ i1, i0 ], idx ), x.ref ) ) { // eslint-disable-line max-len
+ return xbuf[ ix ];
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ return sentinelValue;
+}
+
+
+// EXPORTS //
+
+module.exports = find2d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/find/lib/2d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/find/lib/2d_accessors.js
new file mode 100644
index 000000000000..fcaa2131c629
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/lib/2d_accessors.js
@@ -0,0 +1,146 @@
+/**
+* @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' );
+var zeroTo = require( '@stdlib/array/base/zero-to' );
+var reverse = require( '@stdlib/array/base/reverse' );
+var take = require( '@stdlib/array/base/take-indexed' );
+
+
+// MAIN //
+
+/**
+* Returns the first element in an ndarray which passes a test implemented by a predicate function.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {ndarrayLike} x.ref - reference to the original ndarray-like object
+* @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 {*} sentinelValue - sentinel value
+* @param {Function} predicate - predicate function
+* @param {*} thisArg - predicate function execution context
+* @returns {*} result
+*
+* @example
+* var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+* var accessors = require( '@stdlib/array/base/accessors' );
+*
+* function predicate( value ) {
+* return value % 2.0 === 0.0;
+* }
+*
+* // 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 the input ndarray-like object:
+* var x = {
+* 'ref': null,
+* 'dtype': 'generic',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': accessors( xbuf ).accessors
+* };
+*
+* // Perform operation:
+* var out = find2d( x, NaN, predicate, {} );
+* // returns 2.0
+*/
+function find2d( x, sentinelValue, predicate, thisArg ) {
+ var xbuf;
+ var idx;
+ var get;
+ var dx0;
+ var dx1;
+ var sh;
+ var S0;
+ var S1;
+ var sx;
+ var ix;
+ var i0;
+ var i1;
+ var v;
+
+ // 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;
+ idx = zeroTo( sh.length );
+ 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
+ idx = reverse( idx );
+ }
+ // 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 ];
+
+ // Iterate over the ndarray dimensions...
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ v = get( xbuf, ix );
+ if ( predicate.call( thisArg, v, take( [ i1, i0 ], idx ), x.ref ) ) { // eslint-disable-line max-len
+ return v;
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ return sentinelValue;
+}
+
+
+// EXPORTS //
+
+module.exports = find2d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/find/lib/3d.js b/lib/node_modules/@stdlib/ndarray/base/find/lib/3d.js
new file mode 100644
index 000000000000..c3a2d732a2b1
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/lib/3d.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' );
+var zeroTo = require( '@stdlib/array/base/zero-to' );
+var reverse = require( '@stdlib/array/base/reverse' );
+var take = require( '@stdlib/array/base/take-indexed' );
+
+
+// MAIN //
+
+/**
+* Returns the first element in an ndarray which passes a test implemented by a predicate function.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {ndarrayLike} x.ref - reference to the original ndarray-like object
+* @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 {*} sentinelValue - sentinel value
+* @param {Function} predicate - predicate function
+* @param {*} thisArg - predicate function execution context
+* @returns {*} result
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* function predicate( value ) {
+* return value % 2.0 === 0.0;
+* }
+*
+* // 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 the input ndarray-like object:
+* var x = {
+* 'ref': null,
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Perform operation:
+* var out = find3d( x, NaN, predicate, {} );
+* // returns 2.0
+*/
+function find3d( x, sentinelValue, predicate, thisArg ) {
+ var xbuf;
+ var idx;
+ 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;
+ idx = zeroTo( sh.length );
+ 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
+ idx = reverse( idx );
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // Iterate over the ndarray dimensions...
+ for ( i2 = 0; i2 < S2; i2++ ) {
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ if ( predicate.call( thisArg, xbuf[ ix ], take( [ i2, i1, i0 ], idx ), x.ref ) ) { // eslint-disable-line max-len
+ return xbuf[ ix ];
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ return sentinelValue;
+}
+
+
+// EXPORTS //
+
+module.exports = find3d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/find/lib/3d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/find/lib/3d_accessors.js
new file mode 100644
index 000000000000..0960d557e5e0
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/lib/3d_accessors.js
@@ -0,0 +1,156 @@
+/**
+* @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' );
+var zeroTo = require( '@stdlib/array/base/zero-to' );
+var reverse = require( '@stdlib/array/base/reverse' );
+var take = require( '@stdlib/array/base/take-indexed' );
+
+
+// MAIN //
+
+/**
+* Returns the first element in an ndarray which passes a test implemented by a predicate function.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {ndarrayLike} x.ref - reference to the original ndarray-like object
+* @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 {*} sentinelValue - sentinel value
+* @param {Function} predicate - predicate function
+* @param {*} thisArg - predicate function execution context
+* @returns {*} result
+*
+* @example
+* var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+* var accessors = require( '@stdlib/array/base/accessors' );
+*
+* function predicate( value ) {
+* return value % 2.0 === 0.0;
+* }
+*
+* // 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 the input ndarray-like object:
+* var x = {
+* 'ref': null,
+* 'dtype': 'generic',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': accessors( xbuf ).accessors
+* };
+*
+* // Perform operation:
+* var out = find3d( x, NaN, predicate, {} );
+* // returns 2.0
+*/
+function find3d( x, sentinelValue, predicate, thisArg ) {
+ var xbuf;
+ var idx;
+ 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;
+ var v;
+
+ // 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;
+ idx = zeroTo( sh.length );
+ 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
+ idx = reverse( idx );
+ }
+ // 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 ];
+
+ // Iterate over the ndarray dimensions...
+ for ( i2 = 0; i2 < S2; i2++ ) {
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ v = get( xbuf, ix );
+ if ( predicate.call( thisArg, v, take( [ i2, i1, i0 ], idx ), x.ref ) ) { // eslint-disable-line max-len
+ return v;
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ return sentinelValue;
+}
+
+
+// EXPORTS //
+
+module.exports = find3d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/find/lib/4d.js b/lib/node_modules/@stdlib/ndarray/base/find/lib/4d.js
new file mode 100644
index 000000000000..af0530843cb3
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/lib/4d.js
@@ -0,0 +1,157 @@
+/**
+* @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' );
+var zeroTo = require( '@stdlib/array/base/zero-to' );
+var reverse = require( '@stdlib/array/base/reverse' );
+var take = require( '@stdlib/array/base/take-indexed' );
+
+
+// MAIN //
+
+/**
+* Returns the first element in an ndarray which passes a test implemented by a predicate function.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {ndarrayLike} x.ref - reference to the original ndarray-like object
+* @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 {*} sentinelValue - sentinel value
+* @param {Function} predicate - predicate function
+* @param {*} thisArg - predicate function execution context
+* @returns {*} result
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* function predicate( value ) {
+* return value % 2.0 === 0.0;
+* }
+*
+* // 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 the input ndarray-like object:
+* var x = {
+* 'ref': null,
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Perform operation:
+* var out = find4d( x, NaN, predicate, {} );
+* // returns 2.0
+*/
+function find4d( x, sentinelValue, predicate, thisArg ) {
+ var xbuf;
+ var idx;
+ 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#, 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;
+ idx = zeroTo( sh.length );
+ 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
+ idx = reverse( idx );
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // 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 ( predicate.call( thisArg, xbuf[ ix ], take( [ i3, i2, i1, i0 ], idx ), x.ref ) ) { // eslint-disable-line max-len
+ return xbuf[ ix ];
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ return sentinelValue;
+}
+
+
+// EXPORTS //
+
+module.exports = find4d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/find/lib/4d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/find/lib/4d_accessors.js
new file mode 100644
index 000000000000..598805efdcef
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/lib/4d_accessors.js
@@ -0,0 +1,166 @@
+/**
+* @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' );
+var zeroTo = require( '@stdlib/array/base/zero-to' );
+var reverse = require( '@stdlib/array/base/reverse' );
+var take = require( '@stdlib/array/base/take-indexed' );
+
+
+// MAIN //
+
+/**
+* Returns the first element in an ndarray which passes a test implemented by a predicate function.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {ndarrayLike} x.ref - reference to the original ndarray-like object
+* @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 {*} sentinelValue - sentinel value
+* @param {Function} predicate - predicate function
+* @param {*} thisArg - predicate function execution context
+* @returns {*} result
+*
+* @example
+* var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+* var accessors = require( '@stdlib/array/base/accessors' );
+*
+* function predicate( value ) {
+* return value % 2.0 === 0.0;
+* }
+*
+* // 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, 2, 2, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 8, 4, 2, 1 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create the input ndarray-like object:
+* var x = {
+* 'ref': null,
+* 'dtype': 'generic',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': accessors( xbuf ).accessors
+* };
+*
+* // Perform operation:
+* var out = find4d( x, NaN, predicate, {} );
+* // returns 2.0
+*/
+function find4d( x, sentinelValue, predicate, thisArg ) {
+ var xbuf;
+ var idx;
+ 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;
+ var v;
+
+ // 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;
+ idx = zeroTo( sh.length );
+ 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
+ idx = reverse( idx );
+ }
+ // 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 ];
+
+ // 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++ ) {
+ v = get( xbuf, ix );
+ if ( predicate.call( thisArg, v, take( [ i3, i2, i1, i0 ], idx ), x.ref ) ) { // eslint-disable-line max-len
+ return v;
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ return sentinelValue;
+}
+
+
+// EXPORTS //
+
+module.exports = find4d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/find/lib/5d.js b/lib/node_modules/@stdlib/ndarray/base/find/lib/5d.js
new file mode 100644
index 000000000000..e7258a8aaaf4
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/lib/5d.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' );
+var zeroTo = require( '@stdlib/array/base/zero-to' );
+var reverse = require( '@stdlib/array/base/reverse' );
+var take = require( '@stdlib/array/base/take-indexed' );
+
+
+// MAIN //
+
+/**
+* Returns the first element in an ndarray which passes a test implemented by a predicate function.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {ndarrayLike} x.ref - reference to the original ndarray-like object
+* @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 {*} sentinelValue - sentinel value
+* @param {Function} predicate - predicate function
+* @param {*} thisArg - predicate function execution context
+* @returns {*} result
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* function predicate( value ) {
+* return value % 2.0 === 0.0;
+* }
+*
+* // 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 the input ndarray-like object:
+* var x = {
+* 'ref': null,
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Perform operation:
+* var out = find5d( x, NaN, predicate, {} );
+* // returns 2.0
+*/
+function find5d( x, sentinelValue, predicate, thisArg ) {
+ var xbuf;
+ var idx;
+ 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#, 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;
+ idx = zeroTo( sh.length );
+ 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
+ idx = reverse( idx );
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // 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 ( predicate.call( thisArg, xbuf[ ix ], take( [ i4, i3, i2, i1, i0 ], idx ), x.ref ) ) { // eslint-disable-line max-len
+ return xbuf[ ix ];
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ return sentinelValue;
+}
+
+
+// EXPORTS //
+
+module.exports = find5d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/find/lib/5d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/find/lib/5d_accessors.js
new file mode 100644
index 000000000000..1ef6ffdd24c8
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/lib/5d_accessors.js
@@ -0,0 +1,178 @@
+/**
+* @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' );
+var zeroTo = require( '@stdlib/array/base/zero-to' );
+var reverse = require( '@stdlib/array/base/reverse' );
+var take = require( '@stdlib/array/base/take-indexed' );
+
+
+// MAIN //
+
+/**
+* Returns the first element in an ndarray which passes a test implemented by a predicate function.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {ndarrayLike} x.ref - reference to the original ndarray-like object
+* @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 {*} sentinelValue - sentinel value
+* @param {Function} predicate - predicate function
+* @param {*} thisArg - predicate function execution context
+* @returns {*} result
+*
+* @example
+* var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+* var accessors = require( '@stdlib/array/base/accessors' );
+*
+* function predicate( value ) {
+* return value % 2.0 === 0.0;
+* }
+*
+* // 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, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 8, 8, 4, 2, 1 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create the input ndarray-like object:
+* var x = {
+* 'ref': null,
+* 'dtype': 'generic',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': accessors( xbuf ).accessors
+* };
+*
+* // Perform operation:
+* var out = find5d( x, NaN, predicate, {} );
+* // returns 2.0
+*/
+function find5d( x, sentinelValue, predicate, thisArg ) {
+ var xbuf;
+ var idx;
+ 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;
+ var v;
+
+ // 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;
+ idx = zeroTo( sh.length );
+ 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
+ idx = reverse( idx );
+ }
+ // 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 ];
+
+ // 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++ ) {
+ v = get( xbuf, ix );
+ if ( predicate.call( thisArg, v, take( [ i4, i3, i2, i1, i0 ], idx ), x.ref ) ) { // eslint-disable-line max-len
+ return v;
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ return sentinelValue;
+}
+
+
+// EXPORTS //
+
+module.exports = find5d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/find/lib/6d.js b/lib/node_modules/@stdlib/ndarray/base/find/lib/6d.js
new file mode 100644
index 000000000000..481c53eec679
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/lib/6d.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' );
+var zeroTo = require( '@stdlib/array/base/zero-to' );
+var reverse = require( '@stdlib/array/base/reverse' );
+var take = require( '@stdlib/array/base/take-indexed' );
+
+
+// MAIN //
+
+/**
+* Returns the first element in an ndarray which passes a test implemented by a predicate function.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {ndarrayLike} x.ref - reference to the original ndarray-like object
+* @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 {*} sentinelValue - sentinel value
+* @param {Function} predicate - predicate function
+* @param {*} thisArg - predicate function execution context
+* @returns {*} result
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* function predicate( value ) {
+* return value % 2.0 === 0.0;
+* }
+*
+* // 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 the input ndarray-like object:
+* var x = {
+* 'ref': null,
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Perform operation:
+* var out = find6d( x, NaN, predicate, {} );
+* // returns 2.0
+*/
+function find6d( x, sentinelValue, predicate, thisArg ) {
+ var xbuf;
+ var idx;
+ 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#, 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;
+ idx = zeroTo( sh.length );
+ 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
+ idx = reverse( idx );
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // 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 ( predicate.call( thisArg, xbuf[ ix ], take( [ i5, i4, i3, i2, i1, i0 ], idx ), x.ref ) ) { // eslint-disable-line max-len
+ return xbuf[ ix ];
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ return sentinelValue;
+}
+
+
+// EXPORTS //
+
+module.exports = find6d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/find/lib/6d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/find/lib/6d_accessors.js
new file mode 100644
index 000000000000..c4ea353253b9
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/lib/6d_accessors.js
@@ -0,0 +1,188 @@
+/**
+* @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' );
+var zeroTo = require( '@stdlib/array/base/zero-to' );
+var reverse = require( '@stdlib/array/base/reverse' );
+var take = require( '@stdlib/array/base/take-indexed' );
+
+
+// MAIN //
+
+/**
+* Returns the first element in an ndarray which passes a test implemented by a predicate function.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {ndarrayLike} x.ref - reference to the original ndarray-like object
+* @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 {*} sentinelValue - sentinel value
+* @param {Function} predicate - predicate function
+* @param {*} thisArg - predicate function execution context
+* @returns {*} result
+*
+* @example
+* var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+* var accessors = require( '@stdlib/array/base/accessors' );
+*
+* function predicate( value ) {
+* return value % 2.0 === 0.0;
+* }
+*
+* // 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, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 8, 8, 8, 4, 2, 1 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create the input ndarray-like object:
+* var x = {
+* 'ref': null,
+* 'dtype': 'generic',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': accessors( xbuf ).accessors
+* };
+*
+* // Perform operation:
+* var out = find6d( x, NaN, predicate, {} );
+* // returns 2.0
+*/
+function find6d( x, sentinelValue, predicate, thisArg ) {
+ var xbuf;
+ var idx;
+ 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;
+ var v;
+
+ // 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;
+ idx = zeroTo( sh.length );
+ 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
+ idx = reverse( idx );
+ }
+ // 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 ];
+
+ // 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++ ) {
+ v = get( xbuf, ix );
+ if ( predicate.call( thisArg, v, take( [ i5, i4, i3, i2, i1, i0 ], idx ), x.ref ) ) { // eslint-disable-line max-len
+ return v;
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ return sentinelValue;
+}
+
+
+// EXPORTS //
+
+module.exports = find6d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/find/lib/7d.js b/lib/node_modules/@stdlib/ndarray/base/find/lib/7d.js
new file mode 100644
index 000000000000..4a8112b014a0
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/lib/7d.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' );
+var zeroTo = require( '@stdlib/array/base/zero-to' );
+var reverse = require( '@stdlib/array/base/reverse' );
+var take = require( '@stdlib/array/base/take-indexed' );
+
+
+// MAIN //
+
+/**
+* Returns the first element in an ndarray which passes a test implemented by a predicate function.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {ndarrayLike} x.ref - reference to the original ndarray-like object
+* @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 {*} sentinelValue - sentinel value
+* @param {Function} predicate - predicate function
+* @param {*} thisArg - predicate function execution context
+* @returns {*} result
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* function predicate( value ) {
+* return value % 2.0 === 0.0;
+* }
+*
+* // 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 the input ndarray-like object:
+* var x = {
+* 'ref': null,
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Perform operation:
+* var out = find7d( x, NaN, predicate, {} );
+* // returns 2.0
+*/
+function find7d( x, sentinelValue, predicate, thisArg ) {
+ var xbuf;
+ var idx;
+ 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#, 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;
+ idx = zeroTo( sh.length );
+ 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
+ idx = reverse( idx );
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // 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 ( predicate.call( thisArg, xbuf[ ix ], take( [ i6, i5, i4, i3, i2, i1, i0 ], idx ), x.ref ) ) { // eslint-disable-line max-len
+ return xbuf[ ix ];
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ ix += dx6;
+ }
+ return sentinelValue;
+}
+
+
+// EXPORTS //
+
+module.exports = find7d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/find/lib/7d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/find/lib/7d_accessors.js
new file mode 100644
index 000000000000..769c5e89d22d
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/lib/7d_accessors.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 strides2order = require( '@stdlib/ndarray/base/strides2order' );
+var zeroTo = require( '@stdlib/array/base/zero-to' );
+var reverse = require( '@stdlib/array/base/reverse' );
+var take = require( '@stdlib/array/base/take-indexed' );
+
+
+// MAIN //
+
+/**
+* Returns the first element in an ndarray which passes a test implemented by a predicate function.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {ndarrayLike} x.ref - reference to the original ndarray-like object
+* @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 {*} sentinelValue - sentinel value
+* @param {Function} predicate - predicate function
+* @param {*} thisArg - predicate function execution context
+* @returns {*} result
+*
+* @example
+* var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+* var accessors = require( '@stdlib/array/base/accessors' );
+*
+* function predicate( value ) {
+* return value % 2.0 === 0.0;
+* }
+*
+* // 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, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 8, 8, 8, 8, 4, 2, 1 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create the input ndarray-like object:
+* var x = {
+* 'ref': null,
+* 'dtype': 'generic',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': accessors( xbuf ).accessors
+* };
+*
+* // Perform operation:
+* var out = find7d( x, NaN, predicate, {} );
+* // returns 2.0
+*/
+function find7d( x, sentinelValue, predicate, thisArg ) {
+ var xbuf;
+ var idx;
+ 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;
+ var v;
+
+ // 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;
+ idx = zeroTo( sh.length );
+ 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
+ idx = reverse( idx );
+ }
+ // 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 ];
+
+ // 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++ ) {
+ v = get( xbuf, ix );
+ if ( predicate.call( thisArg, v, take( [ i6, i5, i4, i3, i2, i1, i0 ], idx ), x.ref ) ) { // eslint-disable-line max-len
+ return v;
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ ix += dx6;
+ }
+ return sentinelValue;
+}
+
+
+// EXPORTS //
+
+module.exports = find7d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/find/lib/8d.js b/lib/node_modules/@stdlib/ndarray/base/find/lib/8d.js
new file mode 100644
index 000000000000..4a4fbf6f58b2
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/lib/8d.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' );
+var zeroTo = require( '@stdlib/array/base/zero-to' );
+var reverse = require( '@stdlib/array/base/reverse' );
+var take = require( '@stdlib/array/base/take-indexed' );
+
+
+// MAIN //
+
+/**
+* Returns the first element in an ndarray which passes a test implemented by a predicate function.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {ndarrayLike} x.ref - reference to the original ndarray-like object
+* @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 {*} sentinelValue - sentinel value
+* @param {Function} predicate - predicate function
+* @param {*} thisArg - predicate function execution context
+* @returns {*} result
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* function predicate( value ) {
+* return value % 2.0 === 0.0;
+* }
+*
+* // 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 the input ndarray-like object:
+* var x = {
+* 'ref': null,
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Perform operation:
+* var out = find8d( x, NaN, predicate, {} );
+* // returns 2.0
+*/
+function find8d( x, sentinelValue, predicate, thisArg ) {
+ var xbuf;
+ var idx;
+ 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#, 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;
+ idx = zeroTo( sh.length );
+ 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
+ idx = reverse( idx );
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // 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 ( predicate.call( thisArg, xbuf[ ix ], take( [ i7, i6, i5, i4, i3, i2, i1, i0 ], idx ), x.ref ) ) { // eslint-disable-line max-len
+ return xbuf[ ix ];
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ ix += dx6;
+ }
+ ix += dx7;
+ }
+ return sentinelValue;
+}
+
+
+// EXPORTS //
+
+module.exports = find8d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/find/lib/8d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/find/lib/8d_accessors.js
new file mode 100644
index 000000000000..11a000feecd3
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/lib/8d_accessors.js
@@ -0,0 +1,208 @@
+/**
+* @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' );
+var zeroTo = require( '@stdlib/array/base/zero-to' );
+var reverse = require( '@stdlib/array/base/reverse' );
+var take = require( '@stdlib/array/base/take-indexed' );
+
+
+// MAIN //
+
+/**
+* Returns the first element in an ndarray which passes a test implemented by a predicate function.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {ndarrayLike} x.ref - reference to the original ndarray-like object
+* @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 {*} sentinelValue - sentinel value
+* @param {Function} predicate - predicate function
+* @param {*} thisArg - predicate function execution context
+* @returns {*} result
+*
+* @example
+* var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+* var accessors = require( '@stdlib/array/base/accessors' );
+*
+* function predicate( value ) {
+* return value % 2.0 === 0.0;
+* }
+*
+* // 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, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 8, 8, 8, 8, 8, 4, 2, 1 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create the input ndarray-like object:
+* var x = {
+* 'ref': null,
+* 'dtype': 'generic',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': accessors( xbuf ).accessors
+* };
+*
+* // Perform operation:
+* var out = find8d( x, NaN, predicate, {} );
+* // returns 2.0
+*/
+function find8d( x, sentinelValue, predicate, thisArg ) {
+ var xbuf;
+ var idx;
+ 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;
+ var v;
+
+ // 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;
+ idx = zeroTo( sh.length );
+ 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
+ idx = reverse( idx );
+ }
+ // 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 ];
+
+ // 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++ ) {
+ v = get( xbuf, ix );
+ if ( predicate.call( thisArg, v, take( [ i7, i6, i5, i4, i3, i2, i1, i0 ], idx ), x.ref ) ) { // eslint-disable-line max-len
+ return v;
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ ix += dx6;
+ }
+ ix += dx7;
+ }
+ return sentinelValue;
+}
+
+
+// EXPORTS //
+
+module.exports = find8d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/find/lib/9d.js b/lib/node_modules/@stdlib/ndarray/base/find/lib/9d.js
new file mode 100644
index 000000000000..9ec29ddb1d0f
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/lib/9d.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' );
+var zeroTo = require( '@stdlib/array/base/zero-to' );
+var reverse = require( '@stdlib/array/base/reverse' );
+var take = require( '@stdlib/array/base/take-indexed' );
+
+
+// MAIN //
+
+/**
+* Returns the first element in an ndarray which passes a test implemented by a predicate function.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {ndarrayLike} x.ref - reference to the original ndarray-like object
+* @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 {*} sentinelValue - sentinel value
+* @param {Function} predicate - predicate function
+* @param {*} thisArg - predicate function execution context
+* @returns {*} result
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* function predicate( value ) {
+* return value % 2.0 === 0.0;
+* }
+*
+* // 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 the input ndarray-like object:
+* var x = {
+* 'ref': null,
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Perform operation:
+* var out = find9d( x, NaN, predicate, {} );
+* // returns 2.0
+*/
+function find9d( x, sentinelValue, predicate, thisArg ) {
+ var xbuf;
+ var idx;
+ 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#, 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;
+ idx = zeroTo( sh.length );
+ 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
+ idx = reverse( idx );
+ }
+ // Set a pointer to the first indexed element:
+ ix = x.offset;
+
+ // Cache a reference to the input ndarray buffer:
+ xbuf = x.data;
+
+ // 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 ( predicate.call( thisArg, xbuf[ ix ], take( [ i8, i7, i6, i5, i4, i3, i2, i1, i0 ], idx ), x.ref ) ) { // eslint-disable-line max-len
+ return xbuf[ ix ];
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ ix += dx6;
+ }
+ ix += dx7;
+ }
+ ix += dx8;
+ }
+ return sentinelValue;
+}
+
+
+// EXPORTS //
+
+module.exports = find9d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/find/lib/9d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/find/lib/9d_accessors.js
new file mode 100644
index 000000000000..c406682c291d
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/lib/9d_accessors.js
@@ -0,0 +1,218 @@
+/**
+* @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' );
+var zeroTo = require( '@stdlib/array/base/zero-to' );
+var reverse = require( '@stdlib/array/base/reverse' );
+var take = require( '@stdlib/array/base/take-indexed' );
+
+
+// MAIN //
+
+/**
+* Returns the first element in an ndarray which passes a test implemented by a predicate function.
+*
+* @private
+* @param {Object} x - object containing ndarray meta data
+* @param {ndarrayLike} x.ref - reference to the original ndarray-like object
+* @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 {*} sentinelValue - sentinel value
+* @param {Function} predicate - predicate function
+* @param {*} thisArg - predicate function execution context
+* @returns {*} result
+*
+* @example
+* var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+* var accessors = require( '@stdlib/array/base/accessors' );
+*
+* function predicate( value ) {
+* return value % 2.0 === 0.0;
+* }
+*
+* // 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, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 8, 8, 8, 8, 8, 8, 4, 2, 1 ];
+*
+* // Define the index offset:
+* var ox = 0;
+*
+* // Create the input ndarray-like object:
+* var x = {
+* 'ref': null,
+* 'dtype': 'generic',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': accessors( xbuf ).accessors
+* };
+*
+* // Perform operation:
+* var out = find9d( x, NaN, predicate, {} );
+* // returns 2.0
+*/
+function find9d( x, sentinelValue, predicate, thisArg ) {
+ var xbuf;
+ var idx;
+ 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;
+ var v;
+
+ // 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;
+ idx = zeroTo( sh.length );
+ 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
+ idx = reverse( idx );
+ }
+ // 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 ];
+
+ // 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++ ) {
+ v = get( xbuf, ix );
+ if ( predicate.call( thisArg, v, take( [ i8, i7, i6, i5, i4, i3, i2, i1, i0 ], idx ), x.ref ) ) { // eslint-disable-line max-len
+ return v;
+ }
+ ix += dx0;
+ }
+ ix += dx1;
+ }
+ ix += dx2;
+ }
+ ix += dx3;
+ }
+ ix += dx4;
+ }
+ ix += dx5;
+ }
+ ix += dx6;
+ }
+ ix += dx7;
+ }
+ ix += dx8;
+ }
+ return sentinelValue;
+}
+
+
+// EXPORTS //
+
+module.exports = find9d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/find/lib/index.js b/lib/node_modules/@stdlib/ndarray/base/find/lib/index.js
new file mode 100644
index 000000000000..bb7345255921
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/lib/index.js
@@ -0,0 +1,78 @@
+/**
+* @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 the first element in an ndarray which passes a test implemented by a predicate function.
+*
+* @module @stdlib/ndarray/base/find
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+* var find = require( '@stdlib/ndarray/base/find' );
+*
+* function predicate( value ) {
+* return value % 2.0 === 0.0;
+* }
+*
+* // 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 the input ndarray-like object:
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+*
+* // Create an ndarray-like object containing a sentinel value:
+* var sentinelValue = {
+* 'dtype': 'float64',
+* 'data': new Float64Array( [ NaN ] ),
+* 'shape': [],
+* 'strides': [ 0 ],
+* 'offset': 0,
+* 'order': 'row-major'
+* };
+*
+* // Perform operation:
+* var out = find( [ x, sentinelValue ], predicate );
+* // returns 2.0
+*/
+
+// MODULES //
+
+var main = require( './main.js' );
+
+
+// EXPORTS //
+
+module.exports = main;
diff --git a/lib/node_modules/@stdlib/ndarray/base/find/lib/main.js b/lib/node_modules/@stdlib/ndarray/base/find/lib/main.js
new file mode 100644
index 000000000000..7a2d8925dbdc
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/find/lib/main.js
@@ -0,0 +1,194 @@
+/**
+* @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 stdlib/no-redeclare */
+
+// MODULES //
+
+var iterationOrder = require( '@stdlib/ndarray/base/iteration-order' );
+var ndarray2object = require( '@stdlib/ndarray/base/ndarraylike2object' );
+var numel = require( '@stdlib/ndarray/base/numel' );
+var accessorfind0d = require( './0d_accessors.js' );
+var accessorfind1d = require( './1d_accessors.js' );
+var accessorfind2d = require( './2d_accessors.js' );
+var accessorfind3d = require( './3d_accessors.js' );
+var accessorfind4d = require( './4d_accessors.js' );
+var accessorfind5d = require( './5d_accessors.js' );
+var accessorfind6d = require( './6d_accessors.js' );
+var accessorfind7d = require( './7d_accessors.js' );
+var accessorfind8d = require( './8d_accessors.js' );
+var accessorfind9d = require( './9d_accessors.js' );
+var accessorfind10d = require( './10d_accessors.js' );
+var accessorfindnd = require( './nd_accessors.js' );
+var find0d = require( './0d.js' );
+var find1d = require( './1d.js' );
+var find2d = require( './2d.js' );
+var find3d = require( './3d.js' );
+var find4d = require( './4d.js' );
+var find5d = require( './5d.js' );
+var find6d = require( './6d.js' );
+var find7d = require( './7d.js' );
+var find8d = require( './8d.js' );
+var find9d = require( './9d.js' );
+var find10d = require( './10d.js' );
+var findnd = require( './nd.js' );
+
+
+// VARIABLES //
+
+var FIND = [
+ find0d,
+ find1d,
+ find2d,
+ find3d,
+ find4d,
+ find5d,
+ find6d,
+ find7d,
+ find8d,
+ find9d,
+ find10d
+];
+var ACCESSOR_FIND = [
+ accessorfind0d,
+ accessorfind1d,
+ accessorfind2d,
+ accessorfind3d,
+ accessorfind4d,
+ accessorfind5d,
+ accessorfind6d,
+ accessorfind7d,
+ accessorfind8d,
+ accessorfind9d,
+ accessorfind10d
+];
+var MAX_DIMS = FIND.length - 1;
+
+
+// MAIN //
+
+/**
+* Returns the first element in an ndarray which passes a test implemented by a predicate function.
+*
+* ## 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