diff --git a/lib/node_modules/@stdlib/ndarray/base/where/README.md b/lib/node_modules/@stdlib/ndarray/base/where/README.md
new file mode 100644
index 000000000000..227f88dde87c
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/README.md
@@ -0,0 +1,221 @@
+
+
+# Where
+
+> Apply a condition to elements in two input ndarrays and assign results to elements in an output ndarray.
+
+
+
+
+
+
+
+## Usage
+
+```javascript
+var where = require( '@stdlib/ndarray/base/where' );
+```
+
+#### where( arrays )
+
+Applies a condition to elements in two input ndarrays and assigns results to elements in an output ndarray.
+
+
+
+```javascript
+var Float64Array = require( '@stdlib/array/float64' );
+var Uint8Array = require( '@stdlib/array/uint8' );
+
+// Create data buffers:
+var cbuf = new Uint8Array( [ 1, 0, 0, 1, 0, 1 ] );
+var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+var ybuf = new Float64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0 ] );
+var obuf = new Float64Array( 6 );
+
+// Define the shape of the input and output arrays:
+var shape = [ 3, 1, 2 ];
+
+// Define the array strides:
+var sc = [ 2, 2, 1 ];
+var sx = [ 2, 2, 1 ];
+var sy = [ 2, 2, 1 ];
+var so = [ 2, 2, 1 ];
+
+// Define the index offsets:
+var oc = 0;
+var ox = 0;
+var oy = 0;
+var oo = 0;
+
+// Create the input and output ndarrays:
+var condition = {
+ 'dtype': 'uint8',
+ 'data': cbuf,
+ 'shape': shape,
+ 'strides': sc,
+ 'offset': oc,
+ 'order': 'row-major'
+};
+var x = {
+ 'dtype': 'float64',
+ 'data': xbuf,
+ 'shape': shape,
+ 'strides': sx,
+ 'offset': ox,
+ 'order': 'row-major'
+};
+var y = {
+ 'dtype': 'float64',
+ 'data': ybuf,
+ 'shape': shape,
+ 'strides': sy,
+ 'offset': oy,
+ 'order': 'row-major'
+};
+var out = {
+ 'dtype': 'float64',
+ 'data': obuf,
+ 'shape': shape,
+ 'strides': so,
+ 'offset': oo,
+ 'order': 'row-major'
+};
+
+// Apply the condition:
+where( [ condition, x, y, out ] );
+
+console.log( out.data );
+// => [ 1.0, -2.0, -3.0, 4.0, -5.0, 6.0 ]
+```
+
+The function accepts the following arguments:
+
+- **arrays**: array-like object containing three input ndarrays and one output ndarray.
+
+Each provided ndarray should be an object with the following properties:
+
+- **dtype**: data type.
+- **data**: data buffer.
+- **shape**: dimensions.
+- **strides**: stride lengths.
+- **offset**: index offset.
+- **order**: specifies whether an ndarray is row-major (C-style) or column major (Fortran-style).
+
+
+
+
+
+
+
+## Notes
+
+- `condition` ndarray must be a `boolean` or `uint8` ndarray.
+- `condition`, `x`, `y`, and `out` ndarrays must have the same shape.
+- For very high-dimensional ndarrays which are non-contiguous, one should consider copying the underlying data to contiguous memory before conditionally assigning elements in order to achieve better performance.
+
+
+
+
+
+
+
+## Examples
+
+
+
+```javascript
+var discreteUniform = require( '@stdlib/random/base/discrete-uniform' ).factory;
+var bernoulli = require( '@stdlib/random/base/bernoulli' ).factory;
+var filledarray = require( '@stdlib/array/filled' );
+var filledarrayBy = require( '@stdlib/array/filled-by' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var ndarray2array = require( '@stdlib/ndarray/base/to-array' );
+var where = require( '@stdlib/ndarray/base/where' );
+
+var N = 10;
+var shape = [ 5, 2 ];
+var condition = {
+ 'dtype': 'uint8',
+ 'data': filledarrayBy( N, 'uint8', bernoulli( 0.5 ) ),
+ 'shape': shape,
+ 'strides': [ 2, 1 ],
+ 'offset': 0,
+ 'order': 'row-major'
+};
+console.log( ndarray2array( condition.data, condition.shape, condition.strides, condition.offset, condition.order ) ); // eslint-disable-line max-len
+
+var x = {
+ 'dtype': 'generic',
+ 'data': filledarrayBy( N, 'generic', discreteUniform( 0, 100 ) ),
+ 'shape': shape,
+ 'strides': [ 2, 1 ],
+ 'offset': 0,
+ 'order': 'row-major'
+};
+console.log( ndarray2array( x.data, x.shape, x.strides, x.offset, x.order ) );
+
+var y = {
+ 'dtype': 'generic',
+ 'data': filledarrayBy( N, 'generic', discreteUniform( -100, 0 ) ),
+ 'shape': shape,
+ 'strides': [ 2, 1 ],
+ 'offset': 0,
+ 'order': 'row-major'
+};
+console.log( ndarray2array( y.data, y.shape, y.strides, y.offset, y.order ) );
+
+var out = {
+ 'dtype': 'generic',
+ 'data': filledarray( 0, N, 'generic' ),
+ 'shape': shape.slice(),
+ 'strides': shape2strides( shape, 'column-major' ),
+ 'offset': 0,
+ 'order': 'column-major'
+};
+
+where( [ condition, x, y, out ] );
+console.log( ndarray2array( out.data, out.shape, out.strides, out.offset, out.order ) ); // eslint-disable-line max-len
+
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.11d_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.11d_columnmajor.js
new file mode 100644
index 000000000000..ad1bec8e5c92
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.11d_columnmajor.js
@@ -0,0 +1,180 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var discreteUniform = require( '@stdlib/random/base/discrete-uniform' ).factory;
+var bernoulli = require( '@stdlib/random/base/bernoulli' ).factory;
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var filledarray = require( '@stdlib/array/filled' );
+var filledarrayBy = require( '@stdlib/array/filled-by' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var format = require( '@stdlib/string/format' );
+var pkg = require( './../package.json' ).name;
+var where = require( './../lib/nd.js' );
+
+
+// VARIABLES //
+
+var conditionTypes = [ 'uint8' ];
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} ctype - first input ndarray data type
+* @param {string} xtype - second input ndarray data type
+* @param {string} ytype - third input ndarray data type
+* @param {string} otype - output ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, ctype, xtype, ytype, otype ) {
+ var condition;
+ var out;
+ var x;
+ var y;
+
+ condition = filledarrayBy( len, ctype, bernoulli( 0.5 ) );
+ x = filledarrayBy( len, xtype, discreteUniform( -100, 100 ) );
+ y = filledarrayBy( len, ytype, discreteUniform( -100, 100 ) );
+ out = filledarray( 0.0, len, otype );
+
+ condition = {
+ 'dtype': ctype,
+ 'data': condition,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ y = {
+ 'dtype': ytype,
+ 'data': y,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ out = {
+ 'dtype': otype,
+ 'data': out,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ where( condition, x, y, out );
+ if ( isnan( out.data[ i%len ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( out.data[ i%len ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+ }
+}
+
+
+// MAIN //
+
+/**
+* Main execution sequence.
+*
+* @private
+*/
+function main() {
+ var len;
+ var min;
+ var max;
+ var sh;
+ var t1;
+ var t2;
+ var t3;
+ var tc;
+ var f;
+ var i;
+ var j;
+ var k;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( k = 0; k < types.length; k++ ) {
+ t1 = types[ k ];
+ t2 = types[ k ];
+ t3 = types[ k ];
+ for ( j = 0; j < conditionTypes.length; j++ ) {
+ tc = conditionTypes[ 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, tc, t1, t2, t3 );
+ bench( format( '%s:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+
+ sh = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, len/2 ];
+ f = createBenchmark( len, sh, tc, t1, t2, t3 );
+ bench( format( '%s:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), 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, tc, t1, t2, t3 );
+ bench( format( '%s:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+ }
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.11d_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.11d_rowmajor.js
new file mode 100644
index 000000000000..5a98f02cea17
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.11d_rowmajor.js
@@ -0,0 +1,180 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var discreteUniform = require( '@stdlib/random/base/discrete-uniform' ).factory;
+var bernoulli = require( '@stdlib/random/base/bernoulli' ).factory;
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var filledarray = require( '@stdlib/array/filled' );
+var filledarrayBy = require( '@stdlib/array/filled-by' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var format = require( '@stdlib/string/format' );
+var pkg = require( './../package.json' ).name;
+var where = require( './../lib/nd.js' );
+
+
+// VARIABLES //
+
+var conditionTypes = [ 'uint8' ];
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} ctype - first input ndarray data type
+* @param {string} xtype - second input ndarray data type
+* @param {string} ytype - third input ndarray data type
+* @param {string} otype - output ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, ctype, xtype, ytype, otype ) {
+ var condition;
+ var out;
+ var x;
+ var y;
+
+ condition = filledarrayBy( len, ctype, bernoulli( 0.5 ) );
+ x = filledarrayBy( len, xtype, discreteUniform( -100, 100 ) );
+ y = filledarrayBy( len, ytype, discreteUniform( -100, 100 ) );
+ out = filledarray( 0.0, len, otype );
+
+ condition = {
+ 'dtype': ctype,
+ 'data': condition,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ y = {
+ 'dtype': ytype,
+ 'data': y,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ out = {
+ 'dtype': otype,
+ 'data': out,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ where( condition, x, y, out );
+ if ( isnan( out.data[ i%len ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( out.data[ i%len ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+ }
+}
+
+
+// MAIN //
+
+/**
+* Main execution sequence.
+*
+* @private
+*/
+function main() {
+ var len;
+ var min;
+ var max;
+ var sh;
+ var t1;
+ var t2;
+ var t3;
+ var tc;
+ var f;
+ var i;
+ var j;
+ var k;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( k = 0; k < types.length; k++ ) {
+ t1 = types[ k ];
+ t2 = types[ k ];
+ t3 = types[ k ];
+ for ( j = 0; j < conditionTypes.length; j++ ) {
+ tc = conditionTypes[ 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, tc, t1, t2, t3 );
+ bench( format( '%s:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+
+ sh = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, len/2 ];
+ f = createBenchmark( len, sh, tc, t1, t2, t3 );
+ bench( format( '%s:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), 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, tc, t1, t2, t3 );
+ bench( format( '%s:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+ }
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.1d_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.1d_columnmajor.js
new file mode 100644
index 000000000000..d18a02e61962
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.1d_columnmajor.js
@@ -0,0 +1,169 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var discreteUniform = require( '@stdlib/random/base/discrete-uniform' ).factory;
+var bernoulli = require( '@stdlib/random/base/bernoulli' ).factory;
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var filledarray = require( '@stdlib/array/filled' );
+var filledarrayBy = require( '@stdlib/array/filled-by' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var format = require( '@stdlib/string/format' );
+var pkg = require( './../package.json' ).name;
+var where1d = require( './../lib/1d.js' );
+
+
+// VARIABLES //
+
+var conditionTypes = [ 'uint8' ];
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} ctype - first input ndarray data type
+* @param {string} xtype - second input ndarray data type
+* @param {string} ytype - third input ndarray data type
+* @param {string} otype - fourth input ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, ctype, xtype, ytype, otype ) {
+ var condition;
+ var out;
+ var x;
+ var y;
+
+ condition = filledarrayBy( len, ctype, bernoulli( 0.5 ) );
+ x = filledarrayBy( len, xtype, discreteUniform( -100, 100 ) );
+ y = filledarrayBy( len, ytype, discreteUniform( -100, 100 ) );
+ out = filledarray( 0.0, len, otype );
+
+ condition = {
+ 'dtype': ctype,
+ 'data': condition,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ y = {
+ 'dtype': ytype,
+ 'data': y,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ out = {
+ 'dtype': otype,
+ 'data': out,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ where1d( condition, x, y, out );
+ if ( isnan( out.data[ i%len ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( out.data[ i%len ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+ }
+}
+
+
+// MAIN //
+
+/**
+* Main execution sequence.
+*
+* @private
+*/
+function main() {
+ var len;
+ var min;
+ var max;
+ var sh;
+ var t1;
+ var t2;
+ var t3;
+ var tc;
+ var f;
+ var i;
+ var j;
+ var k;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( k = 0; k < types.length; k++ ) {
+ t1 = types[ k ];
+ t2 = types[ k ];
+ t3 = types[ k ];
+ for ( j = 0; j < conditionTypes.length; j++ ) {
+ tc = conditionTypes[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len ];
+ f = createBenchmark( len, sh, tc, t1, t2, t3 );
+ bench( format( '%s:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+ }
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.1d_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.1d_rowmajor.js
new file mode 100644
index 000000000000..f422d792785c
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.1d_rowmajor.js
@@ -0,0 +1,169 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var discreteUniform = require( '@stdlib/random/base/discrete-uniform' ).factory;
+var bernoulli = require( '@stdlib/random/base/bernoulli' ).factory;
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var filledarray = require( '@stdlib/array/filled' );
+var filledarrayBy = require( '@stdlib/array/filled-by' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var format = require( '@stdlib/string/format' );
+var pkg = require( './../package.json' ).name;
+var where1d = require( './../lib/1d.js' );
+
+
+// VARIABLES //
+
+var conditionTypes = [ 'uint8' ];
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} ctype - first input ndarray data type
+* @param {string} xtype - second input ndarray data type
+* @param {string} ytype - third input ndarray data type
+* @param {string} otype - fourth input ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, ctype, xtype, ytype, otype ) {
+ var condition;
+ var out;
+ var x;
+ var y;
+
+ condition = filledarrayBy( len, ctype, bernoulli( 0.5 ) );
+ x = filledarrayBy( len, xtype, discreteUniform( -100, 100 ) );
+ y = filledarrayBy( len, ytype, discreteUniform( -100, 100 ) );
+ out = filledarray( 0.0, len, otype );
+
+ condition = {
+ 'dtype': ctype,
+ 'data': condition,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ y = {
+ 'dtype': ytype,
+ 'data': y,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ out = {
+ 'dtype': otype,
+ 'data': out,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ where1d( condition, x, y, out );
+ if ( isnan( out.data[ i%len ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( out.data[ i%len ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+ }
+}
+
+
+// MAIN //
+
+/**
+* Main execution sequence.
+*
+* @private
+*/
+function main() {
+ var len;
+ var min;
+ var max;
+ var sh;
+ var t1;
+ var t2;
+ var t3;
+ var tc;
+ var f;
+ var i;
+ var j;
+ var k;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( k = 0; k < types.length; k++ ) {
+ t1 = types[ k ];
+ t2 = types[ k ];
+ t3 = types[ k ];
+ for ( j = 0; j < conditionTypes.length; j++ ) {
+ tc = conditionTypes[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len ];
+ f = createBenchmark( len, sh, tc, t1, t2, t3 );
+ bench( format( '%s:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+ }
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.2d_blocked_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.2d_blocked_columnmajor.js
new file mode 100644
index 000000000000..3552265d8895
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.2d_blocked_columnmajor.js
@@ -0,0 +1,181 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var discreteUniform = require( '@stdlib/random/base/discrete-uniform' ).factory;
+var bernoulli = require( '@stdlib/random/base/bernoulli' ).factory;
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var sqrt = require( '@stdlib/math/base/special/sqrt' );
+var filledarray = require( '@stdlib/array/filled' );
+var filledarrayBy = require( '@stdlib/array/filled-by' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var format = require( '@stdlib/string/format' );
+var pkg = require( './../package.json' ).name;
+var where2d = require( './../lib/2d_blocked.js' );
+
+
+// VARIABLES //
+
+var conditionTypes = [ 'uint8' ];
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} ctype - first input ndarray data type
+* @param {string} xtype - second input ndarray data type
+* @param {string} ytype - third input ndarray data type
+* @param {string} otype - fourth input ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, ctype, xtype, ytype, otype ) {
+ var condition;
+ var out;
+ var x;
+ var y;
+
+ condition = filledarrayBy( len, ctype, bernoulli( 0.5 ) );
+ x = filledarrayBy( len, xtype, discreteUniform( -100, 100 ) );
+ y = filledarrayBy( len, ytype, discreteUniform( -100, 100 ) );
+ out = filledarray( 0.0, len, otype );
+
+ condition = {
+ 'dtype': ctype,
+ 'data': condition,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ y = {
+ 'dtype': ytype,
+ 'data': y,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ out = {
+ 'dtype': otype,
+ 'data': out,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ where2d( condition, x, y, out );
+ if ( isnan( out.data[ i%len ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( out.data[ i%len ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+ }
+}
+
+
+// MAIN //
+
+/**
+* Main execution sequence.
+*
+* @private
+*/
+function main() {
+ var len;
+ var min;
+ var max;
+ var sh;
+ var t1;
+ var t2;
+ var t3;
+ var tc;
+ var f;
+ var i;
+ var j;
+ var k;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( k = 0; k < types.length; k++ ) {
+ t1 = types[ k ];
+ t2 = types[ k ];
+ t3 = types[ k ];
+ for ( j = 0; j < conditionTypes.length; j++ ) {
+ tc = conditionTypes[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2 ];
+ f = createBenchmark( len, sh, tc, t1, t2, t3 );
+ bench( format( '%s::blocked:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+
+ sh = [ 2, len/2 ];
+ f = createBenchmark( len, sh, tc, t1, t2, t3 );
+ bench( format( '%s::blocked:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+
+ len = floor( sqrt( len ) );
+ sh = [ len, len ];
+ len *= len;
+ f = createBenchmark( len, sh, tc, t1, t2, t3 );
+ bench( format( '%s::blocked:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+ }
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.2d_blocked_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.2d_blocked_rowmajor.js
new file mode 100644
index 000000000000..9fab1fd2b9c1
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.2d_blocked_rowmajor.js
@@ -0,0 +1,181 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var discreteUniform = require( '@stdlib/random/base/discrete-uniform' ).factory;
+var bernoulli = require( '@stdlib/random/base/bernoulli' ).factory;
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var sqrt = require( '@stdlib/math/base/special/sqrt' );
+var filledarray = require( '@stdlib/array/filled' );
+var filledarrayBy = require( '@stdlib/array/filled-by' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var format = require( '@stdlib/string/format' );
+var pkg = require( './../package.json' ).name;
+var where2d = require( './../lib/2d_blocked.js' );
+
+
+// VARIABLES //
+
+var conditionTypes = [ 'uint8' ];
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} ctype - first input ndarray data type
+* @param {string} xtype - second input ndarray data type
+* @param {string} ytype - third input ndarray data type
+* @param {string} otype - fourth input ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, ctype, xtype, ytype, otype ) {
+ var condition;
+ var out;
+ var x;
+ var y;
+
+ condition = filledarrayBy( len, ctype, bernoulli( 0.5 ) );
+ x = filledarrayBy( len, xtype, discreteUniform( -100, 100 ) );
+ y = filledarrayBy( len, ytype, discreteUniform( -100, 100 ) );
+ out = filledarray( 0.0, len, otype );
+
+ condition = {
+ 'dtype': ctype,
+ 'data': condition,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ y = {
+ 'dtype': ytype,
+ 'data': y,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ out = {
+ 'dtype': otype,
+ 'data': out,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ where2d( condition, x, y, out );
+ if ( isnan( out.data[ i%len ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( out.data[ i%len ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+ }
+}
+
+
+// MAIN //
+
+/**
+* Main execution sequence.
+*
+* @private
+*/
+function main() {
+ var len;
+ var min;
+ var max;
+ var sh;
+ var t1;
+ var t2;
+ var t3;
+ var tc;
+ var f;
+ var i;
+ var j;
+ var k;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( k = 0; k < types.length; k++ ) {
+ t1 = types[ k ];
+ t2 = types[ k ];
+ t3 = types[ k ];
+ for ( j = 0; j < conditionTypes.length; j++ ) {
+ tc = conditionTypes[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2 ];
+ f = createBenchmark( len, sh, tc, t1, t2, t3 );
+ bench( format( '%s::blocked:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+
+ sh = [ 2, len/2 ];
+ f = createBenchmark( len, sh, tc, t1, t2, t3 );
+ bench( format( '%s::blocked:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+
+ len = floor( sqrt( len ) );
+ sh = [ len, len ];
+ len *= len;
+ f = createBenchmark( len, sh, tc, t1, t2, t3 );
+ bench( format( '%s::blocked:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+ }
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.2d_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.2d_columnmajor.js
new file mode 100644
index 000000000000..a011c253cdc6
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.2d_columnmajor.js
@@ -0,0 +1,181 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var discreteUniform = require( '@stdlib/random/base/discrete-uniform' ).factory;
+var bernoulli = require( '@stdlib/random/base/bernoulli' ).factory;
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var sqrt = require( '@stdlib/math/base/special/sqrt' );
+var filledarray = require( '@stdlib/array/filled' );
+var filledarrayBy = require( '@stdlib/array/filled-by' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var format = require( '@stdlib/string/format' );
+var pkg = require( './../package.json' ).name;
+var where2d = require( './../lib/2d.js' );
+
+
+// VARIABLES //
+
+var conditionTypes = [ 'uint8' ];
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} ctype - first input ndarray data type
+* @param {string} xtype - second input ndarray data type
+* @param {string} ytype - third input ndarray data type
+* @param {string} otype - fourth input ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, ctype, xtype, ytype, otype ) {
+ var condition;
+ var out;
+ var x;
+ var y;
+
+ condition = filledarrayBy( len, ctype, bernoulli( 0.5 ) );
+ x = filledarrayBy( len, xtype, discreteUniform( -100, 100 ) );
+ y = filledarrayBy( len, ytype, discreteUniform( -100, 100 ) );
+ out = filledarray( 0.0, len, otype );
+
+ condition = {
+ 'dtype': ctype,
+ 'data': condition,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ y = {
+ 'dtype': ytype,
+ 'data': y,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ out = {
+ 'dtype': otype,
+ 'data': out,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ where2d( condition, x, y, out, false );
+ if ( isnan( out.data[ i%len ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( out.data[ i%len ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+ }
+}
+
+
+// MAIN //
+
+/**
+* Main execution sequence.
+*
+* @private
+*/
+function main() {
+ var len;
+ var min;
+ var max;
+ var sh;
+ var t1;
+ var t2;
+ var t3;
+ var tc;
+ var f;
+ var i;
+ var j;
+ var k;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( k = 0; k < types.length; k++ ) {
+ t1 = types[ k ];
+ t2 = types[ k ];
+ t3 = types[ k ];
+ for ( j = 0; j < conditionTypes.length; j++ ) {
+ tc = conditionTypes[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2 ];
+ f = createBenchmark( len, sh, tc, t1, t2, t3 );
+ bench( format( '%s:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+
+ sh = [ 2, len/2 ];
+ f = createBenchmark( len, sh, tc, t1, t2, t3 );
+ bench( format( '%s:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+
+ len = floor( sqrt( len ) );
+ sh = [ len, len ];
+ len *= len;
+ f = createBenchmark( len, sh, tc, t1, t2, t3 );
+ bench( format( '%s:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+ }
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.2d_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.2d_rowmajor.js
new file mode 100644
index 000000000000..4f545e2c3b07
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.2d_rowmajor.js
@@ -0,0 +1,181 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var discreteUniform = require( '@stdlib/random/base/discrete-uniform' ).factory;
+var bernoulli = require( '@stdlib/random/base/bernoulli' ).factory;
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var sqrt = require( '@stdlib/math/base/special/sqrt' );
+var filledarray = require( '@stdlib/array/filled' );
+var filledarrayBy = require( '@stdlib/array/filled-by' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var format = require( '@stdlib/string/format' );
+var pkg = require( './../package.json' ).name;
+var where2d = require( './../lib/2d.js' );
+
+
+// VARIABLES //
+
+var conditionTypes = [ 'uint8' ];
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} ctype - first input ndarray data type
+* @param {string} xtype - second input ndarray data type
+* @param {string} ytype - third input ndarray data type
+* @param {string} otype - fourth input ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, ctype, xtype, ytype, otype ) {
+ var condition;
+ var out;
+ var x;
+ var y;
+
+ condition = filledarrayBy( len, ctype, bernoulli( 0.5 ) );
+ x = filledarrayBy( len, xtype, discreteUniform( -100, 100 ) );
+ y = filledarrayBy( len, ytype, discreteUniform( -100, 100 ) );
+ out = filledarray( 0.0, len, otype );
+
+ condition = {
+ 'dtype': ctype,
+ 'data': condition,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ y = {
+ 'dtype': ytype,
+ 'data': y,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ out = {
+ 'dtype': otype,
+ 'data': out,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ where2d( condition, x, y, out, true );
+ if ( isnan( out.data[ i%len ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( out.data[ i%len ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+ }
+}
+
+
+// MAIN //
+
+/**
+* Main execution sequence.
+*
+* @private
+*/
+function main() {
+ var len;
+ var min;
+ var max;
+ var sh;
+ var t1;
+ var t2;
+ var t3;
+ var tc;
+ var f;
+ var i;
+ var j;
+ var k;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( k = 0; k < types.length; k++ ) {
+ t1 = types[ k ];
+ t2 = types[ k ];
+ t3 = types[ k ];
+ for ( j = 0; j < conditionTypes.length; j++ ) {
+ tc = conditionTypes[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2 ];
+ f = createBenchmark( len, sh, tc, t1, t2, t3 );
+ bench( format( '%s:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+
+ sh = [ 2, len/2 ];
+ f = createBenchmark( len, sh, tc, t1, t2, t3 );
+ bench( format( '%s:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+
+ len = floor( sqrt( len ) );
+ sh = [ len, len ];
+ len *= len;
+ f = createBenchmark( len, sh, tc, t1, t2, t3 );
+ bench( format( '%s:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+ }
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.2d_rowmajor_accessors.js b/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.2d_rowmajor_accessors.js
new file mode 100644
index 000000000000..1e61c3c94fcf
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.2d_rowmajor_accessors.js
@@ -0,0 +1,213 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var discreteUniform = require( '@stdlib/random/base/discrete-uniform' ).factory;
+var bernoulli = require( '@stdlib/random/base/bernoulli' ).factory;
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var sqrt = require( '@stdlib/math/base/special/sqrt' );
+var filledarray = require( '@stdlib/array/filled' );
+var filledarrayBy = require( '@stdlib/array/filled-by' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var format = require( '@stdlib/string/format' );
+var pkg = require( './../package.json' ).name;
+var where2d = require( './../lib/2d_accessors.js' );
+
+
+// VARIABLES //
+
+var conditionTypes = [ 'uint8' ];
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Returns an array data buffer element.
+*
+* @private
+* @param {Collection} buf - data buffer
+* @param {NonNegativeInteger} idx - element index
+* @returns {*} element
+*/
+function get( buf, idx ) {
+ return buf[ idx ];
+}
+
+/**
+* Sets an array data buffer element.
+*
+* @private
+* @param {Collection} buf - data buffer
+* @param {NonNegativeInteger} idx - element index
+* @param {*} value - value to set
+*/
+function set( buf, idx, value ) {
+ buf[ idx ] = value;
+}
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} ctype - first input ndarray data type
+* @param {string} xtype - second input ndarray data type
+* @param {string} ytype - third input ndarray data type
+* @param {string} otype - fourth input ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, ctype, xtype, ytype, otype ) {
+ var condition;
+ var out;
+ var x;
+ var y;
+
+ condition = filledarrayBy( len, ctype, bernoulli( 0.5 ) );
+ x = filledarrayBy( len, xtype, discreteUniform( -100, 100 ) );
+ y = filledarrayBy( len, ytype, discreteUniform( -100, 100 ) );
+ out = filledarray( 0.0, len, otype );
+
+ condition = {
+ 'dtype': ctype,
+ 'data': condition,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order,
+ 'accessorProtocol': true,
+ 'accessors': [ get, set ]
+ };
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order,
+ 'accessorProtocol': true,
+ 'accessors': [ get, set ]
+ };
+ y = {
+ 'dtype': ytype,
+ 'data': y,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order,
+ 'accessorProtocol': true,
+ 'accessors': [ get, set ]
+ };
+ out = {
+ 'dtype': otype,
+ 'data': out,
+ '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 i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ where2d( condition, x, y, out, true );
+ if ( isnan( out.data[ i%len ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( out.data[ i%len ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+ }
+}
+
+
+// MAIN //
+
+/**
+* Main execution sequence.
+*
+* @private
+*/
+function main() {
+ var len;
+ var min;
+ var max;
+ var sh;
+ var t1;
+ var t2;
+ var t3;
+ var tc;
+ var f;
+ var i;
+ var j;
+ var k;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( k = 0; k < types.length; k++ ) {
+ t1 = types[ k ];
+ t2 = types[ k ];
+ t3 = types[ k ];
+ for ( j = 0; j < conditionTypes.length; j++ ) {
+ tc = conditionTypes[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2 ];
+ f = createBenchmark( len, sh, tc, t1, t2, t3 );
+ bench( format( '%s::accessors:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+
+ sh = [ 2, len/2 ];
+ f = createBenchmark( len, sh, tc, t1, t2, t3 );
+ bench( format( '%s::accessors:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+
+ len = floor( sqrt( len ) );
+ sh = [ len, len ];
+ len *= len;
+ f = createBenchmark( len, sh, tc, t1, t2, t3 );
+ bench( format( '%s::accessors:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+ }
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.2d_rowmajor_accessors_complex.js b/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.2d_rowmajor_accessors_complex.js
new file mode 100644
index 000000000000..6f5220287062
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.2d_rowmajor_accessors_complex.js
@@ -0,0 +1,231 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var discreteUniform = require( '@stdlib/random/base/discrete-uniform' ).factory;
+var bernoulli = require( '@stdlib/random/base/bernoulli' ).factory;
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var sqrt = require( '@stdlib/math/base/special/sqrt' );
+var filledarray = require( '@stdlib/array/filled' );
+var filledarrayBy = require( '@stdlib/array/filled-by' );
+var ctors = require( '@stdlib/array/ctors' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var format = require( '@stdlib/string/format' );
+var pkg = require( './../package.json' ).name;
+var where2d = require( './../lib/2d_accessors.js' );
+
+
+// VARIABLES //
+
+var conditionTypes = [ 'bool' ];
+var types = [ 'complex64' ];
+var order = 'row-major';
+var abtype = {
+ 'complex64': 'float32',
+ 'complex128': 'float64'
+};
+
+
+// FUNCTIONS //
+
+/**
+* Returns an array data buffer element.
+*
+* @private
+* @param {Collection} buf - data buffer
+* @param {NonNegativeInteger} idx - element index
+* @returns {*} element
+*/
+function get( buf, idx ) {
+ return buf.get( idx );
+}
+
+/**
+* Sets an array data buffer element.
+*
+* @private
+* @param {Collection} buf - data buffer
+* @param {NonNegativeInteger} idx - element index
+* @param {*} value - value to set
+*/
+function set( buf, idx, value ) {
+ buf.set( value, idx );
+}
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} ctype - first input ndarray data type
+* @param {string} xtype - second input ndarray data type
+* @param {string} ytype - third input ndarray data type
+* @param {string} otype - fourth input ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, ctype, xtype, ytype, otype ) {
+ var condition;
+ var cstrides;
+ var cshape;
+ var stride;
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var out;
+ var x;
+ var y;
+
+ cbuf = filledarrayBy( len, ctype, bernoulli( 0.5 ) );
+ xbuf = filledarrayBy( len*2, abtype[ xtype ], discreteUniform( -100, 100 ) ); // eslint-disable-line max-len
+ ybuf = filledarrayBy( len*2, abtype[ ytype ], discreteUniform( -100, 100 ) ); // eslint-disable-line max-len
+ obuf = filledarray( 0.0, len*2, abtype[ otype ] );
+
+ // Broadcast extra dimension along last axis for the condition array for complex compatibility.
+ stride = shape2strides( shape, order );
+ cshape = shape.slice();
+ cshape.push( 1 );
+ cstrides = stride.slice();
+ cstrides.push( 0 );
+ condition = {
+ 'dtype': ctype,
+ 'data': new ( ctors( ctype ) )( cbuf.buffer ),
+ 'shape': cshape,
+ 'strides': cstrides,
+ 'offset': 0,
+ 'order': order,
+ 'accessorProtocol': true,
+ 'accessors': [ get, set ]
+ };
+ x = {
+ 'dtype': xtype,
+ 'data': new ( ctors( xtype ) )( xbuf.buffer ),
+ 'shape': shape,
+ 'strides': stride,
+ 'offset': 0,
+ 'order': order,
+ 'accessorProtocol': true,
+ 'accessors': [ get, set ]
+ };
+ y = {
+ 'dtype': ytype,
+ 'data': new ( ctors( ytype ) )( ybuf.buffer ),
+ 'shape': shape,
+ 'strides': stride,
+ 'offset': 0,
+ 'order': order,
+ 'accessorProtocol': true,
+ 'accessors': [ get, set ]
+ };
+ out = {
+ 'dtype': otype,
+ 'data': new ( ctors( otype ) )( obuf.buffer ),
+ 'shape': shape,
+ 'strides': stride,
+ 'offset': 0,
+ 'order': order,
+ 'accessorProtocol': true,
+ 'accessors': [ get, set ]
+ };
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ where2d( condition, x, y, out, true );
+ if ( isnan( obuf[ i%len ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( obuf[ i%len ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+ }
+}
+
+
+// MAIN //
+
+/**
+* Main execution sequence.
+*
+* @private
+*/
+function main() {
+ var len;
+ var min;
+ var max;
+ var sh;
+ var t1;
+ var t2;
+ var t3;
+ var tc;
+ var f;
+ var i;
+ var j;
+ var k;
+
+ min = 1; // 10^min
+ max = 5; // 10^max
+
+ for ( k = 0; k < types.length; k++ ) {
+ t1 = types[ k ];
+ t2 = types[ k ];
+ t3 = types[ k ];
+ for ( j = 0; j < conditionTypes.length; j++ ) {
+ tc = conditionTypes[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2 ];
+ f = createBenchmark( len, sh, tc, t1, t2, t3 );
+ bench( format( '%s::accessors:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+
+ sh = [ 2, len/2 ];
+ f = createBenchmark( len, sh, tc, t1, t2, t3 );
+ bench( format( '%s::accessors:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+
+ len = floor( sqrt( len ) );
+ sh = [ len, len ];
+ len *= len;
+ f = createBenchmark( len, sh, tc, t1, t2, t3 );
+ bench( format( '%s::accessors:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+ }
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.3d_blocked_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.3d_blocked_columnmajor.js
new file mode 100644
index 000000000000..dcbb0c62979a
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.3d_blocked_columnmajor.js
@@ -0,0 +1,181 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var discreteUniform = require( '@stdlib/random/base/discrete-uniform' ).factory;
+var bernoulli = require( '@stdlib/random/base/bernoulli' ).factory;
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var sqrt = require( '@stdlib/math/base/special/sqrt' );
+var filledarray = require( '@stdlib/array/filled' );
+var filledarrayBy = require( '@stdlib/array/filled-by' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var format = require( '@stdlib/string/format' );
+var pkg = require( './../package.json' ).name;
+var where3d = require( './../lib/3d_blocked.js' );
+
+
+// VARIABLES //
+
+var conditionTypes = [ 'uint8' ];
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} ctype - first input ndarray data type
+* @param {string} xtype - second input ndarray data type
+* @param {string} ytype - third input ndarray data type
+* @param {string} otype - output ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, ctype, xtype, ytype, otype ) {
+ var condition;
+ var out;
+ var x;
+ var y;
+
+ condition = filledarrayBy( len, ctype, bernoulli( 0.5 ) );
+ x = filledarrayBy( len, xtype, discreteUniform( -100, 100 ) );
+ y = filledarrayBy( len, ytype, discreteUniform( -100, 100 ) );
+ out = filledarray( 0.0, len, otype );
+
+ condition = {
+ 'dtype': ctype,
+ 'data': condition,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ y = {
+ 'dtype': ytype,
+ 'data': y,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ out = {
+ 'dtype': otype,
+ 'data': out,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ where3d( condition, x, y, out );
+ if ( isnan( out.data[ i%len ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( out.data[ i%len ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+ }
+}
+
+
+// MAIN //
+
+/**
+* Main execution sequence.
+*
+* @private
+*/
+function main() {
+ var len;
+ var min;
+ var max;
+ var sh;
+ var t1;
+ var t2;
+ var t3;
+ var tc;
+ var f;
+ var i;
+ var j;
+ var k;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( k = 0; k < types.length; k++ ) {
+ t1 = types[ k ];
+ t2 = types[ k ];
+ t3 = types[ k ];
+ for ( j = 0; j < conditionTypes.length; j++ ) {
+ tc = conditionTypes[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1 ];
+ f = createBenchmark( len, sh, tc, t1, t2, t3 );
+ bench( format( '%s::blocked:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+
+ sh = [ 1, 2, len/2 ];
+ f = createBenchmark( len, sh, tc, t1, t2, t3 );
+ bench( format( '%s::blocked:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+
+ len = floor( sqrt( len ) );
+ sh = [ len, len, len ];
+ len *= len;
+ f = createBenchmark( len, sh, tc, t1, t2, t3 );
+ bench( format( '%s::blocked:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+ }
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.3d_blocked_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.3d_blocked_rowmajor.js
new file mode 100644
index 000000000000..3707105c1454
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.3d_blocked_rowmajor.js
@@ -0,0 +1,181 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var discreteUniform = require( '@stdlib/random/base/discrete-uniform' ).factory;
+var bernoulli = require( '@stdlib/random/base/bernoulli' ).factory;
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var sqrt = require( '@stdlib/math/base/special/sqrt' );
+var filledarray = require( '@stdlib/array/filled' );
+var filledarrayBy = require( '@stdlib/array/filled-by' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var format = require( '@stdlib/string/format' );
+var pkg = require( './../package.json' ).name;
+var where3d = require( './../lib/3d_blocked.js' );
+
+
+// VARIABLES //
+
+var conditionTypes = [ 'uint8' ];
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} ctype - first input ndarray data type
+* @param {string} xtype - second input ndarray data type
+* @param {string} ytype - third input ndarray data type
+* @param {string} otype - output ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, ctype, xtype, ytype, otype ) {
+ var condition;
+ var out;
+ var x;
+ var y;
+
+ condition = filledarrayBy( len, ctype, bernoulli( 0.5 ) );
+ x = filledarrayBy( len, xtype, discreteUniform( -100, 100 ) );
+ y = filledarrayBy( len, ytype, discreteUniform( -100, 100 ) );
+ out = filledarray( 0.0, len, otype );
+
+ condition = {
+ 'dtype': ctype,
+ 'data': condition,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ y = {
+ 'dtype': ytype,
+ 'data': y,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ out = {
+ 'dtype': otype,
+ 'data': out,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ where3d( condition, x, y, out );
+ if ( isnan( out.data[ i%len ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( out.data[ i%len ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+ }
+}
+
+
+// MAIN //
+
+/**
+* Main execution sequence.
+*
+* @private
+*/
+function main() {
+ var len;
+ var min;
+ var max;
+ var sh;
+ var t1;
+ var t2;
+ var t3;
+ var tc;
+ var f;
+ var i;
+ var j;
+ var k;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( k = 0; k < types.length; k++ ) {
+ t1 = types[ k ];
+ t2 = types[ k ];
+ t3 = types[ k ];
+ for ( j = 0; j < conditionTypes.length; j++ ) {
+ tc = conditionTypes[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1 ];
+ f = createBenchmark( len, sh, tc, t1, t2, t3 );
+ bench( format( '%s::blocked:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+
+ sh = [ 1, 2, len/2 ];
+ f = createBenchmark( len, sh, tc, t1, t2, t3 );
+ bench( format( '%s::blocked:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+
+ len = floor( sqrt( len ) );
+ sh = [ len, len, len ];
+ len *= len;
+ f = createBenchmark( len, sh, tc, t1, t2, t3 );
+ bench( format( '%s::blocked:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+ }
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.3d_columnmajor.js b/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.3d_columnmajor.js
new file mode 100644
index 000000000000..9a36839bd9e3
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.3d_columnmajor.js
@@ -0,0 +1,181 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var discreteUniform = require( '@stdlib/random/base/discrete-uniform' ).factory;
+var bernoulli = require( '@stdlib/random/base/bernoulli' ).factory;
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var sqrt = require( '@stdlib/math/base/special/sqrt' );
+var filledarray = require( '@stdlib/array/filled' );
+var filledarrayBy = require( '@stdlib/array/filled-by' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var format = require( '@stdlib/string/format' );
+var pkg = require( './../package.json' ).name;
+var where3d = require( './../lib/3d.js' );
+
+
+// VARIABLES //
+
+var conditionTypes = [ 'uint8' ];
+var types = [ 'float64' ];
+var order = 'column-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} ctype - first input ndarray data type
+* @param {string} xtype - second input ndarray data type
+* @param {string} ytype - third input ndarray data type
+* @param {string} otype - output ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, ctype, xtype, ytype, otype ) {
+ var condition;
+ var out;
+ var x;
+ var y;
+
+ condition = filledarrayBy( len, ctype, bernoulli( 0.5 ) );
+ x = filledarrayBy( len, xtype, discreteUniform( -100, 100 ) );
+ y = filledarrayBy( len, ytype, discreteUniform( -100, 100 ) );
+ out = filledarray( 0.0, len, otype );
+
+ condition = {
+ 'dtype': ctype,
+ 'data': condition,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ y = {
+ 'dtype': ytype,
+ 'data': y,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ out = {
+ 'dtype': otype,
+ 'data': out,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ where3d( condition, x, y, out, false );
+ if ( isnan( out.data[ i%len ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( out.data[ i%len ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+ }
+}
+
+
+// MAIN //
+
+/**
+* Main execution sequence.
+*
+* @private
+*/
+function main() {
+ var len;
+ var min;
+ var max;
+ var sh;
+ var t1;
+ var t2;
+ var t3;
+ var tc;
+ var f;
+ var i;
+ var j;
+ var k;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( k = 0; k < types.length; k++ ) {
+ t1 = types[ k ];
+ t2 = types[ k ];
+ t3 = types[ k ];
+ for ( j = 0; j < conditionTypes.length; j++ ) {
+ tc = conditionTypes[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1 ];
+ f = createBenchmark( len, sh, tc, t1, t2, t3 );
+ bench( format( '%s:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+
+ sh = [ 1, 2, len/2 ];
+ f = createBenchmark( len, sh, tc, t1, t2, t3 );
+ bench( format( '%s:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+
+ len = floor( sqrt( len ) );
+ sh = [ len, len, len ];
+ len *= len;
+ f = createBenchmark( len, sh, tc, t1, t2, t3 );
+ bench( format( '%s:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+ }
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.3d_rowmajor.js b/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.3d_rowmajor.js
new file mode 100644
index 000000000000..0c927ad70e68
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/benchmark/benchmark.3d_rowmajor.js
@@ -0,0 +1,182 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var discreteUniform = require( '@stdlib/random/base/discrete-uniform' ).factory;
+var bernoulli = require( '@stdlib/random/base/bernoulli' ).factory;
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var sqrt = require( '@stdlib/math/base/special/sqrt' );
+var filledarray = require( '@stdlib/array/filled' );
+var filledarrayBy = require( '@stdlib/array/filled-by' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var format = require( '@stdlib/string/format' );
+var pkg = require( './../package.json' ).name;
+var where3d = require( './../lib/3d.js' );
+
+
+// VARIABLES //
+
+var conditionTypes = [ 'uint8' ];
+var types = [ 'float64' ];
+var order = 'row-major';
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - ndarray length
+* @param {NonNegativeIntegerArray} shape - ndarray shape
+* @param {string} ctype - first input ndarray data type
+* @param {string} xtype - second input ndarray data type
+* @param {string} ytype - third input ndarray data type
+* @param {string} otype - output ndarray data type
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len, shape, ctype, xtype, ytype, otype ) {
+ var condition;
+ var out;
+ var x;
+ var y;
+
+ condition = filledarrayBy( len, ctype, bernoulli( 0.5 ) );
+ x = filledarrayBy( len, xtype, discreteUniform( -100, 100 ) );
+ y = filledarrayBy( len, ytype, discreteUniform( -100, 100 ) );
+ out = filledarray( 0.0, len, otype );
+
+ condition = {
+ 'dtype': ctype,
+ 'data': condition,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ x = {
+ 'dtype': xtype,
+ 'data': x,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ y = {
+ 'dtype': ytype,
+ 'data': y,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ out = {
+ 'dtype': otype,
+ 'data': out,
+ 'shape': shape,
+ 'strides': shape2strides( shape, order ),
+ 'offset': 0,
+ 'order': order
+ };
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var i;
+
+ b.tic();
+ console.log(b.iterations);
+ for ( i = 0; i < b.iterations; i++ ) {
+ where3d( condition, x, y, out, true );
+ if ( isnan( out.data[ i%len ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( out.data[ i%len ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+ }
+}
+
+
+// MAIN //
+
+/**
+* Main execution sequence.
+*
+* @private
+*/
+function main() {
+ var len;
+ var min;
+ var max;
+ var sh;
+ var t1;
+ var t2;
+ var t3;
+ var tc;
+ var f;
+ var i;
+ var j;
+ var k;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( k = 0; k < types.length; k++ ) {
+ t1 = types[ k ];
+ t2 = types[ k ];
+ t3 = types[ k ];
+ for ( j = 0; j < conditionTypes.length; j++ ) {
+ tc = conditionTypes[ j ];
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ sh = [ len/2, 2, 1 ];
+ f = createBenchmark( len, sh, tc, t1, t2, t3 );
+ bench( format( '%s:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+
+ sh = [ 1, 2, len/2 ];
+ f = createBenchmark( len, sh, tc, t1, t2, t3 );
+ bench( format( '%s:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+
+ len = floor( sqrt( len ) );
+ sh = [ len, len, len ];
+ len *= len;
+ f = createBenchmark( len, sh, tc, t1, t2, t3 );
+ bench( format( '%s:ndims=%d,len=%d,shape=[%s],order=%s,ctype=%s,xtype=%s,ytype=%s,otype=%s', pkg, sh.length, len, sh.join( ',' ), order, tc, t1, t2, t3 ), f );
+ }
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/docs/repl.txt b/lib/node_modules/@stdlib/ndarray/base/where/docs/repl.txt
new file mode 100644
index 000000000000..09594d8e8d39
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/docs/repl.txt
@@ -0,0 +1,89 @@
+
+{{alias}}( arrays )
+ Applies a condition to elements in two input ndarrays and assigns results
+ to elements in an output ndarray.
+
+ 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).
+
+ Parameters
+ ----------
+ arrays: ArrayLikeObject
+ Array-like object containing three input ndarrays
+ and one output ndarray.
+
+ Examples
+ --------
+ // Define ndarray data and meta data...
+ > var cbuf = new {{alias:@stdlib/array/uint8}}( [ 1, 0, 0, 1 ] );
+ > var xbuf = new {{alias:@stdlib/array/float64}}( [ 1.0, 2.0, 3.0, 4.0 ] );
+ > var ybuf = new {{alias:@stdlib/array/float64}}( [ -1.0, -2.0, -3.0, -4.0 ] );
+ > var obuf = new {{alias:@stdlib/array/float64}}( [ 0.0, 0.0, 0.0, 0.0 ] );
+ > var dtype = 'float64';
+ > var shape = [ 2, 2 ];
+ > var sc = [ 2, 1 ];
+ > var sx = [ 2, 1 ];
+ > var sy = [ 2, 1 ];
+ > var so = [ 2, 1 ];
+ > var oc = 0;
+ > var ox = 0;
+ > var oy = 0;
+ > var oo = 0;
+ > var order = 'row-major';
+
+ // Using ndarrays...
+ > var condition = {{alias:@stdlib/ndarray/ctor}}( 'uint8', cbuf, shape, sc, oc, order );
+ > var x = {{alias:@stdlib/ndarray/ctor}}( dtype, xbuf, shape, sx, ox, order );
+ > var y = {{alias:@stdlib/ndarray/ctor}}( dtype, ybuf, shape, sy, oy, order );
+ > var out = {{alias:@stdlib/ndarray/ctor}}( dtype, obuf, shape, so, oo, order );
+ > {{alias}}( [ condition, x, y, out ] );
+ > out.data
+ [ 1.0, -2.0, -3.0, 4.0 ]
+
+ // Using minimal ndarray-like objects...
+ > condition = {
+ ... 'dtype': 'uint8',
+ ... 'data': cbuf,
+ ... 'shape': shape,
+ ... 'strides': sc,
+ ... 'offset': oc,
+ ... 'order': order
+ ... };
+ > x = {
+ ... 'dtype': dtype,
+ ... 'data': xbuf,
+ ... 'shape': shape,
+ ... 'strides': sx,
+ ... 'offset': ox,
+ ... 'order': order
+ ... };
+ > y = {
+ ... 'dtype': dtype,
+ ... 'data': ybuf,
+ ... 'shape': shape,
+ ... 'strides': sy,
+ ... 'offset': oy,
+ ... 'order': order
+ ... };
+ > out = {
+ ... 'dtype': dtype,
+ ... 'data': obuf,
+ ... 'shape': shape,
+ ... 'strides': so,
+ ... 'offset': oo,
+ ... 'order': order
+ ... };
+ > {{alias}}( [ condition, x, y, out ] );
+ > out.data
+ [ 1.0, -2.0, -3.0, 4.0 ]
+
+ See Also
+ --------
+
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/docs/types/index.d.ts b/lib/node_modules/@stdlib/ndarray/base/where/docs/types/index.d.ts
new file mode 100644
index 000000000000..7594d1962465
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/docs/types/index.d.ts
@@ -0,0 +1,77 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+// TypeScript Version: 4.1
+
+///
+
+import { ArrayLike } from '@stdlib/types/array';
+import { ndarray } from '@stdlib/types/ndarray';
+
+/**
+* Applies a condition to elements in two input ndarrays and assigns results to elements in an output ndarray.
+*
+* @param arrays - array-like object containing three input ndarrays and one output ndarray
+* @throws arrays must have the same number of dimensions
+* @throws arrays must have the same shape
+* @throws condition array must be a boolean or uint8 ndarray
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+* var Uint8Array = require( '@stdlib/array/uint8' );
+* var ndarray = require( '@stdlib/ndarray/ctor' );
+*
+* // Create data buffers:
+* var cbuf = new Uint8Array( [ 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1 ] );
+* 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 ] );
+* var ybuf = 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 ] );
+* var obuf = new Float64Array( 6 );
+*
+* // Define the shape of the input and output arrays:
+* var shape = [ 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 4, 4, 1 ];
+* var sx = [ 4, 4, 1 ];
+* var sy = [ 4, 4, 1 ];
+* var so = [ 2, 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 1;
+* var ox = 1;
+* var oy = 1;
+* var oo = 0;
+*
+* // Create the input and output ndarrays:
+* var condition = ndarray( 'uint8', cbuf, shape, sc, oc, 'row-major' );
+* var x = ndarray( 'float64', xbuf, shape, sx, ox, 'row-major' );
+* var y = ndarray( 'float64', ybuf, shape, sy, oy, 'row-major' );
+* var out = ndarray( 'float64', obuf, shape, so, oo, 'row-major' );
+*
+* // Apply the condition:
+* where( [ condition, x, y, out ] );
+*
+* console.log( out.data );
+* // => [ -2.0, -3.0, 6.0, 7.0, -10.0, -11.0 ]
+*/
+declare function where( arrays: ArrayLike ): void;
+
+
+// EXPORTS //
+
+export = where;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/docs/types/test.ts b/lib/node_modules/@stdlib/ndarray/base/where/docs/types/test.ts
new file mode 100644
index 000000000000..ce13ebab15d8
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/docs/types/test.ts
@@ -0,0 +1,61 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+import zeros = require( '@stdlib/ndarray/zeros' );
+import where = require( './index' );
+
+
+// TESTS //
+
+// The function returns `undefined`...
+{
+ const condition = zeros( [ 2, 2 ], {
+ 'dtype': 'uint8'
+ });
+ const x = zeros( [ 2, 2 ] );
+ const y = zeros( [ 2, 2 ] );
+ const out = zeros( [ 2, 2 ] );
+ const arrays = [ condition, x, y, out ];
+
+ where( arrays ); // $ExpectType void
+}
+
+// The compiler throws an error if the function is provided a first argument which is not an array-like object containing ndarray-like objects...
+{
+ where( '5' ); // $ExpectError
+ where( 5 ); // $ExpectError
+ where( true ); // $ExpectError
+ where( false ); // $ExpectError
+ where( null ); // $ExpectError
+ where( undefined ); // $ExpectError
+ where( {} ); // $ExpectError
+ where( [ 1 ] ); // $ExpectError
+ where( ( x: number ): number => x ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an unsupported number of arguments...
+{
+ const condition = zeros( [ 2, 2 ] );
+ const x = zeros( [ 2, 2 ] );
+ const y = zeros( [ 2, 2 ] );
+ const out = zeros( [ 2, 2 ] );
+ const arrays = [ condition, x, y, out ];
+
+ where(); // $ExpectError
+ where( arrays, 10 ); // $ExpectError
+}
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/examples/index.js b/lib/node_modules/@stdlib/ndarray/base/where/examples/index.js
new file mode 100644
index 000000000000..29d4d9cad23b
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/examples/index.js
@@ -0,0 +1,71 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+var discreteUniform = require( '@stdlib/random/base/discrete-uniform' ).factory;
+var bernoulli = require( '@stdlib/random/base/bernoulli' ).factory;
+var filledarray = require( '@stdlib/array/filled' );
+var filledarrayBy = require( '@stdlib/array/filled-by' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var ndarray2array = require( '@stdlib/ndarray/base/to-array' );
+var where = require( './../lib' );
+
+var N = 10;
+var shape = [ 5, 2 ];
+var condition = {
+ 'dtype': 'uint8',
+ 'data': filledarrayBy( N, 'uint8', bernoulli( 0.5 ) ),
+ 'shape': shape,
+ 'strides': [ 2, 1 ],
+ 'offset': 0,
+ 'order': 'row-major'
+};
+console.log( ndarray2array( condition.data, condition.shape, condition.strides, condition.offset, condition.order ) ); // eslint-disable-line max-len
+
+var x = {
+ 'dtype': 'generic',
+ 'data': filledarrayBy( N, 'generic', discreteUniform( 0, 100 ) ),
+ 'shape': shape,
+ 'strides': [ 2, 1 ],
+ 'offset': 0,
+ 'order': 'row-major'
+};
+console.log( ndarray2array( x.data, x.shape, x.strides, x.offset, x.order ) );
+
+var y = {
+ 'dtype': 'generic',
+ 'data': filledarrayBy( N, 'generic', discreteUniform( -100, 0 ) ),
+ 'shape': shape,
+ 'strides': [ 2, 1 ],
+ 'offset': 0,
+ 'order': 'row-major'
+};
+console.log( ndarray2array( y.data, y.shape, y.strides, y.offset, y.order ) );
+
+var out = {
+ 'dtype': 'generic',
+ 'data': filledarray( 0, N, 'generic' ),
+ 'shape': shape.slice(),
+ 'strides': shape2strides( shape, 'column-major' ),
+ 'offset': 0,
+ 'order': 'column-major'
+};
+
+where( [ condition, x, y, out ] );
+console.log( ndarray2array( out.data, out.shape, out.strides, out.offset, out.order ) ); // eslint-disable-line max-len
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/0d.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/0d.js
new file mode 100644
index 000000000000..4b2d066dde26
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/0d.js
@@ -0,0 +1,129 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MAIN //
+
+/**
+* Applies a condition to two zero-dimensional input ndarrays according to a zero-dimensional boolean ndarray and assigns the result to elements in a zero-dimensional output ndarray.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @returns {void}
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+* var Uint8Array = require( '@stdlib/array/uint8' );
+*
+* // Create data buffers:
+* var cbuf = new Uint8Array( [ 1 ] );
+* var xbuf = new Float64Array( [ 1.0 ] );
+* var ybuf = new Float64Array( [ 2.0 ] );
+* var obuf = new Float64Array( 1 );
+*
+* // Define the shape of the arrays (0-dimensional = scalar):
+* var shape = [];
+*
+* // Define the array strides:
+* var sc = [ 0 ];
+* var sx = [ 0 ];
+* var sy = [ 0 ];
+* var so = [ 0 ];
+*
+* // Define the index offsets:
+* var oc = 0;
+* var ox = 0;
+* var oy = 0;
+* var oo = 0;
+*
+* // Create the ndarray-like objects:
+* var condition = {
+* 'dtype': 'uint8',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major'
+* };
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+* var y = {
+* 'dtype': 'float64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major'
+* };
+* var out = {
+* 'dtype': 'float64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major'
+* };
+*
+* // Apply the condition:
+* where0d( condition, x, y, out );
+*
+* console.log( out.data );
+* // => [ 1.0 ]
+*/
+function where0d( condition, x, y, out ) {
+ out.data[ out.offset ] = ( condition.data[ condition.offset ] ) ? x.data[ x.offset ] : y.data[ y.offset ]; // eslint-disable-line max-len
+}
+
+
+// EXPORTS //
+
+module.exports = where0d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/0d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/0d_accessors.js
new file mode 100644
index 000000000000..9d978e5f01b2
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/0d_accessors.js
@@ -0,0 +1,153 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MAIN //
+
+/**
+* Applies a condition to two zero-dimensional input ndarrays according to a zero-dimensional boolean ndarray and assigns the result to elements in a zero-dimensional output ndarray.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} condition.accessors - data buffer accessors
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} y.accessors - data buffer accessors
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} out.accessors - data buffer accessors
+* @returns {void}
+*
+* @example
+* var Complex64Array = require( '@stdlib/array/complex64' );
+* var BooleanArray = require( '@stdlib/array/bool' );
+* var realf = require( '@stdlib/complex/float32/real' );
+* var imagf = require( '@stdlib/complex/float32/imag' );
+*
+* // Create data buffers:
+* var cbuf = new BooleanArray( [ 1 ] );
+* var xbuf = new Complex64Array( [ 1.0, 2.0 ] );
+* var ybuf = new Complex64Array( [ 3.0, 4.0 ] );
+* var obuf = new Complex64Array( 1 );
+*
+* // Define the shape of the arrays (0-dimensional = scalar):
+* var shape = [];
+*
+* // Define the array strides:
+* var sc = [ 0 ];
+* var sx = [ 0 ];
+* var sy = [ 0 ];
+* var so = [ 0 ];
+*
+* // Define the index offsets:
+* var oc = 0;
+* var ox = 0;
+* var oy = 0;
+* var oo = 0;
+*
+* // Define getters and setters:
+* function getter( buf, idx ) {
+* return buf.get( idx );
+* }
+*
+* function setter( buf, idx, value ) {
+* buf.set( value, idx );
+* }
+*
+* // Create the ndarray-like objects:
+* var condition = {
+* 'dtype': 'bool',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var x = {
+* 'dtype': 'complex64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var y = {
+* 'dtype': 'complex64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var out = {
+* 'dtype': 'complex64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+*
+* // Apply the condition:
+* where0d( condition, x, y, out );
+*
+* var v = out.data.get( 0 );
+*
+* var re = realf( v );
+* // returns 1.0
+*
+* var im = imagf( v );
+* // returns 2.0
+*/
+function where0d( condition, x, y, out ) {
+ out.accessors[ 1 ]( out.data, out.offset, ( condition.accessors[ 0 ]( condition.data, condition.offset ) ) ? x.accessors[ 0 ]( x.data, x.offset ) : y.accessors[ 0 ]( y.data, y.offset ) ); // eslint-disable-line max-len
+}
+
+
+// EXPORTS //
+
+module.exports = where0d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/10d.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/10d.js
new file mode 100644
index 000000000000..9a0085a3463f
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/10d.js
@@ -0,0 +1,392 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/* eslint-disable max-depth */
+
+'use strict';
+
+// MAIN //
+
+/**
+* Applies a condition to two ten-dimensional input ndarrays according to a ten-dimensional boolean ndarray and assigns results to elements in a ten-dimensional output ndarray.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order
+* @returns {void}
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+* var Uint8Array = require( '@stdlib/array/uint8' );
+*
+* // Create data buffers:
+* var cbuf = new Uint8Array( [ 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1 ] );
+* 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 ] );
+* var ybuf = 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 ] );
+* var obuf = new Float64Array( 6 );
+*
+* // Define the shape of the input and output arrays:
+* var shape = [ 1, 1, 1, 1, 1, 1, 1, 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 12, 12, 12, 12, 12, 12, 12, 4, 4, 1 ];
+* var sx = [ 12, 12, 12, 12, 12, 12, 12, 4, 4, 1 ];
+* var sy = [ 12, 12, 12, 12, 12, 12, 12, 4, 4, 1 ];
+* var so = [ 6, 6, 6, 6, 6, 6, 6, 2, 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 1;
+* var ox = 1;
+* var oy = 1;
+* var oo = 0;
+*
+* // Create the input and output ndarray-like objects:
+* var condition = {
+* 'dtype': 'uint8',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major'
+* };
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+* var y = {
+* 'dtype': 'float64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major'
+* };
+* var out = {
+* 'dtype': 'float64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major'
+* };
+*
+* // Apply the condition:
+* where10d( condition, x, y, out, true );
+*
+* console.log( out.data );
+* // => [ -2.0, -3.0, 6.0, 7.0, -10.0, -11.0 ]
+*/
+function where10d( condition, x, y, out, isRowMajor ) { // eslint-disable-line max-statements, max-lines-per-function
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var dc0;
+ var dc1;
+ var dc2;
+ var dc3;
+ var dc4;
+ var dc5;
+ var dc6;
+ var dc7;
+ var dc8;
+ var dc9;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var dx7;
+ var dx8;
+ var dx9;
+ var dy0;
+ var dy1;
+ var dy2;
+ var dy3;
+ var dy4;
+ var dy5;
+ var dy6;
+ var dy7;
+ var dy8;
+ var dy9;
+ var do0;
+ var do1;
+ var do2;
+ var do3;
+ var do4;
+ var do5;
+ var do6;
+ var do7;
+ var do8;
+ var do9;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var S3;
+ var S4;
+ var S5;
+ var S6;
+ var S7;
+ var S8;
+ var S9;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ 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#, dc#, dx#, dy#, do#, 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;
+ sc = condition.strides;
+ sx = x.strides;
+ sy = y.strides;
+ so = out.strides;
+ if ( isRowMajor ) {
+ // 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 ];
+ dc0 = sc[ 9 ]; // offset increment for innermost loop
+ dc1 = sc[ 8 ] - ( S0*sc[9] );
+ dc2 = sc[ 7 ] - ( S1*sc[8] );
+ dc3 = sc[ 6 ] - ( S2*sc[7] );
+ dc4 = sc[ 5 ] - ( S3*sc[6] );
+ dc5 = sc[ 4 ] - ( S4*sc[5] );
+ dc6 = sc[ 3 ] - ( S5*sc[4] );
+ dc7 = sc[ 2 ] - ( S6*sc[3] );
+ dc8 = sc[ 1 ] - ( S7*sc[2] );
+ dc9 = sc[ 0 ] - ( S8*sc[1] ); // offset increment for outermost loop
+ dx0 = sx[ 9 ];
+ 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] );
+ dy0 = sy[ 9 ];
+ dy1 = sy[ 8 ] - ( S0*sy[9] );
+ dy2 = sy[ 7 ] - ( S1*sy[8] );
+ dy3 = sy[ 6 ] - ( S2*sy[7] );
+ dy4 = sy[ 5 ] - ( S3*sy[6] );
+ dy5 = sy[ 4 ] - ( S4*sy[5] );
+ dy6 = sy[ 3 ] - ( S5*sy[4] );
+ dy7 = sy[ 2 ] - ( S6*sy[3] );
+ dy8 = sy[ 1 ] - ( S7*sy[2] );
+ dy9 = sy[ 0 ] - ( S8*sy[1] );
+ do0 = so[ 9 ];
+ do1 = so[ 8 ] - ( S0*so[9] );
+ do2 = so[ 7 ] - ( S1*so[8] );
+ do3 = so[ 6 ] - ( S2*so[7] );
+ do4 = so[ 5 ] - ( S3*so[6] );
+ do5 = so[ 4 ] - ( S4*so[5] );
+ do6 = so[ 3 ] - ( S5*so[4] );
+ do7 = so[ 2 ] - ( S6*so[3] );
+ do8 = so[ 1 ] - ( S7*so[2] );
+ do9 = so[ 0 ] - ( S8*so[1] );
+ } 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 ];
+ dc0 = sc[ 0 ]; // offset increment for innermost loop
+ dc1 = sc[ 1 ] - ( S0*sc[0] );
+ dc2 = sc[ 2 ] - ( S1*sc[1] );
+ dc3 = sc[ 3 ] - ( S2*sc[2] );
+ dc4 = sc[ 4 ] - ( S3*sc[3] );
+ dc5 = sc[ 5 ] - ( S4*sc[4] );
+ dc6 = sc[ 6 ] - ( S5*sc[5] );
+ dc7 = sc[ 7 ] - ( S6*sc[6] );
+ dc8 = sc[ 8 ] - ( S7*sc[7] );
+ dc9 = sc[ 9 ] - ( S8*sc[8] ); // offset increment for outermost loop
+ dx0 = sx[ 0 ];
+ 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] );
+ dy0 = sy[ 0 ];
+ dy1 = sy[ 1 ] - ( S0*sy[0] );
+ dy2 = sy[ 2 ] - ( S1*sy[1] );
+ dy3 = sy[ 3 ] - ( S2*sy[2] );
+ dy4 = sy[ 4 ] - ( S3*sy[3] );
+ dy5 = sy[ 5 ] - ( S4*sy[4] );
+ dy6 = sy[ 6 ] - ( S5*sy[5] );
+ dy7 = sy[ 7 ] - ( S6*sy[6] );
+ dy8 = sy[ 8 ] - ( S7*sy[7] );
+ dy9 = sy[ 9 ] - ( S8*sy[8] );
+ do0 = so[ 0 ];
+ do1 = so[ 1 ] - ( S0*so[0] );
+ do2 = so[ 2 ] - ( S1*so[1] );
+ do3 = so[ 3 ] - ( S2*so[2] );
+ do4 = so[ 4 ] - ( S3*so[3] );
+ do5 = so[ 5 ] - ( S4*so[4] );
+ do6 = so[ 6 ] - ( S5*so[5] );
+ do7 = so[ 7 ] - ( S6*so[6] );
+ do8 = so[ 8 ] - ( S7*so[7] );
+ do9 = so[ 9 ] - ( S8*so[8] );
+ }
+ // Set the pointers to the first indexed elements in the respective ndarrays...
+ ic = condition.offset;
+ ix = x.offset;
+ iy = y.offset;
+ io = out.offset;
+
+ // Cache references to the input and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.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++ ) {
+ obuf[ io ] = ( cbuf[ ic ] ) ? xbuf[ ix ] : ybuf[ iy ]; // eslint-disable-line max-len
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+ ic += dc2;
+ ix += dx2;
+ iy += dy2;
+ io += do2;
+ }
+ ic += dc3;
+ ix += dx3;
+ iy += dy3;
+ io += do3;
+ }
+ ic += dc4;
+ ix += dx4;
+ iy += dy4;
+ io += do4;
+ }
+ ic += dc5;
+ ix += dx5;
+ iy += dy5;
+ io += do5;
+ }
+ ic += dc6;
+ ix += dx6;
+ iy += dy6;
+ io += do6;
+ }
+ ic += dc7;
+ ix += dx7;
+ iy += dy7;
+ io += do7;
+ }
+ ic += dc8;
+ ix += dx8;
+ iy += dy8;
+ io += do8;
+ }
+ ic += dc9;
+ ix += dx9;
+ iy += dy9;
+ io += do9;
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = where10d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/10d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/10d_accessors.js
new file mode 100644
index 000000000000..2ff07aaa0632
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/10d_accessors.js
@@ -0,0 +1,427 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/* eslint-disable max-depth */
+
+'use strict';
+
+// MAIN //
+
+/**
+* Applies a condition to two ten-dimensional input ndarrays according to a ten-dimensional boolean ndarray and assigns results to elements in a ten-dimensional output ndarray.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} condition.accessors - data buffer accessors
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} y.accessors - data buffer accessors
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} out.accessors - data buffer accessors
+* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order
+* @returns {void}
+*
+* @example
+* var BooleanArray = require( '@stdlib/array/bool' );
+* var Complex64Array = require( '@stdlib/array/complex64' );
+* var Complex64 = require( '@stdlib/complex/float32/ctor' );
+* var realf = require( '@stdlib/complex/float32/real' );
+* var imagf = require( '@stdlib/complex/float32/imag' );
+*
+* // Create data buffers:
+* var cbuf = new BooleanArray( [ 1, 0, 0, 1, 0, 1, 1, 0 ] );
+* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0] );
+* var ybuf = new Complex64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0 ] );
+* var obuf = new Complex64Array( 4 );
+*
+* // Define the shape of the input and output arrays:
+* var shape = [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 4, 4, 4, 4, 4, 4, 4, 4, 2, 1 ];
+* var sx = [ 4, 4, 4, 4, 4, 4, 4, 4, 2, 1 ];
+* var sy = [ 4, 4, 4, 4, 4, 4, 4, 4, 2, 1 ];
+* var so = [ 4, 4, 4, 4, 4, 4, 4, 4, 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 0;
+* var ox = 0;
+* var oy = 0;
+* var oo = 0;
+*
+* // Define getters and setters:
+* function getter( buf, idx ) {
+* return buf.get( idx );
+* }
+*
+* function setter( buf, idx, value ) {
+* buf.set( value, idx );
+* }
+*
+* // Create the input and output ndarray-like objects:
+* var condition = {
+* 'dtype': 'bool',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var x = {
+* 'dtype': 'complex64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var y = {
+* 'dtype': 'complex64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var out = {
+* 'dtype': 'complex64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+*
+* // Apply the condition:
+* where10d( condition, x, y, out, true );
+*
+* var v = out.data.get( 0 );
+*
+* var re = realf( v );
+* // returns 1.0
+*
+* var im = imagf( v );
+* // returns 2.0
+*/
+function where10d( condition, x, y, out, isRowMajor ) { // eslint-disable-line max-statements, max-lines-per-function
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var getc;
+ var getx;
+ var gety;
+ var seto;
+ var dc0;
+ var dc1;
+ var dc2;
+ var dc3;
+ var dc4;
+ var dc5;
+ var dc6;
+ var dc7;
+ var dc8;
+ var dc9;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var dx7;
+ var dx8;
+ var dx9;
+ var dy0;
+ var dy1;
+ var dy2;
+ var dy3;
+ var dy4;
+ var dy5;
+ var dy6;
+ var dy7;
+ var dy8;
+ var dy9;
+ var do0;
+ var do1;
+ var do2;
+ var do3;
+ var do4;
+ var do5;
+ var do6;
+ var do7;
+ var do8;
+ var do9;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var S3;
+ var S4;
+ var S5;
+ var S6;
+ var S7;
+ var S8;
+ var S9;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ 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#, dc#, dx#, dy#, do#, 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;
+ sc = condition.strides;
+ sx = x.strides;
+ sy = y.strides;
+ so = out.strides;
+ if ( isRowMajor ) {
+ // 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 ];
+ dc0 = sc[ 9 ]; // offset increment for innermost loop
+ dc1 = sc[ 8 ] - ( S0*sc[9] );
+ dc2 = sc[ 7 ] - ( S1*sc[8] );
+ dc3 = sc[ 6 ] - ( S2*sc[7] );
+ dc4 = sc[ 5 ] - ( S3*sc[6] );
+ dc5 = sc[ 4 ] - ( S4*sc[5] );
+ dc6 = sc[ 3 ] - ( S5*sc[4] );
+ dc7 = sc[ 2 ] - ( S6*sc[3] );
+ dc8 = sc[ 1 ] - ( S7*sc[2] );
+ dc9 = sc[ 0 ] - ( S8*sc[1] ); // offset increment for outermost loop
+ dx0 = sx[ 9 ];
+ 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] );
+ dy0 = sy[ 9 ];
+ dy1 = sy[ 8 ] - ( S0*sy[9] );
+ dy2 = sy[ 7 ] - ( S1*sy[8] );
+ dy3 = sy[ 6 ] - ( S2*sy[7] );
+ dy4 = sy[ 5 ] - ( S3*sy[6] );
+ dy5 = sy[ 4 ] - ( S4*sy[5] );
+ dy6 = sy[ 3 ] - ( S5*sy[4] );
+ dy7 = sy[ 2 ] - ( S6*sy[3] );
+ dy8 = sy[ 1 ] - ( S7*sy[2] );
+ dy9 = sy[ 0 ] - ( S8*sy[1] );
+ do0 = so[ 9 ];
+ do1 = so[ 8 ] - ( S0*so[9] );
+ do2 = so[ 7 ] - ( S1*so[8] );
+ do3 = so[ 6 ] - ( S2*so[7] );
+ do4 = so[ 5 ] - ( S3*so[6] );
+ do5 = so[ 4 ] - ( S4*so[5] );
+ do6 = so[ 3 ] - ( S5*so[4] );
+ do7 = so[ 2 ] - ( S6*so[3] );
+ do8 = so[ 1 ] - ( S7*so[2] );
+ do9 = so[ 0 ] - ( S8*so[1] );
+ } 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 ];
+ dc0 = sc[ 0 ]; // offset increment for innermost loop
+ dc1 = sc[ 1 ] - ( S0*sc[0] );
+ dc2 = sc[ 2 ] - ( S1*sc[1] );
+ dc3 = sc[ 3 ] - ( S2*sc[2] );
+ dc4 = sc[ 4 ] - ( S3*sc[3] );
+ dc5 = sc[ 5 ] - ( S4*sc[4] );
+ dc6 = sc[ 6 ] - ( S5*sc[5] );
+ dc7 = sc[ 7 ] - ( S6*sc[6] );
+ dc8 = sc[ 8 ] - ( S7*sc[7] );
+ dc9 = sc[ 9 ] - ( S8*sc[8] ); // offset increment for outermost loop
+ dx0 = sx[ 0 ];
+ 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] );
+ dy0 = sy[ 0 ];
+ dy1 = sy[ 1 ] - ( S0*sy[0] );
+ dy2 = sy[ 2 ] - ( S1*sy[1] );
+ dy3 = sy[ 3 ] - ( S2*sy[2] );
+ dy4 = sy[ 4 ] - ( S3*sy[3] );
+ dy5 = sy[ 5 ] - ( S4*sy[4] );
+ dy6 = sy[ 6 ] - ( S5*sy[5] );
+ dy7 = sy[ 7 ] - ( S6*sy[6] );
+ dy8 = sy[ 8 ] - ( S7*sy[7] );
+ dy9 = sy[ 9 ] - ( S8*sy[8] );
+ do0 = so[ 0 ];
+ do1 = so[ 1 ] - ( S0*so[0] );
+ do2 = so[ 2 ] - ( S1*so[1] );
+ do3 = so[ 3 ] - ( S2*so[2] );
+ do4 = so[ 4 ] - ( S3*so[3] );
+ do5 = so[ 5 ] - ( S4*so[4] );
+ do6 = so[ 6 ] - ( S5*so[5] );
+ do7 = so[ 7 ] - ( S6*so[6] );
+ do8 = so[ 8 ] - ( S7*so[7] );
+ do9 = so[ 9 ] - ( S8*so[8] );
+ }
+ // Set the pointers to the first indexed elements in the respective ndarrays...
+ ic = condition.offset;
+ ix = x.offset;
+ iy = y.offset;
+ io = out.offset;
+
+ // Cache references to the input and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.data;
+
+ // Cache accessors:
+ getc = condition.accessors[ 0 ];
+ getx = x.accessors[ 0 ];
+ gety = y.accessors[ 0 ];
+ seto = out.accessors[ 1 ];
+
+ // 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++ ) {
+ seto( obuf, io, ( getc( cbuf, ic ) ) ? getx( xbuf, ix ) : gety( ybuf, iy ) ); // eslint-disable-line max-len
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+ ic += dc2;
+ ix += dx2;
+ iy += dy2;
+ io += do2;
+ }
+ ic += dc3;
+ ix += dx3;
+ iy += dy3;
+ io += do3;
+ }
+ ic += dc4;
+ ix += dx4;
+ iy += dy4;
+ io += do4;
+ }
+ ic += dc5;
+ ix += dx5;
+ iy += dy5;
+ io += do5;
+ }
+ ic += dc6;
+ ix += dx6;
+ iy += dy6;
+ io += do6;
+ }
+ ic += dc7;
+ ix += dx7;
+ iy += dy7;
+ io += do7;
+ }
+ ic += dc8;
+ ix += dx8;
+ iy += dy8;
+ io += do8;
+ }
+ ic += dc9;
+ ix += dx9;
+ iy += dy9;
+ io += do9;
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = where10d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/10d_blocked.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/10d_blocked.js
new file mode 100644
index 000000000000..97d684b4abb0
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/10d_blocked.js
@@ -0,0 +1,528 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/* eslint-disable max-depth, max-len, max-lines */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/ternary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/ternary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Applies a condition to two ten-dimensional input ndarrays according to a ten-dimensional boolean ndarray and assigns results to elements in a ten-dimensional output ndarray via loop blocking.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @returns {void}
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+* var Uint8Array = require( '@stdlib/array/uint8' );
+*
+* // Create data buffers:
+* var cbuf = new Uint8Array( [ 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1 ] );
+* 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 ] );
+* var ybuf = 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 ] );
+* var obuf = new Float64Array( 6 );
+*
+* // Define the shape of the input and output arrays:
+* var shape = [ 1, 1, 1, 1, 1, 1, 1, 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 12, 12, 12, 12, 12, 12, 12, 4, 4, 1 ];
+* var sx = [ 12, 12, 12, 12, 12, 12, 12, 4, 4, 1 ];
+* var sy = [ 12, 12, 12, 12, 12, 12, 12, 4, 4, 1 ];
+* var so = [ 6, 6, 6, 6, 6, 6, 6, 2, 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 1;
+* var ox = 1;
+* var oy = 1;
+* var oo = 0;
+*
+* // Create the input and output ndarray-like objects:
+* var condition = {
+* 'dtype': 'uint8',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major'
+* };
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+* var y = {
+* 'dtype': 'float64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major'
+* };
+* var out = {
+* 'dtype': 'float64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major'
+* };
+*
+* // Apply the condition:
+* blockedwhere10d( condition, x, y, out );
+*
+* console.log( out.data );
+* // => [ -2.0, -3.0, 6.0, 7.0, -10.0, -11.0 ]
+*/
+function blockedwhere10d( condition, x, y, out ) { // eslint-disable-line max-statements, max-lines-per-function
+ var bsize;
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var dc0;
+ var dc1;
+ var dc2;
+ var dc3;
+ var dc4;
+ var dc5;
+ var dc6;
+ var dc7;
+ var dc8;
+ var dc9;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var dx7;
+ var dx8;
+ var dx9;
+ var dy0;
+ var dy1;
+ var dy2;
+ var dy3;
+ var dy4;
+ var dy5;
+ var dy6;
+ var dy7;
+ var dy8;
+ var dy9;
+ var do0;
+ var do1;
+ var do2;
+ var do3;
+ var do4;
+ var do5;
+ var do6;
+ var do7;
+ var do8;
+ var do9;
+ var oc1;
+ var oc2;
+ var oc3;
+ var oc4;
+ var oc5;
+ var oc6;
+ var oc7;
+ var oc8;
+ var oc9;
+ var ox1;
+ var ox2;
+ var ox3;
+ var ox4;
+ var ox5;
+ var ox6;
+ var ox7;
+ var ox8;
+ var ox9;
+ var oy1;
+ var oy2;
+ var oy3;
+ var oy4;
+ var oy5;
+ var oy6;
+ var oy7;
+ var oy8;
+ var oy9;
+ var oo1;
+ var oo2;
+ var oo3;
+ var oo4;
+ var oo5;
+ var oo6;
+ var oo7;
+ var oo8;
+ var oo9;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var s4;
+ var s5;
+ var s6;
+ var s7;
+ var s8;
+ var s9;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var oc;
+ var ox;
+ var oy;
+ var oo;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+ var i7;
+ var i8;
+ var i9;
+ var j0;
+ var j1;
+ var j2;
+ var j3;
+ var j4;
+ var j5;
+ var j6;
+ var j7;
+ var j8;
+ var j9;
+ var o;
+
+ // Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( condition.shape, condition.strides, x.strides, y.strides, out.strides );
+
+ // Strides output as follows: sx, sy, sz, sw. According to arguments order respectively..
+ sh = o.sh;
+ sc = o.sx;
+ sx = o.sy;
+ sy = o.sz;
+ so = o.sw;
+
+ // Determine the block size:
+ bsize = blockSize( condition.dtype, x.dtype, y.dtype, out.dtype );
+
+ // Cache the indices of the first indexed elements in the respective ndarrays...
+ oc = condition.offset;
+ ox = x.offset;
+ oy = y.offset;
+ oo = out.offset;
+
+ // Cache references to the input and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.data;
+
+ // Cache offset increments for the innermost loop...
+ dc0 = sc[0];
+ dx0 = sx[0];
+ dy0 = sy[0];
+ do0 = so[0];
+
+ // Iterate over blocks...
+ for ( j9 = sh[9]; j9 > 0; ) {
+ if ( j9 < bsize ) {
+ s9 = j9;
+ j9 = 0;
+ } else {
+ s9 = bsize;
+ j9 -= bsize;
+ }
+ oc9 = oc + ( j9*sc[9] );
+ ox9 = ox + ( j9*sx[9] );
+ oy9 = oy + ( j9*sy[9] );
+ oo9 = oo + ( j9*so[9] );
+ for ( j8 = sh[8]; j8 > 0; ) {
+ if ( j8 < bsize ) {
+ s8 = j8;
+ j8 = 0;
+ } else {
+ s8 = bsize;
+ j8 -= bsize;
+ }
+ dc9 = sc[9] - ( s8*sc[8] );
+ dx9 = sx[9] - ( s8*sx[8] );
+ dy9 = sy[9] - ( s8*sy[8] );
+ do9 = so[9] - ( s8*so[8] );
+ oc8 = oc9 + ( j8*sc[8] );
+ ox8 = ox9 + ( j8*sx[8] );
+ oy8 = oy9 + ( j8*sy[8] );
+ oo8 = oo9 + ( j8*so[8] );
+ for ( j7 = sh[7]; j7 > 0; ) {
+ if ( j7 < bsize ) {
+ s7 = j7;
+ j7 = 0;
+ } else {
+ s7 = bsize;
+ j7 -= bsize;
+ }
+ dc8 = sc[8] - ( s7*sc[7] );
+ dx8 = sx[8] - ( s7*sx[7] );
+ dy8 = sy[8] - ( s7*sy[7] );
+ do8 = so[8] - ( s7*so[7] );
+ oc7 = oc8 + ( j7*sc[7] );
+ ox7 = ox8 + ( j7*sx[7] );
+ oy7 = oy8 + ( j7*sy[7] );
+ oo7 = oo8 + ( j7*so[7] );
+ for ( j6 = sh[6]; j6 > 0; ) {
+ if ( j6 < bsize ) {
+ s6 = j6;
+ j6 = 0;
+ } else {
+ s6 = bsize;
+ j6 -= bsize;
+ }
+ dc7 = sc[7] - ( s6*sc[6] );
+ dx7 = sx[7] - ( s6*sx[6] );
+ dy7 = sy[7] - ( s6*sy[6] );
+ do7 = so[7] - ( s6*so[6] );
+ oc6 = oc7 + ( j6*sc[6] );
+ ox6 = ox7 + ( j6*sx[6] );
+ oy6 = oy7 + ( j6*sy[6] );
+ oo6 = oo7 + ( j6*so[6] );
+ for ( j5 = sh[5]; j5 > 0; ) {
+ if ( j5 < bsize ) {
+ s5 = j5;
+ j5 = 0;
+ } else {
+ s5 = bsize;
+ j5 -= bsize;
+ }
+ dc6 = sc[6] - ( s5*sc[5] );
+ dx6 = sx[6] - ( s5*sx[5] );
+ dy6 = sy[6] - ( s5*sy[5] );
+ do6 = so[6] - ( s5*so[5] );
+ oc5 = oc6 + ( j5*sc[5] );
+ ox5 = ox6 + ( j5*sx[5] );
+ oy5 = oy6 + ( j5*sy[5] );
+ oo5 = oo6 + ( j5*so[5] );
+ for ( j4 = sh[4]; j4 > 0; ) {
+ if ( j4 < bsize ) {
+ s4 = j4;
+ j4 = 0;
+ } else {
+ s4 = bsize;
+ j4 -= bsize;
+ }
+ dc5 = sc[5] - ( s4*sc[4] );
+ dx5 = sx[5] - ( s4*sx[4] );
+ dy5 = sy[5] - ( s4*sy[4] );
+ do5 = so[5] - ( s4*so[4] );
+ oc4 = oc5 + ( j4*sc[4] );
+ ox4 = ox5 + ( j4*sx[4] );
+ oy4 = oy5 + ( j4*sy[4] );
+ oo4 = oo5 + ( j4*so[4] );
+ for ( j3 = sh[3]; j3 > 0; ) {
+ if ( j3 < bsize ) {
+ s3 = j3;
+ j3 = 0;
+ } else {
+ s3 = bsize;
+ j3 -= bsize;
+ }
+ dc4 = sc[4] - ( s3*sc[3] );
+ dx4 = sx[4] - ( s3*sx[3] );
+ dy4 = sy[4] - ( s3*sy[3] );
+ do4 = so[4] - ( s3*so[3] );
+ oc3 = oc4 + ( j3*sc[3] );
+ ox3 = ox4 + ( j3*sx[3] );
+ oy3 = oy4 + ( j3*sy[3] );
+ oo3 = oo4 + ( j3*so[3] );
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ dc3 = sc[3] - ( s2*sc[2] );
+ dx3 = sx[3] - ( s2*sx[2] );
+ dy3 = sy[3] - ( s2*sy[2] );
+ do3 = so[3] - ( s2*so[2] );
+ oc2 = oc3 + ( j2*sc[2] );
+ ox2 = ox3 + ( j2*sx[2] );
+ oy2 = oy3 + ( j2*sy[2] );
+ oo2 = oo3 + ( j2*so[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dc2 = sc[2] - ( s1*sc[1] );
+ dx2 = sx[2] - ( s1*sx[1] );
+ dy2 = sy[2] - ( s1*sy[1] );
+ do2 = so[2] - ( s1*so[1] );
+ oc1 = oc2 + ( j1*sc[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ oy1 = oy2 + ( j1*sy[1] );
+ oo1 = oo2 + ( j1*so[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute index offsets for the first input and output ndarray elements in the current block...
+ ic = oc1 + ( j0*sc[0] );
+ ix = ox1 + ( j0*sx[0] );
+ iy = oy1 + ( j0*sy[0] );
+ io = oo1 + ( j0*so[0] );
+
+ // Compute loop offset increments...
+ dc1 = sc[1] - ( s0*sc[0] );
+ dx1 = sx[1] - ( s0*sx[0] );
+ dy1 = sy[1] - ( s0*sy[0] );
+ do1 = so[1] - ( s0*so[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++ ) {
+ obuf[ io ] = ( cbuf[ ic ] ) ? xbuf[ ix ] : ybuf[ iy ];
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+ ic += dc2;
+ ix += dx2;
+ iy += dy2;
+ io += do2;
+ }
+ ic += dc3;
+ ix += dx3;
+ iy += dy3;
+ io += do3;
+ }
+ ic += dc4;
+ ix += dx4;
+ iy += dy4;
+ io += do4;
+ }
+ ic += dc5;
+ ix += dx5;
+ iy += dy5;
+ io += do5;
+ }
+ ic += dc6;
+ ix += dx6;
+ iy += dy6;
+ io += do6;
+ }
+ ic += dc7;
+ ix += dx7;
+ iy += dy7;
+ io += do7;
+ }
+ ic += dc8;
+ ix += dx8;
+ iy += dy8;
+ io += do8;
+ }
+ ic += dc9;
+ ix += dx9;
+ iy += dy9;
+ io += do9;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = blockedwhere10d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/10d_blocked_accessors.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/10d_blocked_accessors.js
new file mode 100644
index 000000000000..801472edcbfc
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/10d_blocked_accessors.js
@@ -0,0 +1,563 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/* eslint-disable max-depth, max-len, max-lines */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/ternary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/ternary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Applies a condition to two ten-dimensional input ndarrays according to a ten-dimensional boolean ndarray and assigns results to elements in a ten-dimensional output ndarray via loop blocking.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} condition.accessors - data buffer accessors
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} y.accessors - data buffer accessors
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} out.accessors - data buffer accessors
+* @returns {void}
+*
+* @example
+* var Complex64Array = require( '@stdlib/array/complex64' );
+* var BooleanArray = require( '@stdlib/array/bool' )
+* var Complex64 = require( '@stdlib/complex/float32/ctor' );
+* var realf = require( '@stdlib/complex/float32/real' );
+* var imagf = require( '@stdlib/complex/float32/imag' );
+*
+* // Create data buffers:
+* var cbuf = new BooleanArray( [ 1, 0, 0, 1, 0, 1, 1, 0 ] );
+* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+* var ybuf = new Complex64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0 ] );
+* var obuf = new Complex64Array( 4 );
+*
+* // Define the shape of the input and output arrays:
+* var shape = [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 4, 4, 4, 4, 4, 4, 4, 4, 2, 1 ];
+* var sx = [ 4, 4, 4, 4, 4, 4, 4, 4, 2, 1 ];
+* var sy = [ 4, 4, 4, 4, 4, 4, 4, 4, 2, 1 ];
+* var so = [ 4, 4, 4, 4, 4, 4, 4, 4, 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 0;
+* var ox = 0;
+* var oy = 0;
+* var oo = 0;
+*
+* // Define getters and setters:
+* function getter( buf, idx ) {
+* return buf.get( idx );
+* }
+*
+* function setter( buf, idx, value ) {
+* buf.set( value, idx );
+* }
+*
+* // Create the input and output ndarray-like objects:
+* var condition = {
+* 'dtype': 'bool',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var x = {
+* 'dtype': 'complex64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var y = {
+* 'dtype': 'complex64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var out = {
+* 'dtype': 'complex64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+*
+* // Apply the condition:
+* blockedwhere10d( condition, x, y, out );
+*
+* var v = out.data.get( 0 );
+*
+* var re = realf( v );
+* // returns 1.0
+*
+* var im = imagf( v );
+* // returns 2.0
+*/
+function blockedwhere10d( condition, x, y, out ) { // eslint-disable-line max-statements, max-lines-per-function
+ var bsize;
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var getc;
+ var getx;
+ var gety;
+ var seto;
+ var dc0;
+ var dc1;
+ var dc2;
+ var dc3;
+ var dc4;
+ var dc5;
+ var dc6;
+ var dc7;
+ var dc8;
+ var dc9;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var dx7;
+ var dx8;
+ var dx9;
+ var dy0;
+ var dy1;
+ var dy2;
+ var dy3;
+ var dy4;
+ var dy5;
+ var dy6;
+ var dy7;
+ var dy8;
+ var dy9;
+ var do0;
+ var do1;
+ var do2;
+ var do3;
+ var do4;
+ var do5;
+ var do6;
+ var do7;
+ var do8;
+ var do9;
+ var oc1;
+ var oc2;
+ var oc3;
+ var oc4;
+ var oc5;
+ var oc6;
+ var oc7;
+ var oc8;
+ var oc9;
+ var ox1;
+ var ox2;
+ var ox3;
+ var ox4;
+ var ox5;
+ var ox6;
+ var ox7;
+ var ox8;
+ var ox9;
+ var oy1;
+ var oy2;
+ var oy3;
+ var oy4;
+ var oy5;
+ var oy6;
+ var oy7;
+ var oy8;
+ var oy9;
+ var oo1;
+ var oo2;
+ var oo3;
+ var oo4;
+ var oo5;
+ var oo6;
+ var oo7;
+ var oo8;
+ var oo9;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var s4;
+ var s5;
+ var s6;
+ var s7;
+ var s8;
+ var s9;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var oc;
+ var ox;
+ var oy;
+ var oo;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+ var i7;
+ var i8;
+ var i9;
+ var j0;
+ var j1;
+ var j2;
+ var j3;
+ var j4;
+ var j5;
+ var j6;
+ var j7;
+ var j8;
+ var j9;
+ var o;
+
+ // Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( condition.shape, condition.strides, x.strides, y.strides, out.strides );
+
+ // Strides output as follows: sx, sy, sz, sw. According to arguments order respectively..
+ sh = o.sh;
+ sc = o.sx;
+ sx = o.sy;
+ sy = o.sz;
+ so = o.sw;
+
+ // Determine the block size:
+ bsize = blockSize( condition.dtype, x.dtype, y.dtype, out.dtype );
+
+ // Cache the indices of the first indexed elements in the respective ndarrays...
+ oc = condition.offset;
+ ox = x.offset;
+ oy = y.offset;
+ oo = out.offset;
+
+ // Cache references to the input and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.data;
+
+ // Cache offset increments for the innermost loop...
+ dc0 = sc[0];
+ dx0 = sx[0];
+ dy0 = sy[0];
+ do0 = so[0];
+
+ // Cache accessors:
+ getc = condition.accessors[0];
+ getx = x.accessors[0];
+ gety = y.accessors[0];
+ seto = out.accessors[1];
+
+ // Iterate over blocks...
+ for ( j9 = sh[9]; j9 > 0; ) {
+ if ( j9 < bsize ) {
+ s9 = j9;
+ j9 = 0;
+ } else {
+ s9 = bsize;
+ j9 -= bsize;
+ }
+ oc9 = oc + ( j9*sc[9] );
+ ox9 = ox + ( j9*sx[9] );
+ oy9 = oy + ( j9*sy[9] );
+ oo9 = oo + ( j9*so[9] );
+ for ( j8 = sh[8]; j8 > 0; ) {
+ if ( j8 < bsize ) {
+ s8 = j8;
+ j8 = 0;
+ } else {
+ s8 = bsize;
+ j8 -= bsize;
+ }
+ dc9 = sc[9] - ( s8*sc[8] );
+ dx9 = sx[9] - ( s8*sx[8] );
+ dy9 = sy[9] - ( s8*sy[8] );
+ do9 = so[9] - ( s8*so[8] );
+ oc8 = oc9 + ( j8*sc[8] );
+ ox8 = ox9 + ( j8*sx[8] );
+ oy8 = oy9 + ( j8*sy[8] );
+ oo8 = oo9 + ( j8*so[8] );
+ for ( j7 = sh[7]; j7 > 0; ) {
+ if ( j7 < bsize ) {
+ s7 = j7;
+ j7 = 0;
+ } else {
+ s7 = bsize;
+ j7 -= bsize;
+ }
+ dc8 = sc[8] - ( s7*sc[7] );
+ dx8 = sx[8] - ( s7*sx[7] );
+ dy8 = sy[8] - ( s7*sy[7] );
+ do8 = so[8] - ( s7*so[7] );
+ oc7 = oc8 + ( j7*sc[7] );
+ ox7 = ox8 + ( j7*sx[7] );
+ oy7 = oy8 + ( j7*sy[7] );
+ oo7 = oo8 + ( j7*so[7] );
+ for ( j6 = sh[6]; j6 > 0; ) {
+ if ( j6 < bsize ) {
+ s6 = j6;
+ j6 = 0;
+ } else {
+ s6 = bsize;
+ j6 -= bsize;
+ }
+ dc7 = sc[7] - ( s6*sc[6] );
+ dx7 = sx[7] - ( s6*sx[6] );
+ dy7 = sy[7] - ( s6*sy[6] );
+ do7 = so[7] - ( s6*so[6] );
+ oc6 = oc7 + ( j6*sc[6] );
+ ox6 = ox7 + ( j6*sx[6] );
+ oy6 = oy7 + ( j6*sy[6] );
+ oo6 = oo7 + ( j6*so[6] );
+ for ( j5 = sh[5]; j5 > 0; ) {
+ if ( j5 < bsize ) {
+ s5 = j5;
+ j5 = 0;
+ } else {
+ s5 = bsize;
+ j5 -= bsize;
+ }
+ dc6 = sc[6] - ( s5*sc[5] );
+ dx6 = sx[6] - ( s5*sx[5] );
+ dy6 = sy[6] - ( s5*sy[5] );
+ do6 = so[6] - ( s5*so[5] );
+ oc5 = oc6 + ( j5*sc[5] );
+ ox5 = ox6 + ( j5*sx[5] );
+ oy5 = oy6 + ( j5*sy[5] );
+ oo5 = oo6 + ( j5*so[5] );
+ for ( j4 = sh[4]; j4 > 0; ) {
+ if ( j4 < bsize ) {
+ s4 = j4;
+ j4 = 0;
+ } else {
+ s4 = bsize;
+ j4 -= bsize;
+ }
+ dc5 = sc[5] - ( s4*sc[4] );
+ dx5 = sx[5] - ( s4*sx[4] );
+ dy5 = sy[5] - ( s4*sy[4] );
+ do5 = so[5] - ( s4*so[4] );
+ oc4 = oc5 + ( j4*sc[4] );
+ ox4 = ox5 + ( j4*sx[4] );
+ oy4 = oy5 + ( j4*sy[4] );
+ oo4 = oo5 + ( j4*so[4] );
+ for ( j3 = sh[3]; j3 > 0; ) {
+ if ( j3 < bsize ) {
+ s3 = j3;
+ j3 = 0;
+ } else {
+ s3 = bsize;
+ j3 -= bsize;
+ }
+ dc4 = sc[4] - ( s3*sc[3] );
+ dx4 = sx[4] - ( s3*sx[3] );
+ dy4 = sy[4] - ( s3*sy[3] );
+ do4 = so[4] - ( s3*so[3] );
+ oc3 = oc4 + ( j3*sc[3] );
+ ox3 = ox4 + ( j3*sx[3] );
+ oy3 = oy4 + ( j3*sy[3] );
+ oo3 = oo4 + ( j3*so[3] );
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ dc3 = sc[3] - ( s2*sc[2] );
+ dx3 = sx[3] - ( s2*sx[2] );
+ dy3 = sy[3] - ( s2*sy[2] );
+ do3 = so[3] - ( s2*so[2] );
+ oc2 = oc3 + ( j2*sc[2] );
+ ox2 = ox3 + ( j2*sx[2] );
+ oy2 = oy3 + ( j2*sy[2] );
+ oo2 = oo3 + ( j2*so[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dc2 = sc[2] - ( s1*sc[1] );
+ dx2 = sx[2] - ( s1*sx[1] );
+ dy2 = sy[2] - ( s1*sy[1] );
+ do2 = so[2] - ( s1*so[1] );
+ oc1 = oc2 + ( j1*sc[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ oy1 = oy2 + ( j1*sy[1] );
+ oo1 = oo2 + ( j1*so[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute index offsets for the first input and output ndarray elements in the current block...
+ ic = oc1 + ( j0*sc[0] );
+ ix = ox1 + ( j0*sx[0] );
+ iy = oy1 + ( j0*sy[0] );
+ io = oo1 + ( j0*so[0] );
+
+ // Compute loop offset increments...
+ dc1 = sc[1] - ( s0*sc[0] );
+ dx1 = sx[1] - ( s0*sx[0] );
+ dy1 = sy[1] - ( s0*sy[0] );
+ do1 = so[1] - ( s0*so[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++ ) {
+ seto( obuf, io, ( getc( cbuf, ic ) ) ? getx( xbuf, ix ) : gety( ybuf, iy ) );
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+ ic += dc2;
+ ix += dx2;
+ iy += dy2;
+ io += do2;
+ }
+ ic += dc3;
+ ix += dx3;
+ iy += dy3;
+ io += do3;
+ }
+ ic += dc4;
+ ix += dx4;
+ iy += dy4;
+ io += do4;
+ }
+ ic += dc5;
+ ix += dx5;
+ iy += dy5;
+ io += do5;
+ }
+ ic += dc6;
+ ix += dx6;
+ iy += dy6;
+ io += do6;
+ }
+ ic += dc7;
+ ix += dx7;
+ iy += dy7;
+ io += do7;
+ }
+ ic += dc8;
+ ix += dx8;
+ iy += dy8;
+ io += do8;
+ }
+ ic += dc9;
+ ix += dx9;
+ iy += dy9;
+ io += do9;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = blockedwhere10d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/1d.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/1d.js
new file mode 100644
index 000000000000..70e0649a1d04
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/1d.js
@@ -0,0 +1,170 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MAIN //
+
+/**
+* Applies a condition to two one-dimensional input ndarrays according to a one-dimensional boolean ndarray and assigns results to elements in a one-dimensional output ndarray.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @returns {void}
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+* var Uint8Array = require( '@stdlib/array/uint8' );
+*
+* // Create data buffers:
+* var cbuf = new Uint8Array( [ 1, 0, 1, 0 ] );
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+* var ybuf = new Float64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0 ] );
+* var obuf = new Float64Array( 4 );
+*
+* // Define the shape of the input and output arrays:
+* var shape = [ 4 ];
+*
+* // Define the array strides:
+* var sc = [ 1 ];
+* var sx = [ 2 ];
+* var sy = [ 2 ];
+* var so = [ 1 ];
+*
+* // Define the index offsets:
+* var oc = 0;
+* var ox = 0;
+* var oy = 0;
+* var oo = 0;
+*
+* // Create the input and output ndarray-like objects:
+* var condition = {
+* 'dtype': 'uint8',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major'
+* };
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+* var y = {
+* 'dtype': 'float64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major'
+* };
+* var out = {
+* 'dtype': 'float64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major'
+* };
+*
+* // Apply the condition:
+* where1d( condition, x, y, out );
+*
+* console.log( out.data );
+* // => [ 1.0, -3.0, 5.0, -7.0 ]
+*/
+function where1d( condition, x, y, out ) {
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var dout;
+ var dc;
+ var dx;
+ var dy;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var S;
+ var i;
+
+ // Extract loop variables: dimensions and loop offset (pointer) increments...
+ S = x.shape[ 0 ];
+ dc = condition.strides[ 0 ];
+ dx = x.strides[ 0 ];
+ dy = y.strides[ 0 ];
+ dout = out.strides[ 0 ];
+
+ // Set the pointers to the first indexed elements in the respective ndarrays...
+ ic = condition.offset;
+ ix = x.offset;
+ iy = y.offset;
+ io = out.offset;
+
+ // Cache references to the input and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.data;
+
+ // Iterate over the ndarray dimensions...
+ for ( i = 0; i < S; i++ ) {
+ obuf[ io ] = ( cbuf[ ic ] ) ? xbuf[ ix ] : ybuf[ iy ];
+ ic += dc;
+ ix += dx;
+ iy += dy;
+ io += dout;
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = where1d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/1d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/1d_accessors.js
new file mode 100644
index 000000000000..af7afc0df3f2
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/1d_accessors.js
@@ -0,0 +1,204 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MAIN //
+
+/**
+* Applies a condition to two one-dimensional input ndarrays according to a one-dimensional boolean ndarray and assigns results to elements in a one-dimensional output ndarray.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} condition.accessors - data buffer accessors
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} y.accessors - data buffer accessors
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} out.accessors - data buffer accessors
+* @returns {void}
+*
+* @example
+* var Complex64Array = require( '@stdlib/array/complex64' );
+* var BooleanArray = require( '@stdlib/array/bool' );
+* var realf = require( '@stdlib/complex/float32/real' );
+* var imagf = require( '@stdlib/complex/float32/imag' );
+*
+* // Create data buffers:
+* var cbuf = new BooleanArray( [ 1, 0, 1, 0, 1, 0, 1, 0 ] );
+* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+* var ybuf = new Complex64Array( [-1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0] );
+* var obuf = new Complex64Array( 4 );
+*
+* // Define the shape of the input and output arrays:
+* var shape = [ 4 ];
+*
+* // Define the array strides:
+* var sc = [ 1 ];
+* var sx = [ 1 ];
+* var sy = [ 1 ];
+* var so = [ 1 ];
+*
+* // Define the index offsets:
+* var oc = 0;
+* var ox = 0;
+* var oy = 0;
+* var oo = 0;
+*
+* // Define getters and setters:
+* function getter( buf, idx ) {
+* return buf.get( idx );
+* }
+*
+* function setter( buf, idx, value ) {
+* buf.set( value, idx );
+* }
+*
+* // Create the input and output ndarray-like objects:
+* var condition = {
+* 'dtype': 'bool',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var x = {
+* 'dtype': 'complex64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var y = {
+* 'dtype': 'complex64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var out = {
+* 'dtype': 'complex64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+*
+* // Apply the condition:
+* where1d( condition, x, y, out );
+*
+* var v = out.data.get( 0 );
+*
+* var re = realf( v );
+* // returns 1.0
+*
+* var im = imagf( v );
+* // returns 2.0
+*/
+function where1d( condition, x, y, out ) {
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var getc;
+ var getx;
+ var gety;
+ var seto;
+ var dout;
+ var dc;
+ var dx;
+ var dy;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var i;
+ var S;
+
+ // Extract loop variables: dimensions and loop offset (pointer) increments...
+ S = x.shape[ 0 ];
+ dc = condition.strides[ 0 ];
+ dx = x.strides[ 0 ];
+ dy = y.strides[ 0 ];
+ dout = out.strides[ 0 ];
+
+ // Set the pointers to the first indexed elements in the respective ndarrays...
+ ic = condition.offset;
+ ix = x.offset;
+ iy = y.offset;
+ io = out.offset;
+
+ // Cache references to the input and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.data;
+
+ // Cache accessors:
+ getc = condition.accessors[ 0 ];
+ getx = x.accessors[ 0 ];
+ gety = y.accessors[ 0 ];
+ seto = out.accessors[ 1 ];
+
+ // Iterate over the ndarray dimensions...
+ for ( i = 0; i < S; i++ ) {
+ seto( obuf, io, ( getc( cbuf, ic ) ) ? getx( xbuf, ix ) : gety( ybuf, iy ) ); // eslint-disable-line max-len
+ ic += dc;
+ ix += dx;
+ iy += dy;
+ io += dout;
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = where1d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/2d.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/2d.js
new file mode 100644
index 000000000000..6377911b2240
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/2d.js
@@ -0,0 +1,214 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MAIN //
+
+/**
+* Applies a condition to two two-dimensional input ndarrays according to a two-dimensional boolean ndarray and assigns results to elements in a two-dimensional output ndarray.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order
+* @returns {void}
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+* var Uint8Array = require( '@stdlib/array/uint8' );
+*
+* // Create data buffers:
+* var cbuf = new Uint8Array( [ 1, 0, 0, 1 ] );
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] );
+* var ybuf = new Float64Array( [ -1.0, -2.0, -3.0, -4.0 ] );
+* var obuf = new Float64Array( 4 );
+*
+* // Define the shape of the arrays:
+* var shape = [ 2, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 2, 1 ];
+* var sx = [ 2, 1 ];
+* var sy = [ 2, 1 ];
+* var so = [ 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 0;
+* var ox = 0;
+* var oy = 0;
+* var oo = 0;
+*
+* // Create the ndarray-like objects:
+* var condition = {
+* 'dtype': 'uint8',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major'
+* };
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+* var y = {
+* 'dtype': 'float64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major'
+* };
+* var out = {
+* 'dtype': 'float64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major'
+* };
+*
+* // Apply the condition:
+* where2d( condition, x, y, out, true );
+*
+* console.log( out.data );
+* // => [ 1.0, -2.0, -3.0, 4.0 ]
+*/
+function where2d( condition, x, y, out, isRowMajor ) {
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var dc0;
+ var dc1;
+ var dx0;
+ var dx1;
+ var dy0;
+ var dy1;
+ var do0;
+ var do1;
+ var sh;
+ var S0;
+ var S1;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var i0;
+ var i1;
+
+ // Note on variable naming convention: S#, dc#, dx#, dy#, do#, 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 = condition.shape;
+ sc = condition.strides;
+ sx = x.strides;
+ sy = y.strides;
+ so = out.strides;
+ if ( isRowMajor ) {
+ // For row-major ndarrays, the last dimensions have the fastest changing indices...
+ S0 = sh[ 1 ];
+ S1 = sh[ 0 ];
+ dc0 = sc[ 1 ]; // offset increment for innermost loop
+ dc1 = sc[ 0 ] - ( S0*sc[1] ); // offset increment for outermost loop
+ dx0 = sx[ 1 ];
+ dx1 = sx[ 0 ] - ( S0*sx[1] );
+ dy0 = sy[ 1 ];
+ dy1 = sy[ 0 ] - ( S0*sy[1] );
+ do0 = so[ 1 ];
+ do1 = so[ 0 ] - ( S0*so[1] );
+ } else { // order === 'column-major'
+ // For column-major ndarrays, the first dimensions have the fastest changing indices...
+ S0 = sh[ 0 ];
+ S1 = sh[ 1 ];
+ dc0 = sc[ 0 ]; // offset increment for innermost loop
+ dc1 = sc[ 1 ] - ( S0*sc[0] ); // offset increment for outermost loop
+ dx0 = sx[ 0 ];
+ dx1 = sx[ 1 ] - ( S0*sx[0] );
+ dy0 = sy[ 0 ];
+ dy1 = sy[ 1 ] - ( S0*sy[0] );
+ do0 = so[ 0 ];
+ do1 = so[ 1 ] - ( S0*so[0] );
+ }
+ // Set the pointers to the first indexed elements in the respective ndarrays...
+ ic = condition.offset;
+ ix = x.offset;
+ iy = y.offset;
+ io = out.offset;
+
+ // Cache references to the ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.data;
+
+ // Iterate over the ndarray dimensions...
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ obuf[ io ] = ( cbuf[ ic ] ) ? xbuf[ ix ] : ybuf[ iy ];
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = where2d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/2d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/2d_accessors.js
new file mode 100644
index 000000000000..cdae1c4f4d5e
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/2d_accessors.js
@@ -0,0 +1,248 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MAIN //
+
+/**
+* Applies a condition to two two-dimensional input ndarrays according to a two-dimensional boolean ndarray and assigns results to elements in a two-dimensional output ndarray.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} condition.accessors - data buffer accessors
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} y.accessors - data buffer accessors
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} out.accessors - data buffer accessors
+* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order
+* @returns {void}
+*
+* @example
+* var Complex64Array = require( '@stdlib/array/complex64' );
+* var BooleanArray = require( '@stdlib/array/bool' );
+* var realf = require( '@stdlib/complex/float32/real' );
+* var imagf = require( '@stdlib/complex/float32/imag' );
+*
+* // Create data buffers:
+* var cbuf = new BooleanArray( [ 1, 0, 0, 1 ] );
+* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+* var ybuf = new Complex64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0 ] );
+* var obuf = new Complex64Array( 4 );
+*
+* // Define the shape of the arrays:
+* var shape = [ 2, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 2, 1 ];
+* var sx = [ 2, 1 ];
+* var sy = [ 2, 1 ];
+* var so = [ 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 0;
+* var ox = 0;
+* var oy = 0;
+* var oo = 0;
+*
+* // Define getters and setters:
+* function getter( buf, idx ) {
+* return buf.get( idx );
+* }
+*
+* function setter( buf, idx, value ) {
+* buf.set( value, idx );
+* }
+*
+* // Create the ndarray-like objects:
+* var condition = {
+* 'dtype': 'bool',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var x = {
+* 'dtype': 'complex64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var y = {
+* 'dtype': 'complex64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var out = {
+* 'dtype': 'complex64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+*
+* // Apply the condition:
+* where2d( condition, x, y, out, true );
+*
+* var v = out.data.get( 0 );
+*
+* var re = realf( v );
+* // returns 1.0
+*
+* var im = imagf( v );
+* // returns 2.0
+*/
+function where2d( condition, x, y, out, isRowMajor ) {
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var getc;
+ var getx;
+ var gety;
+ var seto;
+ var dc0;
+ var dc1;
+ var dx0;
+ var dx1;
+ var dy0;
+ var dy1;
+ var do0;
+ var do1;
+ var sh;
+ var S0;
+ var S1;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var i0;
+ var i1;
+
+ // Note on variable naming convention: S#, dc#, dx#, dy#, do#, 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 = condition.shape;
+ sc = condition.strides;
+ sx = x.strides;
+ sy = y.strides;
+ so = out.strides;
+ if ( isRowMajor ) {
+ // For row-major ndarrays, the last dimensions have the fastest changing indices...
+ S0 = sh[ 1 ];
+ S1 = sh[ 0 ];
+ dc0 = sc[ 1 ]; // offset increment for innermost loop
+ dc1 = sc[ 0 ] - ( S0*sc[1] ); // offset increment for outermost loop
+ dx0 = sx[ 1 ];
+ dx1 = sx[ 0 ] - ( S0*sx[1] );
+ dy0 = sy[ 1 ];
+ dy1 = sy[ 0 ] - ( S0*sy[1] );
+ do0 = so[ 1 ];
+ do1 = so[ 0 ] - ( S0*so[1] );
+ } else { // order === 'column-major'
+ // For column-major ndarrays, the first dimensions have the fastest changing indices...
+ S0 = sh[ 0 ];
+ S1 = sh[ 1 ];
+ dc0 = sc[ 0 ]; // offset increment for innermost loop
+ dc1 = sc[ 1 ] - ( S0*sc[0] ); // offset increment for outermost loop
+ dx0 = sx[ 0 ];
+ dx1 = sx[ 1 ] - ( S0*sx[0] );
+ dy0 = sy[ 0 ];
+ dy1 = sy[ 1 ] - ( S0*sy[0] );
+ do0 = so[ 0 ];
+ do1 = so[ 1 ] - ( S0*so[0] );
+ }
+ // Set the pointers to the first indexed elements in the respective ndarrays...
+ ic = condition.offset;
+ ix = x.offset;
+ iy = y.offset;
+ io = out.offset;
+
+ // Cache references to the ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.data;
+
+ // Cache accessors:
+ getc = condition.accessors[ 0 ];
+ getx = x.accessors[ 0 ];
+ gety = y.accessors[ 0 ];
+ seto = out.accessors[ 1 ];
+
+ // Iterate over the ndarray dimensions...
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ seto( obuf, io, ( getc( cbuf, ic ) ) ? getx( xbuf, ix ) : gety( ybuf, iy ) ); // eslint-disable-line max-len
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = where2d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/2d_blocked.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/2d_blocked.js
new file mode 100644
index 000000000000..4972c535f5d7
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/2d_blocked.js
@@ -0,0 +1,254 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/ternary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/ternary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Applies a condition to two two-dimensional input ndarrays according to a two-dimensional boolean ndarray and assigns results to elements in a two-dimensional output ndarray via loop blocking.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @returns {void}
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+* var Uint8Array = require( '@stdlib/array/uint8' );
+*
+* // Create data buffers:
+* var cbuf = new Uint8Array( [ 1, 0, 0, 1 ] );
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+* var ybuf = new Float64Array( [ 10.0, 20.0, 30.0, 40.0 ] );
+* var obuf = new Float64Array( 4 );
+*
+* // Define the shape of the arrays:
+* var shape = [ 2, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 2, 1 ];
+* var sx = [ 4, 1 ];
+* var sy = [ 2, 1 ];
+* var so = [ 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 0;
+* var ox = 1;
+* var oy = 0;
+* var oo = 0;
+*
+* // Create the ndarray-like objects:
+* var condition = {
+* 'dtype': 'uint8',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major'
+* };
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+* var y = {
+* 'dtype': 'float64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major'
+* };
+* var out = {
+* 'dtype': 'float64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major'
+* };
+*
+* // Apply the condition:
+* blockedwhere2d( condition, x, y, out );
+*
+* console.log( out.data );
+* // => [ 2.0, 20.0, 30.0, 7.0 ]
+*/
+function blockedwhere2d( condition, x, y, out ) {
+ var bsize;
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var dc0;
+ var dc1;
+ var dx0;
+ var dx1;
+ var dy0;
+ var dy1;
+ var do0;
+ var do1;
+ var oc1;
+ var ox1;
+ var oy1;
+ var oo1;
+ var sh;
+ var s0;
+ var s1;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var oc;
+ var ox;
+ var oy;
+ var oo;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var i0;
+ var i1;
+ var j0;
+ var j1;
+ var o;
+
+ // Note on variable naming convention: s#, dc#, dx#, dy#, do#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( condition.shape, condition.strides, x.strides, y.strides, out.strides ); // eslint-disable-line max-len
+
+ // Strides output as follows: sx, sy, sz, sw. According to arguments order respectively..
+ sh = o.sh;
+ sc = o.sx;
+ sx = o.sy;
+ sy = o.sz;
+ so = o.sw;
+
+ // Determine the block size:
+ bsize = blockSize( condition.dtype, x.dtype, y.dtype, out.dtype );
+
+ // Cache the indices of the first indexed elements in the respective ndarrays...
+ oc = condition.offset;
+ ox = x.offset;
+ oy = y.offset;
+ oo = out.offset;
+
+ // Cache references to the inputs and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.data;
+
+ // Cache offset increments for the innermost loop...
+ dc0 = sc[ 0 ];
+ dx0 = sx[ 0 ];
+ dy0 = sy[ 0 ];
+ do0 = so[ 0 ];
+
+ // Iterate over blocks...
+ for ( j1 = sh[ 1 ]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ oc1 = oc + ( j1*sc[ 1 ] );
+ ox1 = ox + ( j1*sx[ 1 ] );
+ oy1 = oy + ( j1*sy[ 1 ] );
+ oo1 = oo + ( j1*so[ 1 ] );
+ for ( j0 = sh[ 0 ]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute index offsets for the first inputs and output ndarray elements in the current block...
+ ic = oc1 + ( j0*sc[ 0 ] );
+ ix = ox1 + ( j0*sx[ 0 ] );
+ iy = oy1 + ( j0*sy[ 0 ] );
+ io = oo1 + ( j0*so[ 0 ] );
+
+ // Compute loop offset increments...
+ dc1 = sc[ 1 ] - ( s0*sc[ 0 ] );
+ dx1 = sx[ 1 ] - ( s0*sx[ 0 ] );
+ dy1 = sy[ 1 ] - ( s0*sy[ 0 ] );
+ do1 = so[ 1 ] - ( s0*so[ 0 ] );
+
+ // Iterate over the ndarray dimensions...
+ for ( i1 = 0; i1 < s1; i1++ ) {
+ for ( i0 = 0; i0 < s0; i0++ ) {
+ obuf[ io ] = ( cbuf[ ic ] ) ? xbuf[ ix ] : ybuf[ iy ];
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+ }
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = blockedwhere2d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/2d_blocked_accessors.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/2d_blocked_accessors.js
new file mode 100644
index 000000000000..afb16e352854
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/2d_blocked_accessors.js
@@ -0,0 +1,288 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/ternary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/ternary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Applies a condition to two two-dimensional input ndarrays according to a two-dimensional boolean ndarray and assigns results to elements in a two-dimensional output ndarray via loop blocking.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} condition.accessors - data buffer accessors
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} y.accessors - data buffer accessors
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} out.accessors - data buffer accessors
+* @returns {void}
+*
+* @example
+* var Complex64Array = require( '@stdlib/array/complex64' );
+* var BooleanArray = require( '@stdlib/array/bool' );
+* var realf = require( '@stdlib/complex/float32/real' );
+* var imagf = require( '@stdlib/complex/float32/imag' );
+*
+* // Create data buffers:
+* var cbuf = new BooleanArray( [ 1, 0, 0, 1 ] );
+* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+* var ybuf = new Complex64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0 ] );
+* var obuf = new Complex64Array( 4 );
+*
+* // Define the shape of the arrays:
+* var shape = [ 2, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 2, 1 ];
+* var sx = [ 2, 1 ];
+* var sy = [ 2, 1 ];
+* var so = [ 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 0;
+* var ox = 0;
+* var oy = 0;
+* var oo = 0;
+*
+* // Define getters and setters:
+* function getter( buf, idx ) {
+* return buf.get( idx );
+* }
+*
+* function setter( buf, idx, value ) {
+* buf.set( value, idx );
+* }
+*
+* // Create the ndarray-like objects:
+* var condition = {
+* 'dtype': 'bool',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var x = {
+* 'dtype': 'complex64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var y = {
+* 'dtype': 'complex64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var out = {
+* 'dtype': 'complex64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+*
+* // Apply the condition:
+* blockedwhere2d( condition, x, y, out );
+*
+* var v = out.data.get( 0 );
+*
+* var re = realf( v );
+* // returns 1.0
+*
+* var im = imagf( v );
+* // returns 2.0
+*/
+function blockedwhere2d( condition, x, y, out ) {
+ var bsize;
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var getc;
+ var getx;
+ var gety;
+ var seto;
+ var dc0;
+ var dc1;
+ var dx0;
+ var dx1;
+ var dy0;
+ var dy1;
+ var do0;
+ var do1;
+ var oc1;
+ var ox1;
+ var oy1;
+ var oo1;
+ var sh;
+ var s0;
+ var s1;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var oc;
+ var ox;
+ var oy;
+ var oo;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var i0;
+ var i1;
+ var j0;
+ var j1;
+ var o;
+
+ // Note on variable naming convention: s#, dc#, dx#, dy#, do#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( condition.shape, condition.strides, x.strides, y.strides, out.strides ); // eslint-disable-line max-len
+
+ // Strides output as follows: sx, sy, sz, sw. According to arguments order respectively..
+ sh = o.sh;
+ sc = o.sx;
+ sx = o.sy;
+ sy = o.sz;
+ so = o.sw;
+
+ // Determine the block size:
+ bsize = blockSize( condition.dtype, x.dtype, y.dtype, out.dtype );
+
+ // Cache the indices of the first indexed elements in the respective ndarrays...
+ oc = condition.offset;
+ ox = x.offset;
+ oy = y.offset;
+ oo = out.offset;
+
+ // Cache references to the inputs and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.data;
+
+ // Cache offset increments for the innermost loop...
+ dc0 = sc[ 0 ];
+ dx0 = sx[ 0 ];
+ dy0 = sy[ 0 ];
+ do0 = so[ 0 ];
+
+ // Cache accessors:
+ getc = condition.accessors[ 0 ];
+ getx = x.accessors[ 0 ];
+ gety = y.accessors[ 0 ];
+ seto = out.accessors[ 1 ];
+
+ // Iterate over blocks...
+ for ( j1 = sh[ 1 ]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ oc1 = oc + ( j1*sc[ 1 ] );
+ ox1 = ox + ( j1*sx[ 1 ] );
+ oy1 = oy + ( j1*sy[ 1 ] );
+ oo1 = oo + ( j1*so[ 1 ] );
+ for ( j0 = sh[ 0 ]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute index offsets for the first inputs and output ndarray elements in the current block...
+ ic = oc1 + ( j0*sc[ 0 ] );
+ ix = ox1 + ( j0*sx[ 0 ] );
+ iy = oy1 + ( j0*sy[ 0 ] );
+ io = oo1 + ( j0*so[ 0 ] );
+
+ // Compute loop offset increments...
+ dc1 = sc[ 1 ] - ( s0*sc[ 0 ] );
+ dx1 = sx[ 1 ] - ( s0*sx[ 0 ] );
+ dy1 = sy[ 1 ] - ( s0*sy[ 0 ] );
+ do1 = so[ 1 ] - ( s0*so[ 0 ] );
+
+ // Iterate over the ndarray dimensions...
+ for ( i1 = 0; i1 < s1; i1++ ) {
+ for ( i0 = 0; i0 < s0; i0++ ) {
+ seto( obuf, io, ( getc( cbuf, ic ) ) ? getx( xbuf, ix ) : gety( ybuf, iy ) ); // eslint-disable-line max-len
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+ }
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = blockedwhere2d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/3d.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/3d.js
new file mode 100644
index 000000000000..aa352e68b1fa
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/3d.js
@@ -0,0 +1,236 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MAIN //
+
+/**
+* Applies a condition to two three-dimensional input ndarrays according to a three-dimensional boolean ndarray and assigns results to elements in a three-dimensional output ndarray.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order
+* @returns {void}
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+* var Uint8Array = require( '@stdlib/array/uint8' );
+*
+* // Create data buffers:
+* var cbuf = new Uint8Array( [ 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1 ] );
+* 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 ] );
+* var ybuf = 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 ] );
+* var obuf = new Float64Array( 6 );
+*
+* // Define the shape of the arrays:
+* var shape = [ 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 4, 4, 1 ];
+* var sx = [ 4, 4, 1 ];
+* var sy = [ 4, 4, 1 ];
+* var so = [ 2, 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 1;
+* var ox = 1;
+* var oy = 1;
+* var oo = 0;
+*
+* // Create the ndarray-like objects:
+* var condition = {
+* 'dtype': 'uint8',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major'
+* };
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+* var y = {
+* 'dtype': 'float64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major'
+* };
+* var out = {
+* 'dtype': 'float64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major'
+* };
+*
+* // Apply the condition:
+* where3d( condition, x, y, out, true );
+*
+* console.log( out.data );
+* // => [ -2.0, -3.0, 6.0, 7.0, -10.0, -11.0 ]
+*/
+function where3d( condition, x, y, out, isRowMajor ) {
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var dc0;
+ var dc1;
+ var dc2;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dy0;
+ var dy1;
+ var dy2;
+ var do0;
+ var do1;
+ var do2;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var i0;
+ var i1;
+ var i2;
+
+ // Note on variable naming convention: S#, dc#, dx#, dy#, do#, 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;
+ sc = condition.strides;
+ sx = x.strides;
+ sy = y.strides;
+ so = out.strides;
+ if ( isRowMajor ) {
+ // For row-major ndarrays, the last dimensions have the fastest changing indices...
+ S0 = sh[ 2 ];
+ S1 = sh[ 1 ];
+ S2 = sh[ 0 ];
+ dc0 = sc[ 2 ]; // offset increment for innermost loop
+ dc1 = sc[ 1 ] - ( S0*sc[2] );
+ dc2 = sc[ 0 ] - ( S1*sc[1] ); // offset increment for outermost loop
+ dx0 = sx[ 2 ];
+ dx1 = sx[ 1 ] - ( S0*sx[2] );
+ dx2 = sx[ 0 ] - ( S1*sx[1] );
+ dy0 = sy[ 2 ];
+ dy1 = sy[ 1 ] - ( S0*sy[2] );
+ dy2 = sy[ 0 ] - ( S1*sy[1] );
+ do0 = so[ 2 ];
+ do1 = so[ 1 ] - ( S0*so[2] );
+ do2 = so[ 0 ] - ( S1*so[1] );
+ } 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 ];
+ dc0 = sc[ 0 ]; // offset increment for innermost loop
+ dc1 = sc[ 1 ] - ( S0*sc[0] );
+ dc2 = sc[ 2 ] - ( S1*sc[1] ); // offset increment for outermost loop
+ dx0 = sx[ 0 ];
+ dx1 = sx[ 1 ] - ( S0*sx[0] );
+ dx2 = sx[ 2 ] - ( S1*sx[1] );
+ dy0 = sy[ 0 ];
+ dy1 = sy[ 1 ] - ( S0*sy[0] );
+ dy2 = sy[ 2 ] - ( S1*sy[1] );
+ do0 = so[ 0 ];
+ do1 = so[ 1 ] - ( S0*so[0] );
+ do2 = so[ 2 ] - ( S1*so[1] );
+ }
+ // Set the pointers to the first indexed elements in the respective ndarrays...
+ ic = condition.offset;
+ ix = x.offset;
+ iy = y.offset;
+ io = out.offset;
+
+ // Cache references to the input and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.data;
+
+ // Iterate over the ndarray dimensions...
+ for ( i2 = 0; i2 < S2; i2++ ) {
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ obuf[ io ] = ( cbuf[ ic ] ) ? xbuf[ ix ] : ybuf[ iy ];
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+ ic += dc2;
+ ix += dx2;
+ iy += dy2;
+ io += do2;
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = where3d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/3d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/3d_accessors.js
new file mode 100644
index 000000000000..4cbc4b1f404f
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/3d_accessors.js
@@ -0,0 +1,270 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MAIN //
+
+/**
+* Applies a condition to two three-dimensional input ndarrays according to a three-dimensional boolean ndarray and assigns results to elements in a three-dimensional output ndarray.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} condition.accessors - data buffer accessors
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} y.accessors - data buffer accessors
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} out.accessors - data buffer accessors
+* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order
+* @returns {void}
+*
+* @example
+* var Complex64Array = require( '@stdlib/array/complex64' );
+* var BooleanArray = require( '@stdlib/array/bool' );
+* var realf = require( '@stdlib/complex/float32/real' );
+* var imagf = require( '@stdlib/complex/float32/imag' );
+*
+* // Create data buffers:
+* var cbuf = new BooleanArray( [ 1, 0, 0, 1, 0, 1, 1, 0 ] );
+* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+* var ybuf = new Complex64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0 ] );
+* var obuf = new Complex64Array( 4 );
+*
+* // Define the shape of the arrays:
+* var shape = [ 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 4, 2, 1 ];
+* var sx = [ 4, 2, 1 ];
+* var sy = [ 4, 2, 1 ];
+* var so = [ 4, 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 0;
+* var ox = 0;
+* var oy = 0;
+* var oo = 0;
+*
+* // Define getters and setters:
+* function getter( buf, idx ) {
+* return buf.get( idx );
+* }
+*
+* function setter( buf, idx, value ) {
+* buf.set( value, idx );
+* }
+*
+* // Create the ndarray-like objects:
+* var condition = {
+* 'dtype': 'bool',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var x = {
+* 'dtype': 'complex64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var y = {
+* 'dtype': 'complex64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var out = {
+* 'dtype': 'complex64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+*
+* // Apply the condition:
+* where3d( condition, x, y, out, true );
+*
+* var v = out.data.get( 0 );
+*
+* var re = realf( v );
+* // returns 1.0
+*
+* var im = imagf( v );
+* // returns 2.0
+*/
+function where3d( condition, x, y, out, isRowMajor ) {
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var getc;
+ var getx;
+ var gety;
+ var seto;
+ var dc0;
+ var dc1;
+ var dc2;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dy0;
+ var dy1;
+ var dy2;
+ var do0;
+ var do1;
+ var do2;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var i0;
+ var i1;
+ var i2;
+
+ // Note on variable naming convention: S#, dc#, dx#, dy#, do#, 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;
+ sc = condition.strides;
+ sx = x.strides;
+ sy = y.strides;
+ so = out.strides;
+ if ( isRowMajor ) {
+ // For row-major ndarrays, the last dimensions have the fastest changing indices...
+ S0 = sh[ 2 ];
+ S1 = sh[ 1 ];
+ S2 = sh[ 0 ];
+ dc0 = sc[ 2 ]; // offset increment for innermost loop
+ dc1 = sc[ 1 ] - ( S0*sc[2] );
+ dc2 = sc[ 0 ] - ( S1*sc[1] ); // offset increment for outermost loop
+ dx0 = sx[ 2 ];
+ dx1 = sx[ 1 ] - ( S0*sx[2] );
+ dx2 = sx[ 0 ] - ( S1*sx[1] );
+ dy0 = sy[ 2 ];
+ dy1 = sy[ 1 ] - ( S0*sy[2] );
+ dy2 = sy[ 0 ] - ( S1*sy[1] );
+ do0 = so[ 2 ];
+ do1 = so[ 1 ] - ( S0*so[2] );
+ do2 = so[ 0 ] - ( S1*so[1] );
+ } 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 ];
+ dc0 = sc[ 0 ]; // offset increment for innermost loop
+ dc1 = sc[ 1 ] - ( S0*sc[0] );
+ dc2 = sc[ 2 ] - ( S1*sc[1] ); // offset increment for outermost loop
+ dx0 = sx[ 0 ];
+ dx1 = sx[ 1 ] - ( S0*sx[0] );
+ dx2 = sx[ 2 ] - ( S1*sx[1] );
+ dy0 = sy[ 0 ];
+ dy1 = sy[ 1 ] - ( S0*sy[0] );
+ dy2 = sy[ 2 ] - ( S1*sy[1] );
+ do0 = so[ 0 ];
+ do1 = so[ 1 ] - ( S0*so[0] );
+ do2 = so[ 2 ] - ( S1*so[1] );
+ }
+ // Set the pointers to the first indexed elements in the respective ndarrays...
+ ic = condition.offset;
+ ix = x.offset;
+ iy = y.offset;
+ io = out.offset;
+
+ // Cache references to the input and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.data;
+
+ // Cache accessors:
+ getc = condition.accessors[ 0 ];
+ getx = x.accessors[ 0 ];
+ gety = y.accessors[ 0 ];
+ seto = out.accessors[ 1 ];
+
+ // Iterate over the ndarray dimensions...
+ for ( i2 = 0; i2 < S2; i2++ ) {
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ seto( obuf, io, ( getc( cbuf, ic ) ) ? getx( xbuf, ix ) : gety( ybuf, iy ) ); // eslint-disable-line max-len
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+ ic += dc2;
+ ix += dx2;
+ iy += dy2;
+ io += do2;
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = where3d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/3d_blocked.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/3d_blocked.js
new file mode 100644
index 000000000000..4627115cdd03
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/3d_blocked.js
@@ -0,0 +1,289 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/* eslint-disable max-depth */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/ternary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/ternary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Applies a condition to two three-dimensional input ndarrays according to a three-dimensional boolean ndarray and assigns results to elements in a three-dimensional output ndarray via loop blocking.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @returns {void}
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* // Create data buffers:
+* var cbuf = new Uint8Array( [ 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0 ] );
+* 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 ] );
+* var ybuf = 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 ] );
+* var obuf = new Float64Array( 6 );
+*
+* // Define the shape of the input and output arrays:
+* var shape = [ 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 4, 4, 1 ];
+* var sx = [ 4, 4, 1 ];
+* var sy = [ 4, 4, 1 ];
+* var so = [ 2, 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 1;
+* var ox = 1;
+* var oy = 1;
+* var oo = 0;
+*
+* // Create the input and output ndarray-like objects:
+* var condition = {
+* 'dtype': 'uint8',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major'
+* };
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+* var y = {
+* 'dtype': 'float64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major'
+* };
+* var out = {
+* 'dtype': 'float64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major'
+* };
+*
+* // Apply the condition:
+* blockedwhere3d( condition, x, y, out );
+*
+* console.log( out.data );
+* // => [ -2.0, -3.0, 6.0, 7.0, 10.0, 11.0 ]
+*/
+function blockedwhere3d( condition, x, y, out ) { // eslint-disable-line max-statements
+ var bsize;
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var dc0;
+ var dc1;
+ var dc2;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dy0;
+ var dy1;
+ var dy2;
+ var do0;
+ var do1;
+ var do2;
+ var oc1;
+ var oc2;
+ var ox1;
+ var ox2;
+ var oy1;
+ var oy2;
+ var oo1;
+ var oo2;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var oc;
+ var ox;
+ var oy;
+ var oo;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var i0;
+ var i1;
+ var i2;
+ var j0;
+ var j1;
+ var j2;
+ var o;
+
+ // Note on variable naming convention: s#, dc#, dx#, dy#, do#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( condition.shape, condition.strides, x.strides, y.strides, out.strides ); // eslint-disable-line max-len
+
+ // Strides output as follows: sx, sy, sz, sw. According to arguments order respectively..
+ sh = o.sh;
+ sc = o.sx;
+ sx = o.sy;
+ sy = o.sz;
+ so = o.sw;
+
+ // Determine the block size:
+ bsize = blockSize( condition.dtype, x.dtype, y.dtype, out.dtype );
+
+ // Cache the indices of the first indexed elements in the respective ndarrays...
+ oc = condition.offset;
+ ox = x.offset;
+ oy = y.offset;
+ oo = out.offset;
+
+ // Cache references to the input and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.data;
+
+ // Cache offset increments for the innermost loop...
+ dc0 = sc[0];
+ dx0 = sx[0];
+ dy0 = sy[0];
+ do0 = so[0];
+
+ // Iterate over blocks...
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ oc2 = oc + ( j2*sc[2] );
+ ox2 = ox + ( j2*sx[2] );
+ oy2 = oy + ( j2*sy[2] );
+ oo2 = oo + ( j2*so[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dc2 = sc[2] - ( s1*sc[1] );
+ dx2 = sx[2] - ( s1*sx[1] );
+ dy2 = sy[2] - ( s1*sy[1] );
+ do2 = so[2] - ( s1*so[1] );
+ oc1 = oc2 + ( j1*sc[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ oy1 = oy2 + ( j1*sy[1] );
+ oo1 = oo2 + ( j1*so[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute index offsets for the first input and output ndarray elements in the current block...
+ ic = oc1 + ( j0*sc[0] );
+ ix = ox1 + ( j0*sx[0] );
+ iy = oy1 + ( j0*sy[0] );
+ io = oo1 + ( j0*so[0] );
+
+ // Compute loop offset increments...
+ dc1 = sc[1] - ( s0*sc[0] );
+ dx1 = sx[1] - ( s0*sx[0] );
+ dy1 = sy[1] - ( s0*sy[0] );
+ do1 = so[1] - ( s0*so[0] );
+
+ // Iterate over the ndarray dimensions...
+ for ( i2 = 0; i2 < s2; i2++ ) {
+ for ( i1 = 0; i1 < s1; i1++ ) {
+ for ( i0 = 0; i0 < s0; i0++ ) {
+ obuf[ io ] = ( cbuf[ ic ] ) ? xbuf[ ix ] : ybuf[ iy ]; // eslint-disable-line max-len
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+ ic += dc2;
+ ix += dx2;
+ iy += dy2;
+ io += do2;
+ }
+ }
+ }
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = blockedwhere3d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/3d_blocked_accessors.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/3d_blocked_accessors.js
new file mode 100644
index 000000000000..e8e9f6c0c298
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/3d_blocked_accessors.js
@@ -0,0 +1,324 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/* eslint-disable max-depth */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/ternary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/ternary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Applies a condition to two three-dimensional input ndarrays according to a three-dimensional boolean ndarray and assigns results to elements in a three-dimensional output ndarray via loop blocking.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} condition.accessors - data buffer accessors
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} y.accessors - data buffer accessors
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} out.accessors - data buffer accessors
+* @returns {void}
+*
+* @example
+* var Complex64Array = require( '@stdlib/array/complex64' );
+* var BooleanArray = require( '@stdlib/array/bool' );
+* var realf = require( '@stdlib/complex/float32/real' );
+* var imagf = require( '@stdlib/complex/float32/imag' );
+*
+* // Create data buffers:
+* var cbuf = new BooleanArray( [ 1, 0, 0, 1, 0, 1, 1, 0 ] );
+* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+* var ybuf = new Complex64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0 ] );
+* var obuf = new Complex64Array( 4 );
+*
+* // Define the shape of the input and output arrays:
+* var shape = [ 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 4, 2, 1 ];
+* var sx = [ 4, 2, 1 ];
+* var sy = [ 4, 2, 1 ];
+* var so = [ 4, 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 0;
+* var ox = 0;
+* var oy = 0;
+* var oo = 0;
+*
+* // Define getters and setters:
+* function getter( buf, idx ) {
+* return buf.get( idx );
+* }
+*
+* function setter( buf, idx, value ) {
+* buf.set( value, idx );
+* }
+*
+* // Create the input and output ndarray-like objects:
+* var condition = {
+* 'dtype': 'bool',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var x = {
+* 'dtype': 'complex64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var y = {
+* 'dtype': 'complex64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var out = {
+* 'dtype': 'complex64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+*
+* // Apply the condition:
+* blockedwhere3d( condition, x, y, out );
+*
+* var v = out.data.get( 0 );
+*
+* var re = realf( v );
+* // returns 1.0
+*
+* var im = imagf( v );
+* // returns 2.0
+*/
+function blockedwhere3d( condition, x, y, out ) { // eslint-disable-line max-statements
+ var bsize;
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var getc;
+ var getx;
+ var gety;
+ var seto;
+ var dc0;
+ var dc1;
+ var dc2;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dy0;
+ var dy1;
+ var dy2;
+ var do0;
+ var do1;
+ var do2;
+ var oc1;
+ var oc2;
+ var ox1;
+ var ox2;
+ var oy1;
+ var oy2;
+ var oo1;
+ var oo2;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var oc;
+ var ox;
+ var oy;
+ var oo;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var i0;
+ var i1;
+ var i2;
+ var j0;
+ var j1;
+ var j2;
+ var o;
+
+ // Note on variable naming convention: s#, dc#, dx#, dy#, do#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( condition.shape, condition.strides, x.strides, y.strides, out.strides ); // eslint-disable-line max-len
+
+ // Strides output as follows: sx, sy, sz, sw. According to arguments order respectively..
+ sh = o.sh;
+ sc = o.sx;
+ sx = o.sy;
+ sy = o.sz;
+ so = o.sw;
+
+ // Determine the block size:
+ bsize = blockSize( condition.dtype, x.dtype, y.dtype, out.dtype );
+
+ // Cache the indices of the first indexed elements in the respective ndarrays...
+ oc = condition.offset;
+ ox = x.offset;
+ oy = y.offset;
+ oo = out.offset;
+
+ // Cache references to the input and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.data;
+
+ // Cache offset increments for the innermost loop...
+ dc0 = sc[0];
+ dx0 = sx[0];
+ dy0 = sy[0];
+ do0 = so[0];
+
+ // Cache accessors:
+ getc = condition.accessors[ 0 ];
+ getx = x.accessors[ 0 ];
+ gety = y.accessors[ 0 ];
+ seto = out.accessors[ 1 ];
+
+ // Iterate over blocks...
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ oc2 = oc + ( j2*sc[2] );
+ ox2 = ox + ( j2*sx[2] );
+ oy2 = oy + ( j2*sy[2] );
+ oo2 = oo + ( j2*so[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dc2 = sc[2] - ( s1*sc[1] );
+ dx2 = sx[2] - ( s1*sx[1] );
+ dy2 = sy[2] - ( s1*sy[1] );
+ do2 = so[2] - ( s1*so[1] );
+ oc1 = oc2 + ( j1*sc[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ oy1 = oy2 + ( j1*sy[1] );
+ oo1 = oo2 + ( j1*so[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute index offsets for the first input and output ndarray elements in the current block...
+ ic = oc1 + ( j0*sc[0] );
+ ix = ox1 + ( j0*sx[0] );
+ iy = oy1 + ( j0*sy[0] );
+ io = oo1 + ( j0*so[0] );
+
+ // Compute loop offset increments...
+ dc1 = sc[1] - ( s0*sc[0] );
+ dx1 = sx[1] - ( s0*sx[0] );
+ dy1 = sy[1] - ( s0*sy[0] );
+ do1 = so[1] - ( s0*so[0] );
+
+ // Iterate over the ndarray dimensions...
+ for ( i2 = 0; i2 < s2; i2++ ) {
+ for ( i1 = 0; i1 < s1; i1++ ) {
+ for ( i0 = 0; i0 < s0; i0++ ) {
+ seto( obuf, io, ( getc( cbuf, ic ) ) ? getx( xbuf, ix ) : gety( ybuf, iy ) ); // eslint-disable-line max-len
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+ ic += dc2;
+ ix += dx2;
+ iy += dy2;
+ io += do2;
+ }
+ }
+ }
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = blockedwhere3d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/4d.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/4d.js
new file mode 100644
index 000000000000..a00c9de0acdd
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/4d.js
@@ -0,0 +1,258 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MAIN //
+
+/**
+* Applies a condition to two four-dimensional input ndarrays according to a four-dimensional boolean ndarray and assigns results to elements in a four-dimensional output ndarray.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order
+* @returns {void}
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+* var Uint8Array = require( '@stdlib/array/uint8' );
+*
+* // Create data buffers:
+* var cbuf = new Uint8Array( [ 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1 ] );
+* 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 ] );
+* var ybuf = 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 ] );
+* var obuf = new Float64Array( 6 );
+*
+* // Define the shape of the input and output arrays:
+* var shape = [ 1, 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 12, 4, 4, 1 ];
+* var sx = [ 12, 4, 4, 1 ];
+* var sy = [ 12, 4, 4, 1 ];
+* var so = [ 6, 2, 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 1;
+* var ox = 1;
+* var oy = 1;
+* var oo = 0;
+*
+* // Create the input and output ndarray-like objects:
+* var condition = {
+* 'dtype': 'uint8',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major'
+* };
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+* var y = {
+* 'dtype': 'float64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major'
+* };
+* var out = {
+* 'dtype': 'float64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major'
+* };
+*
+* // Apply the condition:
+* where4d( condition, x, y, out, true );
+*
+* console.log( out.data );
+* // => [ -2.0, -3.0, 6.0, 7.0, -10.0, -11.0 ]
+*/
+function where4d( condition, x, y, out, isRowMajor ) { // eslint-disable-line max-statements
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var dc0;
+ var dc1;
+ var dc2;
+ var dc3;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dy0;
+ var dy1;
+ var dy2;
+ var dy3;
+ var do0;
+ var do1;
+ var do2;
+ var do3;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var S3;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+
+ // Note on variable naming convention: S#, dc#, dx#, dy#, do#, 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;
+ sc = condition.strides;
+ sx = x.strides;
+ sy = y.strides;
+ so = out.strides;
+ if ( isRowMajor ) {
+ // For row-major ndarrays, the last dimensions have the fastest changing indices...
+ S0 = sh[ 3 ];
+ S1 = sh[ 2 ];
+ S2 = sh[ 1 ];
+ S3 = sh[ 0 ];
+ dc0 = sc[ 3 ]; // offset increment for innermost loop
+ dc1 = sc[ 2 ] - ( S0*sc[3] );
+ dc2 = sc[ 1 ] - ( S1*sc[2] );
+ dc3 = sc[ 0 ] - ( S2*sc[1] ); // offset increment for outermost loop
+ dx0 = sx[ 3 ];
+ dx1 = sx[ 2 ] - ( S0*sx[3] );
+ dx2 = sx[ 1 ] - ( S1*sx[2] );
+ dx3 = sx[ 0 ] - ( S2*sx[1] );
+ dy0 = sy[ 3 ];
+ dy1 = sy[ 2 ] - ( S0*sy[3] );
+ dy2 = sy[ 1 ] - ( S1*sy[2] );
+ dy3 = sy[ 0 ] - ( S2*sy[1] );
+ do0 = so[ 3 ];
+ do1 = so[ 2 ] - ( S0*so[3] );
+ do2 = so[ 1 ] - ( S1*so[2] );
+ do3 = so[ 0 ] - ( S2*so[1] );
+ } 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 ];
+ dc0 = sc[ 0 ]; // offset increment for innermost loop
+ dc1 = sc[ 1 ] - ( S0*sc[0] );
+ dc2 = sc[ 2 ] - ( S1*sc[1] );
+ dc3 = sc[ 3 ] - ( S2*sc[2] ); // offset increment for outermost loop
+ dx0 = sx[ 0 ];
+ dx1 = sx[ 1 ] - ( S0*sx[0] );
+ dx2 = sx[ 2 ] - ( S1*sx[1] );
+ dx3 = sx[ 3 ] - ( S2*sx[2] );
+ dy0 = sy[ 0 ];
+ dy1 = sy[ 1 ] - ( S0*sy[0] );
+ dy2 = sy[ 2 ] - ( S1*sy[1] );
+ dy3 = sy[ 3 ] - ( S2*sy[2] );
+ do0 = so[ 0 ];
+ do1 = so[ 1 ] - ( S0*so[0] );
+ do2 = so[ 2 ] - ( S1*so[1] );
+ do3 = so[ 3 ] - ( S2*so[2] );
+ }
+ // Set the pointers to the first indexed elements in the respective ndarrays...
+ ic = condition.offset;
+ ix = x.offset;
+ iy = y.offset;
+ io = out.offset;
+
+ // Cache references to the input and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.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++ ) {
+ obuf[ io ] = ( cbuf[ ic ] ) ? xbuf[ ix ] : ybuf[ iy ];
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+ ic += dc2;
+ ix += dx2;
+ iy += dy2;
+ io += do2;
+ }
+ ic += dc3;
+ ix += dx3;
+ iy += dy3;
+ io += do3;
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = where4d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/4d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/4d_accessors.js
new file mode 100644
index 000000000000..a881753720cb
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/4d_accessors.js
@@ -0,0 +1,292 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MAIN //
+
+/**
+* Applies a condition to two four-dimensional input ndarrays according to a four-dimensional boolean ndarray and assigns results to elements in a four-dimensional output ndarray.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} condition.accessors - data buffer accessors
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} y.accessors - data buffer accessors
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} out.accessors - data buffer accessors
+* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order
+* @returns {void}
+*
+* @example
+* var Complex64Array = require( '@stdlib/array/complex64' );
+* var BooleanArray = require( '@stdlib/array/bool' );
+* var realf = require( '@stdlib/complex/float32/real' );
+* var imagf = require( '@stdlib/complex/float32/imag' );
+*
+* // Create data buffers:
+* var cbuf = new BooleanArray( [ 1, 0, 0, 1, 0, 1, 1, 0 ] );
+* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+* var ybuf = new Complex64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0 ] );
+* var obuf = new Complex64Array( 4 );
+*
+* // Define the shape of the input and output arrays:
+* var shape = [ 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 4, 4, 2, 1 ];
+* var sx = [ 4, 4, 2, 1 ];
+* var sy = [ 4, 4, 2, 1 ];
+* var so = [ 4, 4, 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 0;
+* var ox = 0;
+* var oy = 0;
+* var oo = 0;
+*
+* // Define getters and setters:
+* function getter( buf, idx ) {
+* return buf.get( idx );
+* }
+*
+* function setter( buf, idx, value ) {
+* buf.set( value, idx );
+* }
+*
+* // Create the input and output ndarray-like objects:
+* var condition = {
+* 'dtype': 'bool',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var x = {
+* 'dtype': 'complex64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var y = {
+* 'dtype': 'complex64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var out = {
+* 'dtype': 'complex64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+*
+* // Apply the condition:
+* where4d( condition, x, y, out, true );
+*
+* var v = out.data.get( 0 );
+*
+* var re = realf( v );
+* // returns 1.0
+*
+* var im = imagf( v );
+* // returns 2.0
+*/
+function where4d( condition, x, y, out, isRowMajor ) { // eslint-disable-line max-statements
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var getc;
+ var getx;
+ var gety;
+ var seto;
+ var dc0;
+ var dc1;
+ var dc2;
+ var dc3;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dy0;
+ var dy1;
+ var dy2;
+ var dy3;
+ var do0;
+ var do1;
+ var do2;
+ var do3;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var S3;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+
+ // Note on variable naming convention: S#, dc#, dx#, dy#, do#, 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;
+ sc = condition.strides;
+ sx = x.strides;
+ sy = y.strides;
+ so = out.strides;
+ if ( isRowMajor ) {
+ // For row-major ndarrays, the last dimensions have the fastest changing indices...
+ S0 = sh[ 3 ];
+ S1 = sh[ 2 ];
+ S2 = sh[ 1 ];
+ S3 = sh[ 0 ];
+ dc0 = sc[ 3 ]; // offset increment for innermost loop
+ dc1 = sc[ 2 ] - ( S0*sc[3] );
+ dc2 = sc[ 1 ] - ( S1*sc[2] );
+ dc3 = sc[ 0 ] - ( S2*sc[1] ); // offset increment for outermost loop
+ dx0 = sx[ 3 ];
+ dx1 = sx[ 2 ] - ( S0*sx[3] );
+ dx2 = sx[ 1 ] - ( S1*sx[2] );
+ dx3 = sx[ 0 ] - ( S2*sx[1] );
+ dy0 = sy[ 3 ];
+ dy1 = sy[ 2 ] - ( S0*sy[3] );
+ dy2 = sy[ 1 ] - ( S1*sy[2] );
+ dy3 = sy[ 0 ] - ( S2*sy[1] );
+ do0 = so[ 3 ];
+ do1 = so[ 2 ] - ( S0*so[3] );
+ do2 = so[ 1 ] - ( S1*so[2] );
+ do3 = so[ 0 ] - ( S2*so[1] );
+ } 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 ];
+ dc0 = sc[ 0 ]; // offset increment for innermost loop
+ dc1 = sc[ 1 ] - ( S0*sc[0] );
+ dc2 = sc[ 2 ] - ( S1*sc[1] );
+ dc3 = sc[ 3 ] - ( S2*sc[2] ); // offset increment for outermost loop
+ dx0 = sx[ 0 ];
+ dx1 = sx[ 1 ] - ( S0*sx[0] );
+ dx2 = sx[ 2 ] - ( S1*sx[1] );
+ dx3 = sx[ 3 ] - ( S2*sx[2] );
+ dy0 = sy[ 0 ];
+ dy1 = sy[ 1 ] - ( S0*sy[0] );
+ dy2 = sy[ 2 ] - ( S1*sy[1] );
+ dy3 = sy[ 3 ] - ( S2*sy[2] );
+ do0 = so[ 0 ];
+ do1 = so[ 1 ] - ( S0*so[0] );
+ do2 = so[ 2 ] - ( S1*so[1] );
+ do3 = so[ 3 ] - ( S2*so[2] );
+ }
+ // Set the pointers to the first indexed elements in the respective ndarrays...
+ ic = condition.offset;
+ ix = x.offset;
+ iy = y.offset;
+ io = out.offset;
+
+ // Cache references to the input and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.data;
+
+ // Cache accessors:
+ getc = condition.accessors[ 0 ];
+ getx = x.accessors[ 0 ];
+ gety = y.accessors[ 0 ];
+ seto = out.accessors[ 1 ];
+
+ // 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++ ) {
+ seto( obuf, io, ( getc( cbuf, ic ) ) ? getx( xbuf, ix ) : gety( ybuf, iy ) ); // eslint-disable-line max-len
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+ ic += dc2;
+ ix += dx2;
+ iy += dy2;
+ io += do2;
+ }
+ ic += dc3;
+ ix += dx3;
+ iy += dy3;
+ io += do3;
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = where4d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/4d_blocked.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/4d_blocked.js
new file mode 100644
index 000000000000..dcf7a7b29299
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/4d_blocked.js
@@ -0,0 +1,324 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/* eslint-disable max-depth */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/ternary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/ternary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Applies a condition to two four-dimensional input ndarrays according to a four-dimensional boolean ndarray and assigns results to elements in a four-dimensional output ndarray via loop blocking.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @returns {void}
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+* var Uint8Array = require( '@stdlib/array/uint8' );
+*
+* // Create data buffers:
+* var cbuf = new Uint8Array( [ 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1 ] );
+* 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 ] );
+* var ybuf = 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 ] );
+* var obuf = new Float64Array( 6 );
+*
+* // Define the shape of the input and output arrays:
+* var shape = [ 1, 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 12, 4, 4, 1 ];
+* var sx = [ 12, 4, 4, 1 ];
+* var sy = [ 12, 4, 4, 1 ];
+* var so = [ 6, 2, 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 1;
+* var ox = 1;
+* var oy = 1;
+* var oo = 0;
+*
+* // Create the input and output ndarray-like objects:
+* var condition = {
+* 'dtype': 'uint8',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major'
+* };
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+* var y = {
+* 'dtype': 'float64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major'
+* };
+* var out = {
+* 'dtype': 'float64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major'
+* };
+*
+* // Copy elements:
+* blockedwhere4d( condition, x, y, out );
+*
+* console.log( out.data );
+* // => [ -2.0, -3.0, 6.0, 7.0, -10.0, -11.0 ]
+*/
+function blockedwhere4d( condition, x, y, out ) { // eslint-disable-line max-statements
+ var bsize;
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var dc0;
+ var dc1;
+ var dc2;
+ var dc3;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dy0;
+ var dy1;
+ var dy2;
+ var dy3;
+ var do0;
+ var do1;
+ var do2;
+ var do3;
+ var oc1;
+ var oc2;
+ var oc3;
+ var ox1;
+ var ox2;
+ var ox3;
+ var oy1;
+ var oy2;
+ var oy3;
+ var oo1;
+ var oo2;
+ var oo3;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var oc;
+ var ox;
+ var oy;
+ var oo;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var j0;
+ var j1;
+ var j2;
+ var j3;
+ var o;
+
+ // Note on variable naming convention: s#, dc#, dx#, dy#, do#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( condition.shape, condition.strides, x.strides, y.strides, out.strides ); // eslint-disable-line max-len
+
+ // Strides output as follows: sx, sy, sz, sw. According to arguments order respectively..
+ sh = o.sh;
+ sc = o.sx;
+ sx = o.sy;
+ sy = o.sz;
+ so = o.sw;
+
+ // Determine the block size:
+ bsize = blockSize( condition.dtype, x.dtype, y.dtype, o.dtype );
+
+ // Cache the indices of the first indexed elements in the respective ndarrays...
+ oc = condition.offset;
+ ox = x.offset;
+ oy = y.offset;
+ oo = out.offset;
+
+ // Cache references to the input and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.data;
+
+ // Cache offset increments for the innermost loop...
+ dc0 = sc[0];
+ dx0 = sx[0];
+ dy0 = sy[0];
+ do0 = so[0];
+
+ // Iterate over blocks...
+ for ( j3 = sh[3]; j3 > 0; ) {
+ if ( j3 < bsize ) {
+ s3 = j3;
+ j3 = 0;
+ } else {
+ s3 = bsize;
+ j3 -= bsize;
+ }
+ oc3 = oc + ( j3*sc[3] );
+ ox3 = ox + ( j3*sx[3] );
+ oy3 = oy + ( j3*sy[3] );
+ oo3 = oo + ( j3*so[3] );
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ dc3 = sc[3] - ( s2*sc[2] );
+ dx3 = sx[3] - ( s2*sx[2] );
+ dy3 = sy[3] - ( s2*sy[2] );
+ do3 = so[3] - ( s2*so[2] );
+ oc2 = oc3 + ( j2*sc[2] );
+ ox2 = ox3 + ( j2*sx[2] );
+ oy2 = oy3 + ( j2*sy[2] );
+ oo2 = oo3 + ( j2*so[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dc2 = sc[2] - ( s1*sc[1] );
+ dx2 = sx[2] - ( s1*sx[1] );
+ dy2 = sy[2] - ( s1*sy[1] );
+ do2 = so[2] - ( s1*so[1] );
+ oc1 = oc2 + ( j1*sc[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ oy1 = oy2 + ( j1*sy[1] );
+ oo1 = oo2 + ( j1*so[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute index offsets for the first input and output ndarray elements in the current block...
+ ic = oc1 + ( j0*sc[0] );
+ ix = ox1 + ( j0*sx[0] );
+ iy = oy1 + ( j0*sy[0] );
+ io = oo1 + ( j0*so[0] );
+
+ // Compute loop offset increments...
+ dc1 = sc[1] - ( s0*sc[0] );
+ dx1 = sx[1] - ( s0*sx[0] );
+ dy1 = sy[1] - ( s0*sy[0] );
+ do1 = so[1] - ( s0*so[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++ ) {
+ obuf[ io ] = ( cbuf[ ic ] ) ? xbuf[ ix ] : ybuf[ iy ]; // eslint-disable-line max-len
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+ ic += dc2;
+ ix += dx2;
+ iy += dy2;
+ io += do2;
+ }
+ ic += dc3;
+ ix += dx3;
+ iy += dy3;
+ io += do3;
+ }
+ }
+ }
+ }
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = blockedwhere4d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/4d_blocked_accessors.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/4d_blocked_accessors.js
new file mode 100644
index 000000000000..fb3d24d1bd58
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/4d_blocked_accessors.js
@@ -0,0 +1,359 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/* eslint-disable max-depth */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/ternary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/ternary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Applies a condition to two four-dimensional input ndarrays according to a four-dimensional boolean ndarray and assigns results to elements in a four-dimensional output ndarray via loop blocking.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} condition.accessors - data buffer accessors
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} y.accessors - data buffer accessors
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} out.accessors - data buffer accessors
+* @returns {void}
+*
+* @example
+* var Complex64Array = require( '@stdlib/array/complex64' );
+* var BooleanArray = require( '@stdlib/array/bool' )
+* var Complex64 = require( '@stdlib/complex/float32/ctor' );
+* var realf = require( '@stdlib/complex/float32/real' );
+* var imagf = require( '@stdlib/complex/float32/imag' );
+*
+* // Create data buffers:
+* var cbuf = new BooleanArray( [ 1, 0, 0, 1, 0, 1, 1, 0 ] );
+* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+* var ybuf = new Complex64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0 ] );
+* var obuf = new Complex64Array( 4 );
+*
+* // Define the shape of the input and output arrays:
+* var shape = [ 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 4, 4, 2, 1 ];
+* var sx = [ 4, 4, 2, 1 ];
+* var sy = [ 4, 4, 2, 1 ];
+* var so = [ 4, 4, 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 0;
+* var ox = 0;
+* var oy = 0;
+* var oo = 0;
+*
+* // Define getters and setters:
+* function getter( buf, idx ) {
+* return buf.get( idx );
+* }
+*
+* function setter( buf, idx, value ) {
+* buf.set( value, idx );
+* }
+*
+* // Create the input and output ndarray-like objects:
+* var condition = {
+* 'dtype': 'uint8',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var y = {
+* 'dtype': 'float64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var out = {
+* 'dtype': 'float64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+*
+* // Copy elements:
+* blockedwhere4d( condition, x, y, out );
+*
+* var v = out.data.get( 0 );
+*
+* var re = realf( v );
+* // returns 1.0
+*
+* var im = imagf( v );
+* // returns 2.0
+*/
+function blockedwhere4d( condition, x, y, out ) { // eslint-disable-line max-statements
+ var bsize;
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var getc;
+ var getx;
+ var gety;
+ var seto;
+ var dc0;
+ var dc1;
+ var dc2;
+ var dc3;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dy0;
+ var dy1;
+ var dy2;
+ var dy3;
+ var do0;
+ var do1;
+ var do2;
+ var do3;
+ var oc1;
+ var oc2;
+ var oc3;
+ var ox1;
+ var ox2;
+ var ox3;
+ var oy1;
+ var oy2;
+ var oy3;
+ var oo1;
+ var oo2;
+ var oo3;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var oc;
+ var ox;
+ var oy;
+ var oo;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var j0;
+ var j1;
+ var j2;
+ var j3;
+ var o;
+
+ // Note on variable naming convention: s#, dc#, dx#, dy#, do#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( condition.shape, condition.strides, x.strides, y.strides, out.strides ); // eslint-disable-line max-len
+
+ // Strides output as follows: sx, sy, sz, sw. According to arguments order respectively..
+ sh = o.sh;
+ sc = o.sx;
+ sx = o.sy;
+ sy = o.sz;
+ so = o.sw;
+
+ // Determine the block size:
+ bsize = blockSize( condition.dtype, x.dtype, y.dtype, o.dtype );
+
+ // Cache the indices of the first indexed elements in the respective ndarrays...
+ oc = condition.offset;
+ ox = x.offset;
+ oy = y.offset;
+ oo = out.offset;
+
+ // Cache references to the input and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.data;
+
+ // Cache offset increments for the innermost loop...
+ dc0 = sc[0];
+ dx0 = sx[0];
+ dy0 = sy[0];
+ do0 = so[0];
+
+ // Cache accessors:
+ getc = condition.accessors[ 0 ];
+ getx = x.accessors[ 0 ];
+ gety = y.accessors[ 0 ];
+ seto = out.accessors[ 1 ];
+
+ // Iterate over blocks...
+ for ( j3 = sh[3]; j3 > 0; ) {
+ if ( j3 < bsize ) {
+ s3 = j3;
+ j3 = 0;
+ } else {
+ s3 = bsize;
+ j3 -= bsize;
+ }
+ oc3 = oc + ( j3*sc[3] );
+ ox3 = ox + ( j3*sx[3] );
+ oy3 = oy + ( j3*sy[3] );
+ oo3 = oo + ( j3*so[3] );
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ dc3 = sc[3] - ( s2*sc[2] );
+ dx3 = sx[3] - ( s2*sx[2] );
+ dy3 = sy[3] - ( s2*sy[2] );
+ do3 = so[3] - ( s2*so[2] );
+ oc2 = oc3 + ( j2*sc[2] );
+ ox2 = ox3 + ( j2*sx[2] );
+ oy2 = oy3 + ( j2*sy[2] );
+ oo2 = oo3 + ( j2*so[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dc2 = sc[2] - ( s1*sc[1] );
+ dx2 = sx[2] - ( s1*sx[1] );
+ dy2 = sy[2] - ( s1*sy[1] );
+ do2 = so[2] - ( s1*so[1] );
+ oc1 = oc2 + ( j1*sc[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ oy1 = oy2 + ( j1*sy[1] );
+ oo1 = oo2 + ( j1*so[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute index offsets for the first input and output ndarray elements in the current block...
+ ic = oc1 + ( j0*sc[0] );
+ ix = ox1 + ( j0*sx[0] );
+ iy = oy1 + ( j0*sy[0] );
+ io = oo1 + ( j0*so[0] );
+
+ // Compute loop offset increments...
+ dc1 = sc[1] - ( s0*sc[0] );
+ dx1 = sx[1] - ( s0*sx[0] );
+ dy1 = sy[1] - ( s0*sy[0] );
+ do1 = so[1] - ( s0*so[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++ ) {
+ seto( obuf, io, ( getc( cbuf, ic ) ) ? getx( xbuf, ix ) : gety( ybuf, iy ) ); // eslint-disable-line max-len
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+ ic += dc2;
+ ix += dx2;
+ iy += dy2;
+ io += do2;
+ }
+ ic += dc3;
+ ix += dx3;
+ iy += dy3;
+ io += do3;
+ }
+ }
+ }
+ }
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = blockedwhere4d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/5d.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/5d.js
new file mode 100644
index 000000000000..70a3478e94eb
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/5d.js
@@ -0,0 +1,281 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MAIN //
+
+/**
+* Applies a condition to two five-dimensional input ndarrays according to a five-dimensional boolean ndarray and assigns results to elements in a five-dimensional output ndarray.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order
+* @returns {void}
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+* var Uint8Array = require( '@stdlib/array/uint8' );
+*
+* // Create data buffers:
+* var cbuf = new Uint8Array( [ 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1 ] );
+* 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 ] );
+* var ybuf = 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 ] );
+* var obuf = new Float64Array( 6 );
+*
+* // Define the shape of the input and output arrays:
+* var shape = [ 1, 1, 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 12, 12, 4, 4, 1 ];
+* var sx = [ 12, 12, 4, 4, 1 ];
+* var sy = [ 12, 12, 4, 4, 1 ];
+* var so = [ 6, 6, 2, 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 1;
+* var ox = 1;
+* var oy = 1;
+* var oo = 0;
+*
+* // Create the input and output ndarray-like objects:
+* var condition = {
+* 'dtype': 'uint8',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major'
+* };
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+* var y = {
+* 'dtype': 'float64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major'
+* };
+* var out = {
+* 'dtype': 'float64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major'
+* };
+*
+* // Apply the condition:
+* where5d( condition, x, y, out, true );
+*
+* console.log( out.data );
+* // => [ -2.0, -3.0, 6.0, 7.0, -10.0, -11.0 ]
+*/
+function where5d( condition, x, y, out, isRowMajor ) { // eslint-disable-line max-statements
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var dc0;
+ var dc1;
+ var dc2;
+ var dc3;
+ var dc4;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dy0;
+ var dy1;
+ var dy2;
+ var dy3;
+ var dy4;
+ var do0;
+ var do1;
+ var do2;
+ var do3;
+ var do4;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var S3;
+ var S4;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+
+ // Note on variable naming convention: S#, dc#, dx#, dy#, do#, 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;
+ sc = condition.strides;
+ sx = x.strides;
+ sy = y.strides;
+ so = out.strides;
+
+ if ( isRowMajor ) {
+ // 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 ];
+ dc0 = sc[ 4 ]; // offset increment for innermost loop
+ dc1 = sc[ 3 ] - ( S0*sc[4] );
+ dc2 = sc[ 2 ] - ( S1*sc[3] );
+ dc3 = sc[ 1 ] - ( S2*sc[2] );
+ dc4 = sc[ 0 ] - ( S3*sc[1] ); // offset increment for outermost loop
+ dx0 = sx[ 4 ];
+ dx1 = sx[ 3 ] - ( S0*sx[4] );
+ dx2 = sx[ 2 ] - ( S1*sx[3] );
+ dx3 = sx[ 1 ] - ( S2*sx[2] );
+ dx4 = sx[ 0 ] - ( S3*sx[1] );
+ dy0 = sy[ 4 ];
+ dy1 = sy[ 3 ] - ( S0*sy[4] );
+ dy2 = sy[ 2 ] - ( S1*sy[3] );
+ dy3 = sy[ 1 ] - ( S2*sy[2] );
+ dy4 = sy[ 0 ] - ( S3*sy[1] );
+ do0 = so[ 4 ];
+ do1 = so[ 3 ] - ( S0*so[4] );
+ do2 = so[ 2 ] - ( S1*so[3] );
+ do3 = so[ 1 ] - ( S2*so[2] );
+ do4 = so[ 0 ] - ( S3*so[1] );
+ } 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 ];
+ dc0 = sc[ 0 ]; // offset increment for innermost loop
+ dc1 = sc[ 1 ] - ( S0*sc[0] );
+ dc2 = sc[ 2 ] - ( S1*sc[1] );
+ dc3 = sc[ 3 ] - ( S2*sc[2] );
+ dc4 = sc[ 4 ] - ( S3*sc[3] ); // offset increment for outermost loop
+ dx0 = sx[ 0 ];
+ dx1 = sx[ 1 ] - ( S0*sx[0] );
+ dx2 = sx[ 2 ] - ( S1*sx[1] );
+ dx3 = sx[ 3 ] - ( S2*sx[2] );
+ dx4 = sx[ 4 ] - ( S3*sx[3] );
+ dy0 = sy[ 0 ];
+ dy1 = sy[ 1 ] - ( S0*sy[0] );
+ dy2 = sy[ 2 ] - ( S1*sy[1] );
+ dy3 = sy[ 3 ] - ( S2*sy[2] );
+ dy4 = sy[ 4 ] - ( S3*sy[3] );
+ do0 = so[ 0 ];
+ do1 = so[ 1 ] - ( S0*so[0] );
+ do2 = so[ 2 ] - ( S1*so[1] );
+ do3 = so[ 3 ] - ( S2*so[2] );
+ do4 = so[ 4 ] - ( S3*so[3] );
+ }
+ // Set the pointers to the first indexed elements in the respective ndarrays...
+ ic = condition.offset;
+ ix = x.offset;
+ iy = y.offset;
+ io = out.offset;
+
+ // Cache references to the input and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.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++ ) {
+ obuf[ io ] = ( cbuf[ ic ] ) ? xbuf[ ix ] : ybuf[ iy ];
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+ ic += dc2;
+ ix += dx2;
+ iy += dy2;
+ io += do2;
+ }
+ ic += dc3;
+ ix += dx3;
+ iy += dy3;
+ io += do3;
+ }
+ ic += dc4;
+ ix += dx4;
+ iy += dy4;
+ io += do4;
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = where5d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/5d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/5d_accessors.js
new file mode 100644
index 000000000000..32ff030709a4
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/5d_accessors.js
@@ -0,0 +1,316 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MAIN //
+
+/**
+* Applies a condition to two five-dimensional input ndarrays according to a five-dimensional boolean ndarray and assigns results to elements in a five-dimensional output ndarray.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} condition.accessors - data buffer accessors
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} y.accessors - data buffer accessors
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} out.accessors - data buffer accessors
+* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order
+* @returns {void}
+*
+* @example
+* var BooleanArray = require( '@stdlib/array/bool' );
+* var Complex64Array = require( '@stdlib/array/complex64' );
+* var Complex64 = require( '@stdlib/complex/float32/ctor' );
+* var realf = require( '@stdlib/complex/float32/real' );
+* var imagf = require( '@stdlib/complex/float32/imag' );
+*
+* // Create data buffers:
+* var cbuf = new BooleanArray( [ 1, 0, 0, 1, 0, 1, 1, 0 ] );
+* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0] );
+* var ybuf = new Complex64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0 ] );
+* var obuf = new Complex64Array( 4 );
+*
+* // Define the shape of the input and output arrays:
+* var shape = [ 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 4, 4, 4, 2, 1 ];
+* var sx = [ 4, 4, 4, 2, 1 ];
+* var sy = [ 4, 4, 4, 2, 1 ];
+* var so = [ 4, 4, 4, 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 0;
+* var ox = 0;
+* var oy = 0;
+* var oo = 0;
+*
+* // Define getters and setters:
+* function getter( buf, idx ) {
+* return buf.get( idx );
+* }
+*
+* function setter( buf, idx, value ) {
+* buf.set( value, idx );
+* }
+*
+* // Create the input and output ndarray-like objects:
+* var condition = {
+* 'dtype': 'bool',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var x = {
+* 'dtype': 'complex64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var y = {
+* 'dtype': 'complex64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var out = {
+* 'dtype': 'complex64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+*
+* // Apply the condition:
+* where5d( condition, x, y, out, true );
+*
+* var v = y.data.get( 0 );
+*
+* var re = realf( v );
+* // returns -1.0
+*
+* var im = imagf( v );
+* // returns -2.0
+*/
+function where5d( condition, x, y, out, isRowMajor ) { // eslint-disable-line max-statements
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var getc;
+ var getx;
+ var gety;
+ var seto;
+ var dc0;
+ var dc1;
+ var dc2;
+ var dc3;
+ var dc4;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dy0;
+ var dy1;
+ var dy2;
+ var dy3;
+ var dy4;
+ var do0;
+ var do1;
+ var do2;
+ var do3;
+ var do4;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var S3;
+ var S4;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+
+ // Note on variable naming convention: S#, dc#, dx#, dy#, do#, 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;
+ sc = condition.strides;
+ sx = x.strides;
+ sy = y.strides;
+ so = out.strides;
+
+ if ( isRowMajor ) {
+ // 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 ];
+ dc0 = sc[ 4 ]; // offset increment for innermost loop
+ dc1 = sc[ 3 ] - ( S0*sc[4] );
+ dc2 = sc[ 2 ] - ( S1*sc[3] );
+ dc3 = sc[ 1 ] - ( S2*sc[2] );
+ dc4 = sc[ 0 ] - ( S3*sc[1] ); // offset increment for outermost loop
+ dx0 = sx[ 4 ];
+ dx1 = sx[ 3 ] - ( S0*sx[4] );
+ dx2 = sx[ 2 ] - ( S1*sx[3] );
+ dx3 = sx[ 1 ] - ( S2*sx[2] );
+ dx4 = sx[ 0 ] - ( S3*sx[1] );
+ dy0 = sy[ 4 ];
+ dy1 = sy[ 3 ] - ( S0*sy[4] );
+ dy2 = sy[ 2 ] - ( S1*sy[3] );
+ dy3 = sy[ 1 ] - ( S2*sy[2] );
+ dy4 = sy[ 0 ] - ( S3*sy[1] );
+ do0 = so[ 4 ];
+ do1 = so[ 3 ] - ( S0*so[4] );
+ do2 = so[ 2 ] - ( S1*so[3] );
+ do3 = so[ 1 ] - ( S2*so[2] );
+ do4 = so[ 0 ] - ( S3*so[1] );
+ } 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 ];
+ dc0 = sc[ 0 ]; // offset increment for innermost loop
+ dc1 = sc[ 1 ] - ( S0*sc[0] );
+ dc2 = sc[ 2 ] - ( S1*sc[1] );
+ dc3 = sc[ 3 ] - ( S2*sc[2] );
+ dc4 = sc[ 4 ] - ( S3*sc[3] ); // offset increment for outermost loop
+ dx0 = sx[ 0 ];
+ dx1 = sx[ 1 ] - ( S0*sx[0] );
+ dx2 = sx[ 2 ] - ( S1*sx[1] );
+ dx3 = sx[ 3 ] - ( S2*sx[2] );
+ dx4 = sx[ 4 ] - ( S3*sx[3] );
+ dy0 = sy[ 0 ];
+ dy1 = sy[ 1 ] - ( S0*sy[0] );
+ dy2 = sy[ 2 ] - ( S1*sy[1] );
+ dy3 = sy[ 3 ] - ( S2*sy[2] );
+ dy4 = sy[ 4 ] - ( S3*sy[3] );
+ do0 = so[ 0 ];
+ do1 = so[ 1 ] - ( S0*so[0] );
+ do2 = so[ 2 ] - ( S1*so[1] );
+ do3 = so[ 3 ] - ( S2*so[2] );
+ do4 = so[ 4 ] - ( S3*so[3] );
+ }
+ // Set the pointers to the first indexed elements in the respective ndarrays...
+ ic = condition.offset;
+ ix = x.offset;
+ iy = y.offset;
+ io = out.offset;
+
+ // Cache references to the input and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.data;
+
+ // Cache accessors:
+ getc = condition.accessors[ 0 ];
+ getx = x.accessors[ 0 ];
+ gety = y.accessors[ 0 ];
+ seto = out.accessors[ 1 ];
+
+ // 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++ ) {
+ seto( obuf, io, ( getc( cbuf, ic ) ) ? getx( xbuf, ix ) : gety( ybuf, iy ) ); // eslint-disable-line max-len
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+ ic += dc2;
+ ix += dx2;
+ iy += dy2;
+ io += do2;
+ }
+ ic += dc3;
+ ix += dx3;
+ iy += dy3;
+ io += do3;
+ }
+ ic += dc4;
+ ix += dx4;
+ iy += dy4;
+ io += do4;
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = where5d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/5d_blocked.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/5d_blocked.js
new file mode 100644
index 000000000000..d992fce939aa
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/5d_blocked.js
@@ -0,0 +1,358 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/* eslint-disable max-depth */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/ternary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/ternary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Applies a condition to two five-dimensional input ndarrays according to a five-dimensional boolean ndarray and assigns results to elements in a five-dimensional output ndarray via loop blocking.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @returns {void}
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+* var Uint8Array = require( '@stdlib/array/uint8' );
+*
+* // Create data buffers:
+* var cbuf = new Uint8Array( [ 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1 ] );
+* 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 ] );
+* var ybuf = 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 ] );
+* var obuf = new Float64Array( 6 );
+*
+* // Define the shape of the input and output arrays:
+* var shape = [ 1, 1, 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 12, 12, 4, 4, 1 ];
+* var sx = [ 12, 12, 4, 4, 1 ];
+* var sy = [ 12, 12, 4, 4, 1 ];
+* var so = [ 6, 6, 2, 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 1;
+* var ox = 1;
+* var oy = 1;
+* var oo = 0;
+*
+* // Create the input and output ndarray-like objects:
+* var condition = {
+* 'dtype': 'uint8',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major'
+* };
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+* var y = {
+* 'dtype': 'float64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major'
+* };
+* var out = {
+* 'dtype': 'float64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major'
+* };
+*
+* // Apply the condition:
+* blockedwhere5d( condition, x, y, out );
+*
+* console.log( out.data );
+* // => [ -2.0, -3.0, 6.0, 7.0, -10.0, -11.0 ]
+*/
+function blockedwhere5d( condition, x, y, out ) { // eslint-disable-line max-statements, max-lines-per-function
+ var bsize;
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var dc0;
+ var dc1;
+ var dc2;
+ var dc3;
+ var dc4;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dy0;
+ var dy1;
+ var dy2;
+ var dy3;
+ var dy4;
+ var do0;
+ var do1;
+ var do2;
+ var do3;
+ var do4;
+ var oc1;
+ var oc2;
+ var oc3;
+ var oc4;
+ var ox1;
+ var ox2;
+ var ox3;
+ var ox4;
+ var oy1;
+ var oy2;
+ var oy3;
+ var oy4;
+ var oo1;
+ var oo2;
+ var oo3;
+ var oo4;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var s4;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var oc;
+ var ox;
+ var oy;
+ var oo;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var j0;
+ var j1;
+ var j2;
+ var j3;
+ var j4;
+ var o;
+
+ // Note on variable naming convention: s#, dc#, dx#, dy#, do#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( condition.shape, condition.strides, x.strides, y.strides, out.strides ); // eslint-disable-line max-len
+
+ // Strides output as follows: sx, sy, sz, sw. According to arguments order respectively..
+ sh = o.sh;
+ sc = o.sx;
+ sx = o.sy;
+ sy = o.sz;
+ so = o.sw;
+
+ // Determine the block size:
+ bsize = blockSize( condition.dtype, x.dtype, y.dtype, out.dtype );
+
+ // Cache the indices of the first indexed elements in the respective ndarrays...
+ oc = condition.offset;
+ ox = x.offset;
+ oy = y.offset;
+ oo = out.offset;
+
+ // Cache references to the input and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.data;
+
+ // Cache offset increments for the innermost loop...
+ dc0 = sc[0];
+ dx0 = sx[0];
+ dy0 = sy[0];
+ do0 = so[0];
+
+ // Iterate over blocks...
+ for ( j4 = sh[4]; j4 > 0; ) {
+ if ( j4 < bsize ) {
+ s4 = j4;
+ j4 = 0;
+ } else {
+ s4 = bsize;
+ j4 -= bsize;
+ }
+ oc4 = oc + ( j4*sc[4] );
+ ox4 = ox + ( j4*sx[4] );
+ oy4 = oy + ( j4*sy[4] );
+ oo4 = oo + ( j4*so[4] );
+ for ( j3 = sh[3]; j3 > 0; ) {
+ if ( j3 < bsize ) {
+ s3 = j3;
+ j3 = 0;
+ } else {
+ s3 = bsize;
+ j3 -= bsize;
+ }
+ dc4 = sc[4] - ( s3*sc[3] );
+ dx4 = sx[4] - ( s3*sx[3] );
+ dy4 = sy[4] - ( s3*sy[3] );
+ do4 = so[4] - ( s3*so[3] );
+ oc3 = oc4 + ( j3*sc[3] );
+ ox3 = ox4 + ( j3*sx[3] );
+ oy3 = oy4 + ( j3*sy[3] );
+ oo3 = oo4 + ( j3*so[3] );
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ dc3 = sc[3] - ( s2*sc[2] );
+ dx3 = sx[3] - ( s2*sx[2] );
+ dy3 = sy[3] - ( s2*sy[2] );
+ do3 = so[3] - ( s2*so[2] );
+ oc2 = oc3 + ( j2*sc[2] );
+ ox2 = ox3 + ( j2*sx[2] );
+ oy2 = oy3 + ( j2*sy[2] );
+ oo2 = oo3 + ( j2*so[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dc2 = sc[2] - ( s1*sc[1] );
+ dx2 = sx[2] - ( s1*sx[1] );
+ dy2 = sy[2] - ( s1*sy[1] );
+ do2 = so[2] - ( s1*so[1] );
+ oc1 = oc2 + ( j1*sc[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ oy1 = oy2 + ( j1*sy[1] );
+ oo1 = oo2 + ( j1*so[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute index offsets for the first input and output ndarray elements in the current block...
+ ic = oc1 + ( j0*sc[0] );
+ ix = ox1 + ( j0*sx[0] );
+ iy = oy1 + ( j0*sy[0] );
+ io = oo1 + ( j0*so[0] );
+
+ // Compute loop offset increments...
+ dc1 = sc[1] - ( s0*sc[0] );
+ dx1 = sx[1] - ( s0*sx[0] );
+ dy1 = sy[1] - ( s0*sy[0] );
+ do1 = so[1] - ( s0*so[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++ ) {
+ obuf[ io ] = ( cbuf[ ic ] ) ? xbuf[ ix ] : ybuf[ iy ]; // eslint-disable-line max-len
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+ ic += dc2;
+ ix += dx2;
+ iy += dy2;
+ io += do2;
+ }
+ ic += dc3;
+ ix += dx3;
+ iy += dy3;
+ io += do3;
+ }
+ ic += dc4;
+ ix += dx4;
+ iy += dy4;
+ io += do4;
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = blockedwhere5d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/5d_blocked_accessors.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/5d_blocked_accessors.js
new file mode 100644
index 000000000000..396086302320
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/5d_blocked_accessors.js
@@ -0,0 +1,393 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/* eslint-disable max-depth */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/ternary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/ternary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Applies a condition to two five-dimensional input ndarrays according to a five-dimensional boolean ndarray and assigns results to elements in a five-dimensional output ndarray via loop blocking.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} condition.accessors - data buffer accessors
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} y.accessors - data buffer accessors
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} out.accessors - data buffer accessors
+* @returns {void}
+*
+* @example
+* var Complex64Array = require( '@stdlib/array/complex64' );
+* var BooleanArray = require( '@stdlib/array/bool' )
+* var Complex64 = require( '@stdlib/complex/float32/ctor' );
+* var realf = require( '@stdlib/complex/float32/real' );
+* var imagf = require( '@stdlib/complex/float32/imag' );
+*
+* // Create data buffers:
+* var cbuf = new BooleanArray( [ 1, 0, 0, 1, 0, 1, 1, 0 ] );
+* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+* var ybuf = new Complex64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0 ] );
+* var obuf = new Complex64Array( 4 );
+*
+* // Define the shape of the input and output arrays:
+* var shape = [ 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 4, 4, 4, 2, 1 ];
+* var sx = [ 4, 4, 4, 2, 1 ];
+* var sy = [ 4, 4, 4, 2, 1 ];
+* var so = [ 4, 4, 4, 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 0;
+* var ox = 0;
+* var oy = 0;
+* var oo = 0;
+*
+* // Define getters and setters:
+* function getter( buf, idx ) {
+* return buf.get( idx );
+* }
+*
+* function setter( buf, idx, value ) {
+* buf.set( value, idx );
+* }
+*
+* // Create the input and output ndarray-like objects:
+* var condition = {
+* 'dtype': 'bool',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var x = {
+* 'dtype': 'complex64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var y = {
+* 'dtype': 'complex64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var out = {
+* 'dtype': 'complex64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+*
+* // Apply the condition:
+* blockedwhere5d( condition, x, y, out );
+*
+* var v = out.data.get( 0 );
+*
+* var re = realf( v );
+* // returns 1.0
+*
+* var im = imagf( v );
+* // returns 2.0
+*/
+function blockedwhere5d( condition, x, y, out ) { // eslint-disable-line max-statements, max-lines-per-function
+ var bsize;
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var getc;
+ var getx;
+ var gety;
+ var seto;
+ var dc0;
+ var dc1;
+ var dc2;
+ var dc3;
+ var dc4;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dy0;
+ var dy1;
+ var dy2;
+ var dy3;
+ var dy4;
+ var do0;
+ var do1;
+ var do2;
+ var do3;
+ var do4;
+ var oc1;
+ var oc2;
+ var oc3;
+ var oc4;
+ var ox1;
+ var ox2;
+ var ox3;
+ var ox4;
+ var oy1;
+ var oy2;
+ var oy3;
+ var oy4;
+ var oo1;
+ var oo2;
+ var oo3;
+ var oo4;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var s4;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var oc;
+ var ox;
+ var oy;
+ var oo;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var j0;
+ var j1;
+ var j2;
+ var j3;
+ var j4;
+ var o;
+
+ // Note on variable naming convention: s#, dc#, dx#, dy#, do#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( condition.shape, condition.strides, x.strides, y.strides, out.strides ); // eslint-disable-line max-len
+
+ // Strides output as follows: sx, sy, sz, sw. According to arguments order respectively..
+ sh = o.sh;
+ sc = o.sx;
+ sx = o.sy;
+ sy = o.sz;
+ so = o.sw;
+
+ // Determine the block size:
+ bsize = blockSize( condition.dtype, x.dtype, y.dtype, out.dtype );
+
+ // Cache the indices of the first indexed elements in the respective ndarrays...
+ oc = condition.offset;
+ ox = x.offset;
+ oy = y.offset;
+ oo = out.offset;
+
+ // Cache references to the input and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.data;
+
+ // Cache offset increments for the innermost loop...
+ dc0 = sc[0];
+ dx0 = sx[0];
+ dy0 = sy[0];
+ do0 = so[0];
+
+ // Cache accessors:
+ getc = condition.accessors[ 0 ];
+ getx = x.accessors[ 0 ];
+ gety = y.accessors[ 0 ];
+ seto = out.accessors[ 1 ];
+
+ // Iterate over blocks...
+ for ( j4 = sh[4]; j4 > 0; ) {
+ if ( j4 < bsize ) {
+ s4 = j4;
+ j4 = 0;
+ } else {
+ s4 = bsize;
+ j4 -= bsize;
+ }
+ oc4 = oc + ( j4*sc[4] );
+ ox4 = ox + ( j4*sx[4] );
+ oy4 = oy + ( j4*sy[4] );
+ oo4 = oo + ( j4*so[4] );
+ for ( j3 = sh[3]; j3 > 0; ) {
+ if ( j3 < bsize ) {
+ s3 = j3;
+ j3 = 0;
+ } else {
+ s3 = bsize;
+ j3 -= bsize;
+ }
+ dc4 = sc[4] - ( s3*sc[3] );
+ dx4 = sx[4] - ( s3*sx[3] );
+ dy4 = sy[4] - ( s3*sy[3] );
+ do4 = so[4] - ( s3*so[3] );
+ oc3 = oc4 + ( j3*sc[3] );
+ ox3 = ox4 + ( j3*sx[3] );
+ oy3 = oy4 + ( j3*sy[3] );
+ oo3 = oo4 + ( j3*so[3] );
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ dc3 = sc[3] - ( s2*sc[2] );
+ dx3 = sx[3] - ( s2*sx[2] );
+ dy3 = sy[3] - ( s2*sy[2] );
+ do3 = so[3] - ( s2*so[2] );
+ oc2 = oc3 + ( j2*sc[2] );
+ ox2 = ox3 + ( j2*sx[2] );
+ oy2 = oy3 + ( j2*sy[2] );
+ oo2 = oo3 + ( j2*so[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dc2 = sc[2] - ( s1*sc[1] );
+ dx2 = sx[2] - ( s1*sx[1] );
+ dy2 = sy[2] - ( s1*sy[1] );
+ do2 = so[2] - ( s1*so[1] );
+ oc1 = oc2 + ( j1*sc[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ oy1 = oy2 + ( j1*sy[1] );
+ oo1 = oo2 + ( j1*so[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute index offsets for the first input and output ndarray elements in the current block...
+ ic = oc1 + ( j0*sc[0] );
+ ix = ox1 + ( j0*sx[0] );
+ iy = oy1 + ( j0*sy[0] );
+ io = oo1 + ( j0*so[0] );
+
+ // Compute loop offset increments...
+ dc1 = sc[1] - ( s0*sc[0] );
+ dx1 = sx[1] - ( s0*sx[0] );
+ dy1 = sy[1] - ( s0*sy[0] );
+ do1 = so[1] - ( s0*so[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++ ) {
+ seto( obuf, io, ( getc( cbuf, ic ) ) ? getx( xbuf, ix ) : gety( ybuf, iy ) ); // eslint-disable-line max-len
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+ ic += dc2;
+ ix += dx2;
+ iy += dy2;
+ io += do2;
+ }
+ ic += dc3;
+ ix += dx3;
+ iy += dy3;
+ io += do3;
+ }
+ ic += dc4;
+ ix += dx4;
+ iy += dy4;
+ io += do4;
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = blockedwhere5d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/6d.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/6d.js
new file mode 100644
index 000000000000..1c169a043353
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/6d.js
@@ -0,0 +1,304 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/* eslint-disable max-depth */
+
+'use strict';
+
+// MAIN //
+
+/**
+* Applies a condition to two six-dimensional input ndarrays according to a six-dimensional boolean ndarray and assigns results to elements in a six-dimensional output ndarray.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order
+* @returns {void}
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+* var Uint8Array = require( '@stdlib/array/uint8' );
+*
+* // Create data buffers:
+* var cbuf = new Uint8Array( [ 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1 ] );
+* 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 ] );
+* var ybuf = 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 ] );
+* var obuf = new Float64Array( 6 );
+*
+* // Define the shape of the input and output arrays:
+* var shape = [ 1, 1, 1, 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 12, 12, 12, 4, 4, 1 ];
+* var sx = [ 12, 12, 12, 4, 4, 1 ];
+* var sy = [ 12, 12, 12, 4, 4, 1 ];
+* var so = [ 6, 6, 6, 2, 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 1;
+* var ox = 1;
+* var oy = 1;
+* var oo = 0;
+*
+* // Create the input and output ndarray-like objects:
+* var condition = {
+* 'dtype': 'uint8',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major'
+* };
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+* var y = {
+* 'dtype': 'float64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major'
+* };
+* var out = {
+* 'dtype': 'float64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major'
+* };
+*
+* // Apply the condition:
+* where6d( condition, x, y, out, true );
+*
+* console.log( out.data );
+* // => [ -2.0, -3.0, 6.0, 7.0, -10.0, -11.0 ]
+*/
+function where6d( condition, x, y, out, isRowMajor ) { // eslint-disable-line max-statements
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var dc0;
+ var dc1;
+ var dc2;
+ var dc3;
+ var dc4;
+ var dc5;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dy0;
+ var dy1;
+ var dy2;
+ var dy3;
+ var dy4;
+ var dy5;
+ var do0;
+ var do1;
+ var do2;
+ var do3;
+ var do4;
+ var do5;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var S3;
+ var S4;
+ var S5;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+
+ // Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...
+ sh = x.shape;
+ sc = condition.strides;
+ sx = x.strides;
+ sy = y.strides;
+ so = out.strides;
+ if ( isRowMajor ) {
+ // 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 ];
+ dc0 = sc[ 5 ]; // offset increment for innermost loop
+ dc1 = sc[ 4 ] - ( S0*sc[5] );
+ dc2 = sc[ 3 ] - ( S1*sc[4] );
+ dc3 = sc[ 2 ] - ( S2*sc[3] );
+ dc4 = sc[ 1 ] - ( S3*sc[2] );
+ dc5 = sc[ 0 ] - ( S4*sc[1] ); // offset increment for outermost loop
+ dx0 = sx[ 5 ];
+ 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] );
+ dy0 = sy[ 5 ];
+ dy1 = sy[ 4 ] - ( S0*sy[5] );
+ dy2 = sy[ 3 ] - ( S1*sy[4] );
+ dy3 = sy[ 2 ] - ( S2*sy[3] );
+ dy4 = sy[ 1 ] - ( S3*sy[2] );
+ dy5 = sy[ 0 ] - ( S4*sy[1] );
+ do0 = so[ 5 ];
+ do1 = so[ 4 ] - ( S0*so[5] );
+ do2 = so[ 3 ] - ( S1*so[4] );
+ do3 = so[ 2 ] - ( S2*so[3] );
+ do4 = so[ 1 ] - ( S3*so[2] );
+ do5 = so[ 0 ] - ( S4*so[1] );
+ } 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 ];
+ dc0 = sc[ 0 ]; // offset increment for innermost loop
+ dc1 = sc[ 1 ] - ( S0*sc[0] );
+ dc2 = sc[ 2 ] - ( S1*sc[1] );
+ dc3 = sc[ 3 ] - ( S2*sc[2] );
+ dc4 = sc[ 4 ] - ( S3*sc[3] );
+ dc5 = sc[ 5 ] - ( S4*sc[4] ); // offset increment for outermost loop
+ dx0 = sx[ 0 ];
+ 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] );
+ dy0 = sy[ 0 ];
+ dy1 = sy[ 1 ] - ( S0*sy[0] );
+ dy2 = sy[ 2 ] - ( S1*sy[1] );
+ dy3 = sy[ 3 ] - ( S2*sy[2] );
+ dy4 = sy[ 4 ] - ( S3*sy[3] );
+ dy5 = sy[ 5 ] - ( S4*sy[4] );
+ do0 = so[ 0 ];
+ do1 = so[ 1 ] - ( S0*so[0] );
+ do2 = so[ 2 ] - ( S1*so[1] );
+ do3 = so[ 3 ] - ( S2*so[2] );
+ do4 = so[ 4 ] - ( S3*so[3] );
+ do5 = so[ 5 ] - ( S4*so[4] );
+ }
+ // Set the pointers to the first indexed elements in the respective ndarrays...
+ ic = condition.offset;
+ ix = x.offset;
+ iy = y.offset;
+ io = out.offset;
+
+ // Cache references to the input and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.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++ ) {
+ obuf[ io ] = ( cbuf[ ic ] ) ? xbuf[ ix ] : ybuf[ iy ]; // eslint-disable-line max-len
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+ ic += dc2;
+ ix += dx2;
+ iy += dy2;
+ io += do2;
+ }
+ ic += dc3;
+ ix += dx3;
+ iy += dy3;
+ io += do3;
+ }
+ ic += dc4;
+ ix += dx4;
+ iy += dy4;
+ io += do4;
+ }
+ ic += dc5;
+ ix += dx5;
+ iy += dy5;
+ io += do5;
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = where6d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/6d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/6d_accessors.js
new file mode 100644
index 000000000000..28bc5aede8e4
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/6d_accessors.js
@@ -0,0 +1,339 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/* eslint-disable max-depth */
+
+'use strict';
+
+// MAIN //
+
+/**
+* Applies a condition to two six-dimensional input ndarrays according to a six-dimensional boolean ndarray and assigns results to elements in a six-dimensional output ndarray.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} condition.accessors - data buffer accessors
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} y.accessors - data buffer accessors
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} out.accessors - data buffer accessors
+* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order
+* @returns {void}
+*
+* @example
+* var BooleanArray = require( '@stdlib/array/bool' );
+* var Complex64Array = require( '@stdlib/array/complex64' );
+* var Complex64 = require( '@stdlib/complex/float32/ctor' );
+* var realf = require( '@stdlib/complex/float32/real' );
+* var imagf = require( '@stdlib/complex/float32/imag' );
+*
+* // Create data buffers:
+* var cbuf = new BooleanArray( [ 1, 0, 0, 1, 0, 1, 1, 0 ] );
+* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0] );
+* var ybuf = new Complex64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0 ] );
+* var obuf = new Complex64Array( 4 );
+*
+* // Define the shape of the input and output arrays:
+* var shape = [ 1, 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 4, 4, 4, 4, 2, 1 ];
+* var sx = [ 4, 4, 4, 4, 2, 1 ];
+* var sy = [ 4, 4, 4, 4, 2, 1 ];
+* var so = [ 4, 4, 4, 4, 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 0;
+* var ox = 0;
+* var oy = 0;
+* var oo = 0;
+*
+* // Define getters and setters:
+* function getter( buf, idx ) {
+* return buf.get( idx );
+* }
+*
+* function setter( buf, idx, value ) {
+* buf.set( value, idx );
+* }
+*
+* // Create the input and output ndarray-like objects:
+* var condition = {
+* 'dtype': 'bool',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var x = {
+* 'dtype': 'complex64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var y = {
+* 'dtype': 'complex64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var out = {
+* 'dtype': 'complex64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+*
+* // Apply the condition:
+* where6d( condition, x, y, out, true );
+*
+* var v = out.data.get( 0 );
+*
+* var re = realf( v );
+* // returns 1.0
+*
+* var im = imagf( v );
+* // returns 2.0
+*/
+function where6d( condition, x, y, out, isRowMajor ) { // eslint-disable-line max-statements
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var getc;
+ var getx;
+ var gety;
+ var seto;
+ var dc0;
+ var dc1;
+ var dc2;
+ var dc3;
+ var dc4;
+ var dc5;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dy0;
+ var dy1;
+ var dy2;
+ var dy3;
+ var dy4;
+ var dy5;
+ var do0;
+ var do1;
+ var do2;
+ var do3;
+ var do4;
+ var do5;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var S3;
+ var S4;
+ var S5;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+
+ // Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...
+ sh = x.shape;
+ sc = condition.strides;
+ sx = x.strides;
+ sy = y.strides;
+ so = out.strides;
+ if ( isRowMajor ) {
+ // 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 ];
+ dc0 = sc[ 5 ]; // offset increment for innermost loop
+ dc1 = sc[ 4 ] - ( S0*sc[5] );
+ dc2 = sc[ 3 ] - ( S1*sc[4] );
+ dc3 = sc[ 2 ] - ( S2*sc[3] );
+ dc4 = sc[ 1 ] - ( S3*sc[2] );
+ dc5 = sc[ 0 ] - ( S4*sc[1] ); // offset increment for outermost loop
+ dx0 = sx[ 5 ];
+ 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] );
+ dy0 = sy[ 5 ];
+ dy1 = sy[ 4 ] - ( S0*sy[5] );
+ dy2 = sy[ 3 ] - ( S1*sy[4] );
+ dy3 = sy[ 2 ] - ( S2*sy[3] );
+ dy4 = sy[ 1 ] - ( S3*sy[2] );
+ dy5 = sy[ 0 ] - ( S4*sy[1] );
+ do0 = so[ 5 ];
+ do1 = so[ 4 ] - ( S0*so[5] );
+ do2 = so[ 3 ] - ( S1*so[4] );
+ do3 = so[ 2 ] - ( S2*so[3] );
+ do4 = so[ 1 ] - ( S3*so[2] );
+ do5 = so[ 0 ] - ( S4*so[1] );
+ } 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 ];
+ dc0 = sc[ 0 ]; // offset increment for innermost loop
+ dc1 = sc[ 1 ] - ( S0*sc[0] );
+ dc2 = sc[ 2 ] - ( S1*sc[1] );
+ dc3 = sc[ 3 ] - ( S2*sc[2] );
+ dc4 = sc[ 4 ] - ( S3*sc[3] );
+ dc5 = sc[ 5 ] - ( S4*sc[4] ); // offset increment for outermost loop
+ dx0 = sx[ 0 ];
+ 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] );
+ dy0 = sy[ 0 ];
+ dy1 = sy[ 1 ] - ( S0*sy[0] );
+ dy2 = sy[ 2 ] - ( S1*sy[1] );
+ dy3 = sy[ 3 ] - ( S2*sy[2] );
+ dy4 = sy[ 4 ] - ( S3*sy[3] );
+ dy5 = sy[ 5 ] - ( S4*sy[4] );
+ do0 = so[ 0 ];
+ do1 = so[ 1 ] - ( S0*so[0] );
+ do2 = so[ 2 ] - ( S1*so[1] );
+ do3 = so[ 3 ] - ( S2*so[2] );
+ do4 = so[ 4 ] - ( S3*so[3] );
+ do5 = so[ 5 ] - ( S4*so[4] );
+ }
+ // Set the pointers to the first indexed elements in the respective ndarrays...
+ ic = condition.offset;
+ ix = x.offset;
+ iy = y.offset;
+ io = out.offset;
+
+ // Cache references to the input and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.data;
+
+ // Cache accessors:
+ getc = condition.accessors[ 0 ];
+ getx = x.accessors[ 0 ];
+ gety = y.accessors[ 0 ];
+ seto = out.accessors[ 1 ];
+
+ // 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++ ) {
+ seto( obuf, io, ( getc( cbuf, ic ) ) ? getx( xbuf, ix ) : gety( ybuf, iy ) ); // eslint-disable-line max-len
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+ ic += dc2;
+ ix += dx2;
+ iy += dy2;
+ io += do2;
+ }
+ ic += dc3;
+ ix += dx3;
+ iy += dy3;
+ io += do3;
+ }
+ ic += dc4;
+ ix += dx4;
+ iy += dy4;
+ io += do4;
+ }
+ ic += dc5;
+ ix += dx5;
+ iy += dy5;
+ io += do5;
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = where6d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/6d_blocked.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/6d_blocked.js
new file mode 100644
index 000000000000..342046a04f4f
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/6d_blocked.js
@@ -0,0 +1,392 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/* eslint-disable max-depth */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/ternary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/ternary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Applies a condition to two six-dimensional input ndarrays according to a six-dimensional boolean ndarray and assigns results to elements in a six-dimensional output ndarray via loop blocking.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @returns {void}
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+* var Uint8Array = require( '@stdlib/array/uint8' );
+*
+* // Create data buffers:
+* var cbuf = new Uint8Array( [ 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1 ] );
+* 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 ] );
+* var ybuf = 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 ] );
+* var obuf = new Float64Array( 6 );
+*
+* // Define the shape of the input and output arrays:
+* var shape = [ 1, 1, 1, 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 12, 12, 12, 4, 4, 1 ];
+* var sx = [ 12, 12, 12, 4, 4, 1 ];
+* var sy = [ 12, 12, 12, 4, 4, 1 ];
+* var so = [ 6, 6, 6, 2, 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 1;
+* var ox = 1;
+* var oy = 1;
+* var oo = 0;
+*
+* // Create the input and output ndarray-like objects:
+* var condition = {
+* 'dtype': 'uint8',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major'
+* };
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+* var y = {
+* 'dtype': 'float64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major'
+* };
+* var out = {
+* 'dtype': 'float64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major'
+* };
+*
+* // Apply the condition:
+* blockedwhere6d( condition, x, y, out );
+*
+* console.log( out.data );
+* // => [ -2.0, -3.0, 6.0, 7.0, -10.0, -11.0 ]
+*/
+function blockedwhere6d( condition, x, y, out ) { // eslint-disable-line max-statements, max-lines-per-function
+ var bsize;
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var dc0;
+ var dc1;
+ var dc2;
+ var dc3;
+ var dc4;
+ var dc5;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dy0;
+ var dy1;
+ var dy2;
+ var dy3;
+ var dy4;
+ var dy5;
+ var do0;
+ var do1;
+ var do2;
+ var do3;
+ var do4;
+ var do5;
+ var oc1;
+ var oc2;
+ var oc3;
+ var oc4;
+ var oc5;
+ var ox1;
+ var ox2;
+ var ox3;
+ var ox4;
+ var ox5;
+ var oy1;
+ var oy2;
+ var oy3;
+ var oy4;
+ var oy5;
+ var oo1;
+ var oo2;
+ var oo3;
+ var oo4;
+ var oo5;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var s4;
+ var s5;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var oc;
+ var ox;
+ var oy;
+ var oo;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var j0;
+ var j1;
+ var j2;
+ var j3;
+ var j4;
+ var j5;
+ var o;
+
+ // Note on variable naming convention: s#, dc#, dx#, dy#, do#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( condition.shape, condition.strides, x.strides, y.strides, out.strides ); // eslint-disable-line max-len
+
+ // Strides output as follows: sx, sy, sz, sw. According to arguments order respectively..
+ sh = o.sh;
+ sc = o.sx;
+ sx = o.sy;
+ sy = o.sz;
+ so = o.sw;
+
+ // Determine the block size:
+ bsize = blockSize( condition.dtype, x.dtype, y.dtype, out.dtype );
+
+ // Cache the indices of the first indexed elements in the respective ndarrays...
+ oc = condition.offset;
+ ox = x.offset;
+ oy = y.offset;
+ oo = out.offset;
+
+ // Cache references to the input and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.data;
+
+ // Cache offset increments for the innermost loop...
+ dc0 = sc[0];
+ dx0 = sx[0];
+ dy0 = sy[0];
+ do0 = so[0];
+
+ // Iterate over blocks...
+ for ( j5 = sh[5]; j5 > 0; ) {
+ if ( j5 < bsize ) {
+ s5 = j5;
+ j5 = 0;
+ } else {
+ s5 = bsize;
+ j5 -= bsize;
+ }
+ oc5 = oc - ( j5*sc[5] );
+ ox5 = ox + ( j5*sx[5] );
+ oy5 = oy + ( j5*sy[5] );
+ oo5 = oo + ( j5*so[5] );
+ for ( j4 = sh[4]; j4 > 0; ) {
+ if ( j4 < bsize ) {
+ s4 = j4;
+ j4 = 0;
+ } else {
+ s4 = bsize;
+ j4 -= bsize;
+ }
+ dc5 = sc[5] - ( s4*sc[4] );
+ dx5 = sx[5] - ( s4*sx[4] );
+ dy5 = sy[5] - ( s4*sy[4] );
+ do5 = so[5] - ( s4*so[4] );
+ oc4 = oc5 + ( j4*sc[4] );
+ ox4 = ox5 + ( j4*sx[4] );
+ oy4 = oy5 + ( j4*sy[4] );
+ oo4 = oo5 + ( j4*so[4] );
+ for ( j3 = sh[3]; j3 > 0; ) {
+ if ( j3 < bsize ) {
+ s3 = j3;
+ j3 = 0;
+ } else {
+ s3 = bsize;
+ j3 -= bsize;
+ }
+ dc4 = sc[4] - ( s3*sc[3] );
+ dx4 = sx[4] - ( s3*sx[3] );
+ dy4 = sy[4] - ( s3*sy[3] );
+ do4 = so[4] - ( s3*so[3] );
+ oc3 = oc4 + ( j3*sc[3] );
+ ox3 = ox4 + ( j3*sx[3] );
+ oy3 = oy4 + ( j3*sy[3] );
+ oo3 = oo4 + ( j3*so[3] );
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ dc3 = sc[3] - ( s2*sc[2] );
+ dx3 = sx[3] - ( s2*sx[2] );
+ dy3 = sy[3] - ( s2*sy[2] );
+ do3 = so[3] - ( s2*so[2] );
+ oc2 = oc3 + ( j2*sc[2] );
+ ox2 = ox3 + ( j2*sx[2] );
+ oy2 = oy3 + ( j2*sy[2] );
+ oo2 = oo3 + ( j2*so[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dc2 = sc[2] - ( s1*sc[1] );
+ dx2 = sx[2] - ( s1*sx[1] );
+ dy2 = sy[2] - ( s1*sy[1] );
+ do2 = so[2] - ( s1*so[1] );
+ oc1 = oc2 + ( j1*sc[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ oy1 = oy2 + ( j1*sy[1] );
+ oo1 = oo2 + ( j1*so[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute index offsets for the first input and output ndarray elements in the current block...
+ ic = oc1 + ( j0*sc[0] );
+ ix = ox1 + ( j0*sx[0] );
+ iy = oy1 + ( j0*sy[0] );
+ io = oo1 + ( j0*so[0] );
+
+ // Compute loop offset increments...
+ dc1 = sc[1] - ( s0*sc[0] );
+ dx1 = sx[1] - ( s0*sx[0] );
+ dy1 = sy[1] - ( s0*sy[0] );
+ do1 = so[1] - ( s0*so[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++ ) {
+ obuf[ io ] = ( cbuf[ ic ] ) ? xbuf[ ix ] : ybuf[ iy ]; // eslint-disable-line max-len
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+ ic += dc2;
+ ix += dx2;
+ iy += dy2;
+ io += do2;
+ }
+ ic += dc3;
+ ix += dx3;
+ iy += dy3;
+ io += do3;
+ }
+ ic += dc4;
+ ix += dx4;
+ iy += dy4;
+ io += do4;
+ }
+ ic += dc5;
+ ix += dx5;
+ iy += dy5;
+ io += do5;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = blockedwhere6d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/6d_blocked_accessors.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/6d_blocked_accessors.js
new file mode 100644
index 000000000000..e5c536f2915d
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/6d_blocked_accessors.js
@@ -0,0 +1,427 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/* eslint-disable max-depth */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/ternary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/ternary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Applies a condition to two six-dimensional input ndarrays according to a six-dimensional boolean ndarray and assigns results to elements in a six-dimensional output ndarray via loop blocking.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} condition.accessors - data buffer accessors
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} y.accessors - data buffer accessors
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} out.accessors - data buffer accessors
+* @returns {void}
+*
+* @example
+* var Complex64Array = require( '@stdlib/array/complex64' );
+* var BooleanArray = require( '@stdlib/array/bool' )
+* var Complex64 = require( '@stdlib/complex/float32/ctor' );
+* var realf = require( '@stdlib/complex/float32/real' );
+* var imagf = require( '@stdlib/complex/float32/imag' );
+*
+* // Create data buffers:
+* var cbuf = new BooleanArray( [ 1, 0, 0, 1, 0, 1, 1, 0 ] );
+* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+* var ybuf = new Complex64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0 ] );
+* var obuf = new Complex64Array( 4 );
+*
+* // Define the shape of the input and output arrays:
+* var shape = [ 1, 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 4, 4, 4, 4, 2, 1 ];
+* var sx = [ 4, 4, 4, 4, 2, 1 ];
+* var sy = [ 4, 4, 4, 4, 2, 1 ];
+* var so = [ 4, 4, 4, 4, 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 0;
+* var ox = 0;
+* var oy = 0;
+* var oo = 0;
+*
+* // Define getters and setters:
+* function getter( buf, idx ) {
+* return buf.get( idx );
+* }
+*
+* function setter( buf, idx, value ) {
+* buf.set( value, idx );
+* }
+*
+* // Create the input and output ndarray-like objects:
+* var condition = {
+* 'dtype': 'bool',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var x = {
+* 'dtype': 'complex64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var y = {
+* 'dtype': 'complex64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var out = {
+* 'dtype': 'complex64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+*
+* // Apply the condition:
+* blockedwhere6d( condition, x, y, out );
+*
+* var v = out.data.get( 0 );
+*
+* var re = realf( v );
+* // returns 1.0
+*
+* var im = imagf( v );
+* // returns 2.0
+*/
+function blockedwhere6d( condition, x, y, out ) { // eslint-disable-line max-statements, max-lines-per-function
+ var bsize;
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var getc;
+ var getx;
+ var gety;
+ var seto;
+ var dc0;
+ var dc1;
+ var dc2;
+ var dc3;
+ var dc4;
+ var dc5;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dy0;
+ var dy1;
+ var dy2;
+ var dy3;
+ var dy4;
+ var dy5;
+ var do0;
+ var do1;
+ var do2;
+ var do3;
+ var do4;
+ var do5;
+ var oc1;
+ var oc2;
+ var oc3;
+ var oc4;
+ var oc5;
+ var ox1;
+ var ox2;
+ var ox3;
+ var ox4;
+ var ox5;
+ var oy1;
+ var oy2;
+ var oy3;
+ var oy4;
+ var oy5;
+ var oo1;
+ var oo2;
+ var oo3;
+ var oo4;
+ var oo5;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var s4;
+ var s5;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var oc;
+ var ox;
+ var oy;
+ var oo;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var j0;
+ var j1;
+ var j2;
+ var j3;
+ var j4;
+ var j5;
+ var o;
+
+ // Note on variable naming convention: s#, dc#, dx#, dy#, do#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( condition.shape, condition.strides, x.strides, y.strides, out.strides ); // eslint-disable-line max-len
+
+ // Strides output as follows: sx, sy, sz, sw. According to arguments order respectively..
+ sh = o.sh;
+ sc = o.sx;
+ sx = o.sy;
+ sy = o.sz;
+ so = o.sw;
+
+ // Determine the block size:
+ bsize = blockSize( condition.dtype, x.dtype, y.dtype, out.dtype );
+
+ // Cache the indices of the first indexed elements in the respective ndarrays...
+ oc = condition.offset;
+ ox = x.offset;
+ oy = y.offset;
+ oo = out.offset;
+
+ // Cache references to the input and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.data;
+
+ // Cache offset increments for the innermost loop...
+ dc0 = sc[0];
+ dx0 = sx[0];
+ dy0 = sy[0];
+ do0 = so[0];
+
+ // Cache accessors:
+ getc = condition.accessors[ 0 ];
+ getx = x.accessors[ 0 ];
+ gety = y.accessors[ 0 ];
+ seto = out.accessors[ 1 ];
+
+ // Iterate over blocks...
+ for ( j5 = sh[5]; j5 > 0; ) {
+ if ( j5 < bsize ) {
+ s5 = j5;
+ j5 = 0;
+ } else {
+ s5 = bsize;
+ j5 -= bsize;
+ }
+ oc5 = oc - ( j5*sc[5] );
+ ox5 = ox + ( j5*sx[5] );
+ oy5 = oy + ( j5*sy[5] );
+ oo5 = oo + ( j5*so[5] );
+ for ( j4 = sh[4]; j4 > 0; ) {
+ if ( j4 < bsize ) {
+ s4 = j4;
+ j4 = 0;
+ } else {
+ s4 = bsize;
+ j4 -= bsize;
+ }
+ dc5 = sc[5] - ( s4*sc[4] );
+ dx5 = sx[5] - ( s4*sx[4] );
+ dy5 = sy[5] - ( s4*sy[4] );
+ do5 = so[5] - ( s4*so[4] );
+ oc4 = oc5 + ( j4*sc[4] );
+ ox4 = ox5 + ( j4*sx[4] );
+ oy4 = oy5 + ( j4*sy[4] );
+ oo4 = oo5 + ( j4*so[4] );
+ for ( j3 = sh[3]; j3 > 0; ) {
+ if ( j3 < bsize ) {
+ s3 = j3;
+ j3 = 0;
+ } else {
+ s3 = bsize;
+ j3 -= bsize;
+ }
+ dc4 = sc[4] - ( s3*sc[3] );
+ dx4 = sx[4] - ( s3*sx[3] );
+ dy4 = sy[4] - ( s3*sy[3] );
+ do4 = so[4] - ( s3*so[3] );
+ oc3 = oc4 + ( j3*sc[3] );
+ ox3 = ox4 + ( j3*sx[3] );
+ oy3 = oy4 + ( j3*sy[3] );
+ oo3 = oo4 + ( j3*so[3] );
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ dc3 = sc[3] - ( s2*sc[2] );
+ dx3 = sx[3] - ( s2*sx[2] );
+ dy3 = sy[3] - ( s2*sy[2] );
+ do3 = so[3] - ( s2*so[2] );
+ oc2 = oc3 + ( j2*sc[2] );
+ ox2 = ox3 + ( j2*sx[2] );
+ oy2 = oy3 + ( j2*sy[2] );
+ oo2 = oo3 + ( j2*so[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dc2 = sc[2] - ( s1*sc[1] );
+ dx2 = sx[2] - ( s1*sx[1] );
+ dy2 = sy[2] - ( s1*sy[1] );
+ do2 = so[2] - ( s1*so[1] );
+ oc1 = oc2 + ( j1*sc[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ oy1 = oy2 + ( j1*sy[1] );
+ oo1 = oo2 + ( j1*so[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute index offsets for the first input and output ndarray elements in the current block...
+ ic = oc1 + ( j0*sc[0] );
+ ix = ox1 + ( j0*sx[0] );
+ iy = oy1 + ( j0*sy[0] );
+ io = oo1 + ( j0*so[0] );
+
+ // Compute loop offset increments...
+ dc1 = sc[1] - ( s0*sc[0] );
+ dx1 = sx[1] - ( s0*sx[0] );
+ dy1 = sy[1] - ( s0*sy[0] );
+ do1 = so[1] - ( s0*so[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++ ) {
+ seto( obuf, io, ( getc( cbuf, ic ) ) ? getx( xbuf, ix ) : gety( ybuf, iy ) ); // eslint-disable-line max-len
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+ ic += dc2;
+ ix += dx2;
+ iy += dy2;
+ io += do2;
+ }
+ ic += dc3;
+ ix += dx3;
+ iy += dy3;
+ io += do3;
+ }
+ ic += dc4;
+ ix += dx4;
+ iy += dy4;
+ io += do4;
+ }
+ ic += dc5;
+ ix += dx5;
+ iy += dy5;
+ io += do5;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = blockedwhere6d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/7d.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/7d.js
new file mode 100644
index 000000000000..440fa9e3fe55
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/7d.js
@@ -0,0 +1,323 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/* eslint-disable max-depth */
+
+'use strict';
+
+// MAIN //
+
+/**
+* Applies a condition to two seven-dimensional input ndarrays according to a seven-dimensional boolean ndarray and assigns results to elements in a seven-dimensional output ndarray.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order
+* @returns {void}
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+* var Uint8Array = require( '@stdlib/array/uint8' );
+*
+* // Create data buffers:
+* var cbuf = new Uint8Array( [ 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1 ] );
+* 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 ] );
+* var ybuf = 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 ] );
+* var obuf = new Float64Array( 6 );
+*
+* // Define the shape of the input and output arrays:
+* var shape = [ 1, 1, 1, 1, 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 12, 12, 12, 12, 4, 4, 1 ];
+* var sx = [ 12, 12, 12, 12, 4, 4, 1 ];
+* var sy = [ 12, 12, 12, 12, 4, 4, 1 ];
+* var so = [ 6, 6, 6, 6, 2, 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 1;
+* var ox = 1;
+* var oy = 1;
+* var oo = 0;
+*
+* // Create the input and output ndarray-like objects:
+* var condition = {
+* 'dtype': 'uint8',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major'
+* };
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+* var y = {
+* 'dtype': 'float64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major'
+* };
+* var out = {
+* 'dtype': 'float64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major'
+* };
+*
+* // Apply the condition:
+* where7d( condition, x, y, out, true );
+*
+* console.log( out.data );
+* // => [ -2.0, -3.0, 6.0, 7.0, -10.0, -11.0 ]
+*/
+function where7d( condition, x, y, out, isRowMajor ) { // eslint-disable-line max-statements
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var dc0;
+ var dc1;
+ var dc2;
+ var dc3;
+ var dc4;
+ var dc5;
+ var dc6;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var dy0;
+ var dy1;
+ var dy2;
+ var dy3;
+ var dy4;
+ var dy5;
+ var dy6;
+ var do0;
+ var do1;
+ var do2;
+ var do3;
+ var do4;
+ var do5;
+ var do6;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var S3;
+ var S4;
+ var S5;
+ var S6;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+
+ // Note on variable naming convention: S#, dc#, dx#, dy#, do#, 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;
+ sc = condition.strides;
+ sx = x.strides;
+ sy = y.strides;
+ so = out.strides;
+ if ( isRowMajor ) {
+ // 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 ];
+ dc0 = sc[ 6 ]; // offset increment for innermost loop
+ dc1 = sc[ 5 ] - ( S0*sc[6] );
+ dc2 = sc[ 4 ] - ( S1*sc[5] );
+ dc3 = sc[ 3 ] - ( S2*sc[4] );
+ dc4 = sc[ 2 ] - ( S3*sc[3] );
+ dc5 = sc[ 1 ] - ( S4*sc[2] );
+ dc6 = sc[ 0 ] - ( S5*sc[1] ); // offset increment for outermost loop
+ dx0 = sx[ 6 ];
+ 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] );
+ dy0 = sy[ 6 ];
+ dy1 = sy[ 5 ] - ( S0*sy[6] );
+ dy2 = sy[ 4 ] - ( S1*sy[5] );
+ dy3 = sy[ 3 ] - ( S2*sy[4] );
+ dy4 = sy[ 2 ] - ( S3*sy[3] );
+ dy5 = sy[ 1 ] - ( S4*sy[2] );
+ dy6 = sy[ 0 ] - ( S5*sy[1] );
+ do0 = so[ 6 ];
+ do1 = so[ 5 ] - ( S0*so[6] );
+ do2 = so[ 4 ] - ( S1*so[5] );
+ do3 = so[ 3 ] - ( S2*so[4] );
+ do4 = so[ 2 ] - ( S3*so[3] );
+ do5 = so[ 1 ] - ( S4*so[2] );
+ do6 = so[ 0 ] - ( S5*so[1] );
+ } 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 ];
+ dc0 = sc[ 0 ]; // offset increment for innermost loop
+ dc1 = sc[ 1 ] - ( S0*sc[0] );
+ dc2 = sc[ 2 ] - ( S1*sc[1] );
+ dc3 = sc[ 3 ] - ( S2*sc[2] );
+ dc4 = sc[ 4 ] - ( S3*sc[3] );
+ dc5 = sc[ 5 ] - ( S4*sc[4] );
+ dc6 = sc[ 6 ] - ( S5*sc[5] ); // offset increment for outermost loop
+ dx0 = sx[ 0 ];
+ 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] );
+ dy0 = sy[ 0 ];
+ dy1 = sy[ 1 ] - ( S0*sy[0] );
+ dy2 = sy[ 2 ] - ( S1*sy[1] );
+ dy3 = sy[ 3 ] - ( S2*sy[2] );
+ dy4 = sy[ 4 ] - ( S3*sy[3] );
+ dy5 = sy[ 5 ] - ( S4*sy[4] );
+ dy6 = sy[ 6 ] - ( S5*sy[5] );
+ do0 = so[ 0 ];
+ do1 = so[ 1 ] - ( S0*so[0] );
+ do2 = so[ 2 ] - ( S1*so[1] );
+ do3 = so[ 3 ] - ( S2*so[2] );
+ do4 = so[ 4 ] - ( S3*so[3] );
+ do5 = so[ 5 ] - ( S4*so[4] );
+ do6 = so[ 6 ] - ( S5*so[5] );
+ }
+ // Set the pointers to the first indexed elements in the respective ndarrays...
+ ic = condition.offset;
+ ix = x.offset;
+ iy = y.offset;
+ io = out.offset;
+
+ // Cache references to the input and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.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++ ) {
+ obuf[ io ] = ( cbuf[ ic ] ) ? xbuf[ ix ] : ybuf[ iy ];
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+ ic += dc2;
+ ix += dx2;
+ iy += dy2;
+ io += do2;
+ }
+ ic += dc3;
+ ix += dx3;
+ iy += dy3;
+ io += do3;
+ }
+ ic += dc4;
+ ix += dx4;
+ iy += dy4;
+ io += do4;
+ }
+ ic += dc5;
+ ix += dx5;
+ iy += dy5;
+ io += do5;
+ }
+ ic += dc6;
+ ix += dx6;
+ iy += dy6;
+ io += do6;
+ }
+}
+
+module.exports = where7d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/7d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/7d_accessors.js
new file mode 100644
index 000000000000..6f1a89af8950
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/7d_accessors.js
@@ -0,0 +1,358 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/* eslint-disable max-depth */
+
+'use strict';
+
+// MAIN //
+
+/**
+* Applies a condition to two seven-dimensional input ndarrays according to a seven-dimensional boolean ndarray and assigns results to elements in a seven-dimensional output ndarray.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} condition.accessors - data buffer accessors
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} y.accessors - data buffer accessors
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} out.accessors - data buffer accessors
+* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order
+* @returns {void}
+*
+* @example
+* var BooleanArray = require( '@stdlib/array/bool' );
+* var Complex64Array = require( '@stdlib/array/complex64' );
+* var Complex64 = require( '@stdlib/complex/float32/ctor' );
+* var realf = require( '@stdlib/complex/float32/real' );
+* var imagf = require( '@stdlib/complex/float32/imag' );
+*
+* // Create data buffers:
+* var cbuf = new BooleanArray( [ 1, 0, 0, 1, 0, 1, 1, 0 ] );
+* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0] );
+* var ybuf = new Complex64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0 ] );
+* var obuf = new Complex64Array( 4 );
+*
+* // Define the shape of the input and output arrays:
+* var shape = [ 1, 1, 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 4, 4, 4, 4, 4, 2, 1 ];
+* var sx = [ 4, 4, 4, 4, 4, 2, 1 ];
+* var sy = [ 4, 4, 4, 4, 4, 2, 1 ];
+* var so = [ 4, 4, 4, 4, 4, 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 0;
+* var ox = 0;
+* var oy = 0;
+* var oo = 0;
+*
+* // Define getters and setters:
+* function getter( buf, idx ) {
+* return buf.get( idx );
+* }
+*
+* function setter( buf, idx, value ) {
+* buf.set( value, idx );
+* }
+*
+* // Create the input and output ndarray-like objects:
+* var condition = {
+* 'dtype': 'bool',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var x = {
+* 'dtype': 'complex64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var y = {
+* 'dtype': 'complex64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var out = {
+* 'dtype': 'complex64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+*
+* // Apply the condition:
+* where7d( condition, x, y, out, true );
+*
+* var v = out.data.get( 0 );
+*
+* var re = realf( v );
+* // returns 1.0
+*
+* var im = imagf( v );
+* // returns 2.0
+*/
+function where7d( condition, x, y, out, isRowMajor ) { // eslint-disable-line max-statements
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var getc;
+ var getx;
+ var gety;
+ var seto;
+ var dc0;
+ var dc1;
+ var dc2;
+ var dc3;
+ var dc4;
+ var dc5;
+ var dc6;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var dy0;
+ var dy1;
+ var dy2;
+ var dy3;
+ var dy4;
+ var dy5;
+ var dy6;
+ var do0;
+ var do1;
+ var do2;
+ var do3;
+ var do4;
+ var do5;
+ var do6;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var S3;
+ var S4;
+ var S5;
+ var S6;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+
+ // Note on variable naming convention: S#, dc#, dx#, dy#, do#, 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;
+ sc = condition.strides;
+ sx = x.strides;
+ sy = y.strides;
+ so = out.strides;
+ if ( isRowMajor ) {
+ // 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 ];
+ dc0 = sc[ 6 ]; // offset increment for innermost loop
+ dc1 = sc[ 5 ] - ( S0*sc[6] );
+ dc2 = sc[ 4 ] - ( S1*sc[5] );
+ dc3 = sc[ 3 ] - ( S2*sc[4] );
+ dc4 = sc[ 2 ] - ( S3*sc[3] );
+ dc5 = sc[ 1 ] - ( S4*sc[2] );
+ dc6 = sc[ 0 ] - ( S5*sc[1] ); // offset increment for outermost loop
+ dx0 = sx[ 6 ];
+ 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] );
+ dy0 = sy[ 6 ];
+ dy1 = sy[ 5 ] - ( S0*sy[6] );
+ dy2 = sy[ 4 ] - ( S1*sy[5] );
+ dy3 = sy[ 3 ] - ( S2*sy[4] );
+ dy4 = sy[ 2 ] - ( S3*sy[3] );
+ dy5 = sy[ 1 ] - ( S4*sy[2] );
+ dy6 = sy[ 0 ] - ( S5*sy[1] );
+ do0 = so[ 6 ];
+ do1 = so[ 5 ] - ( S0*so[6] );
+ do2 = so[ 4 ] - ( S1*so[5] );
+ do3 = so[ 3 ] - ( S2*so[4] );
+ do4 = so[ 2 ] - ( S3*so[3] );
+ do5 = so[ 1 ] - ( S4*so[2] );
+ do6 = so[ 0 ] - ( S5*so[1] );
+ } 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 ];
+ dc0 = sc[ 0 ]; // offset increment for innermost loop
+ dc1 = sc[ 1 ] - ( S0*sc[0] );
+ dc2 = sc[ 2 ] - ( S1*sc[1] );
+ dc3 = sc[ 3 ] - ( S2*sc[2] );
+ dc4 = sc[ 4 ] - ( S3*sc[3] );
+ dc5 = sc[ 5 ] - ( S4*sc[4] );
+ dc6 = sc[ 6 ] - ( S5*sc[5] ); // offset increment for outermost loop
+ dx0 = sx[ 0 ];
+ 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] );
+ dy0 = sy[ 0 ];
+ dy1 = sy[ 1 ] - ( S0*sy[0] );
+ dy2 = sy[ 2 ] - ( S1*sy[1] );
+ dy3 = sy[ 3 ] - ( S2*sy[2] );
+ dy4 = sy[ 4 ] - ( S3*sy[3] );
+ dy5 = sy[ 5 ] - ( S4*sy[4] );
+ dy6 = sy[ 6 ] - ( S5*sy[5] );
+ do0 = so[ 0 ];
+ do1 = so[ 1 ] - ( S0*so[0] );
+ do2 = so[ 2 ] - ( S1*so[1] );
+ do3 = so[ 3 ] - ( S2*so[2] );
+ do4 = so[ 4 ] - ( S3*so[3] );
+ do5 = so[ 5 ] - ( S4*so[4] );
+ do6 = so[ 6 ] - ( S5*so[5] );
+ }
+ // Set the pointers to the first indexed elements in the respective ndarrays...
+ ic = condition.offset;
+ ix = x.offset;
+ iy = y.offset;
+ io = out.offset;
+
+ // Cache references to the input and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.data;
+
+ // Cache accessors:
+ getc = condition.accessors[ 0 ];
+ getx = x.accessors[ 0 ];
+ gety = y.accessors[ 0 ];
+ seto = out.accessors[ 1 ];
+
+ // 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++ ) {
+ seto( obuf, io, ( getc( cbuf, ic ) ) ? getx( xbuf, ix ) : gety( ybuf, iy ) ); // eslint-disable-line max-len
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+ ic += dc2;
+ ix += dx2;
+ iy += dy2;
+ io += do2;
+ }
+ ic += dc3;
+ ix += dx3;
+ iy += dy3;
+ io += do3;
+ }
+ ic += dc4;
+ ix += dx4;
+ iy += dy4;
+ io += do4;
+ }
+ ic += dc5;
+ ix += dx5;
+ iy += dy5;
+ io += do5;
+ }
+ ic += dc6;
+ ix += dx6;
+ iy += dy6;
+ io += do6;
+ }
+}
+
+module.exports = where7d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/7d_blocked.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/7d_blocked.js
new file mode 100644
index 000000000000..2d5bdbf78c97
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/7d_blocked.js
@@ -0,0 +1,442 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/* eslint-disable max-depth */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/ternary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/ternary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Applies a condition to two seven-dimensional input ndarrays according to a seven-dimensional boolean ndarray and assigns results to elements in a seven-dimensional output ndarray via loop blocking.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @returns {void}
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+* var Uint8Array = require( '@stdlib/array/uint8' );
+*
+* // Create data buffers:
+* var cbuf = new Uint8Array( [ 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1 ] );
+* 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 ] );
+* var ybuf = 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 ] );
+* var obuf = new Float64Array( 6 );
+*
+* // Define the shape of the input and output arrays:
+* var shape = [ 1, 1, 1, 1, 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 12, 12, 12, 12, 4, 4, 1 ];
+* var sx = [ 12, 12, 12, 12, 4, 4, 1 ];
+* var sy = [ 12, 12, 12, 12, 4, 4, 1 ];
+* var so = [ 6, 6, 6, 6, 2, 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 1;
+* var ox = 1;
+* var oy = 1;
+* var oo = 0;
+*
+* // Create the input and output ndarray-like objects:
+* var condition = {
+* 'dtype': 'uint8',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major'
+* };
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+* var y = {
+* 'dtype': 'float64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major'
+* };
+* var out = {
+* 'dtype': 'float64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major'
+* };
+*
+* // Apply the condition:
+* blockedwhere7d( condition, x, y, out );
+*
+* console.log( out.data );
+* // => [ -2.0, -3.0, 6.0, 7.0, -10.0, -11.0 ]
+*/
+function blockedwhere7d( condition, x, y, out ) { // eslint-disable-line max-statements, max-lines-per-function
+ var bsize;
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var dc0;
+ var dc1;
+ var dc2;
+ var dc3;
+ var dc4;
+ var dc5;
+ var dc6;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var dy0;
+ var dy1;
+ var dy2;
+ var dy3;
+ var dy4;
+ var dy5;
+ var dy6;
+ var do0;
+ var do1;
+ var do2;
+ var do3;
+ var do4;
+ var do5;
+ var do6;
+ var oc1;
+ var oc2;
+ var oc3;
+ var oc4;
+ var oc5;
+ var oc6;
+ var ox1;
+ var ox2;
+ var ox3;
+ var ox4;
+ var ox5;
+ var ox6;
+ var oy1;
+ var oy2;
+ var oy3;
+ var oy4;
+ var oy5;
+ var oy6;
+ var oo1;
+ var oo2;
+ var oo3;
+ var oo4;
+ var oo5;
+ var oo6;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var s4;
+ var s5;
+ var s6;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var oc;
+ var ox;
+ var oy;
+ var oo;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+ var j0;
+ var j1;
+ var j2;
+ var j3;
+ var j4;
+ var j5;
+ var j6;
+ var o;
+
+ // Note on variable naming convention: s#, dc#, dx#, dy#, do#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( condition.shape, condition.strides, x.strides, y.strides, out.strides ); // eslint-disable-line max-len
+
+ // Strides output as follows: sx, sy, sz, sw. According to arguments order respectively..
+ sh = o.sh;
+ sc = o.sx;
+ sx = o.sy;
+ sy = o.sz;
+ so = o.sw;
+
+ // Determine the block size:
+ bsize = blockSize( condition.dtype, x.dtype, y.dtype, out.dtype );
+
+ // Cache the indices of the first indexed elements in the respective ndarrays...
+ oc = condition.offset;
+ ox = x.offset;
+ oy = y.offset;
+ oo = out.offset;
+
+ // Cache references to the input and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.data;
+
+ // Cache offset increments for the innermost loop...
+ dc0 = sc[0];
+ dx0 = sx[0];
+ dy0 = sy[0];
+ do0 = so[0];
+
+ // Iterate over blocks...
+ for ( j6 = sh[6]; j6 > 0; ) {
+ if ( j6 < bsize ) {
+ s6 = j6;
+ j6 = 0;
+ } else {
+ s6 = bsize;
+ j6 -= bsize;
+ }
+ oc6 = oc - ( j6*sc[6] );
+ ox6 = ox + ( j6*sx[6] );
+ oy6 = oy + ( j6*sy[6] );
+ oo6 = oo + ( j6*so[6] );
+
+ for ( j5 = sh[5]; j5 > 0; ) {
+ if ( j5 < bsize ) {
+ s5 = j5;
+ j5 = 0;
+ } else {
+ s5 = bsize;
+ j5 -= bsize;
+ }
+
+ dc6 = sc[6] - ( s5*sc[5] );
+ dx6 = sx[6] - ( s5*sx[5] );
+ dy6 = sy[6] - ( s5*sy[5] );
+ do6 = so[6] - ( s5*so[5] );
+
+ oc5 = oc6 + ( j5*sc[5] );
+ ox5 = ox6 + ( j5*sx[5] );
+ oy5 = oy6 + ( j5*sy[5] );
+ oo5 = oo6 + ( j5*so[5] );
+
+ for ( j4 = sh[4]; j4 > 0; ) {
+ if ( j4 < bsize ) {
+ s4 = j4;
+ j4 = 0;
+ } else {
+ s4 = bsize;
+ j4 -= bsize;
+ }
+
+ dc5 = sc[5] - ( s4*sc[4] );
+ dx5 = sx[5] - ( s4*sx[4] );
+ dy5 = sy[5] - ( s4*sy[4] );
+ do5 = so[5] - ( s4*so[4] );
+
+ oc4 = oc5 + ( j4*sc[4] );
+ ox4 = ox5 + ( j4*sx[4] );
+ oy4 = oy5 + ( j4*sy[4] );
+ oo4 = oo5 + ( j4*so[4] );
+
+ for ( j3 = sh[3]; j3 > 0; ) {
+ if ( j3 < bsize ) {
+ s3 = j3;
+ j3 = 0;
+ } else {
+ s3 = bsize;
+ j3 -= bsize;
+ }
+
+ dc4 = sc[4] - ( s3*sc[3] );
+ dx4 = sx[4] - ( s3*sx[3] );
+ dy4 = sy[4] - ( s3*sy[3] );
+ do4 = so[4] - ( s3*so[3] );
+
+ oc3 = oc4 + ( j3*sc[3] );
+ ox3 = ox4 + ( j3*sx[3] );
+ oy3 = oy4 + ( j3*sy[3] );
+ oo3 = oo4 + ( j3*so[3] );
+
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+
+ dc3 = sc[3] - ( s2*sc[2] );
+ dx3 = sx[3] - ( s2*sx[2] );
+ dy3 = sy[3] - ( s2*sy[2] );
+ do3 = so[3] - ( s2*so[2] );
+
+ oc2 = oc3 + ( j2*sc[2] );
+ ox2 = ox3 + ( j2*sx[2] );
+ oy2 = oy3 + ( j2*sy[2] );
+ oo2 = oo3 + ( j2*so[2] );
+
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+
+ dc2 = sc[2] - ( s1*sc[1] );
+ dx2 = sx[2] - ( s1*sx[1] );
+ dy2 = sy[2] - ( s1*sy[1] );
+ do2 = so[2] - ( s1*so[1] );
+
+ oc1 = oc2 + ( j1*sc[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ oy1 = oy2 + ( j1*sy[1] );
+ oo1 = oo2 + ( j1*so[1] );
+
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute index offsets for the first input and output ndarray elements in the current block...
+ ic = oc1 + ( j0*sc[0] );
+ ix = ox1 + ( j0*sx[0] );
+ iy = oy1 + ( j0*sy[0] );
+ io = oo1 + ( j0*so[0] );
+
+ // Compute loop offset increments...
+ dc1 = sc[1] - ( s0*sc[0] );
+ dx1 = sx[1] - ( s0*sx[0] );
+ dy1 = sy[1] - ( s0*sy[0] );
+ do1 = so[1] - ( s0*so[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++ ) { // eslint-disable-line max-len
+ for ( i0 = 0; i0 < s0; i0++ ) { // eslint-disable-line max-len
+ obuf[ io ] = ( cbuf[ ic ] ) ? xbuf[ ix ] : ybuf[ iy ]; // eslint-disable-line max-len
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+ ic += dc2;
+ ix += dx2;
+ iy += dy2;
+ io += do2;
+ }
+ ic += dc3;
+ ix += dx3;
+ iy += dy3;
+ io += do3;
+ }
+ ic += dc4;
+ ix += dx4;
+ iy += dy4;
+ io += do4;
+ }
+ ic += dc5;
+ ix += dx5;
+ iy += dy5;
+ io += do5;
+ }
+ ic += dc6;
+ ix += dx6;
+ iy += dy6;
+ io += do6;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = blockedwhere7d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/7d_blocked_accessors.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/7d_blocked_accessors.js
new file mode 100644
index 000000000000..8dcc9f69ae43
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/7d_blocked_accessors.js
@@ -0,0 +1,477 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/* eslint-disable max-depth */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/ternary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/ternary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Applies a condition to two seven-dimensional input ndarrays according to a seven-dimensional boolean ndarray and assigns results to elements in a seven-dimensional output ndarray via loop blocking.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} condition.accessors - data buffer accessors
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} y.accessors - data buffer accessors
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} out.accessors - data buffer accessors
+* @returns {void}
+*
+* @example
+* var Complex64Array = require( '@stdlib/array/complex64' );
+* var BooleanArray = require( '@stdlib/array/bool' )
+* var Complex64 = require( '@stdlib/complex/float32/ctor' );
+* var realf = require( '@stdlib/complex/float32/real' );
+* var imagf = require( '@stdlib/complex/float32/imag' );
+*
+* // Create data buffers:
+* var cbuf = new BooleanArray( [ 1, 0, 0, 1, 0, 1, 1, 0 ] );
+* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+* var ybuf = new Complex64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0 ] );
+* var obuf = new Complex64Array( 4 );
+*
+* // Define the shape of the input and output arrays:
+* var shape = [ 1, 1, 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 4, 4, 4, 4, 4, 2, 1 ];
+* var sx = [ 4, 4, 4, 4, 4, 2, 1 ];
+* var sy = [ 4, 4, 4, 4, 4, 2, 1 ];
+* var so = [ 4, 4, 4, 4, 4, 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 0;
+* var ox = 0;
+* var oy = 0;
+* var oo = 0;
+*
+* // Define getters and setters:
+* function getter( buf, idx ) {
+* return buf.get( idx );
+* }
+*
+* function setter( buf, idx, value ) {
+* buf.set( value, idx );
+* }
+*
+* // Create the input and output ndarray-like objects:
+* var condition = {
+* 'dtype': 'bool',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var x = {
+* 'dtype': 'complex64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var y = {
+* 'dtype': 'complex64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var out = {
+* 'dtype': 'complex64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+*
+* // Apply the condition:
+* blockedwhere7d( condition, x, y, out );
+*
+* var v = out.data.get( 0 );
+*
+* var re = realf( v );
+* // returns 1.0
+*
+* var im = imagf( v );
+* // returns 2.0
+*/
+function blockedwhere7d( condition, x, y, out ) { // eslint-disable-line max-statements, max-lines-per-function
+ var bsize;
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var getc;
+ var getx;
+ var gety;
+ var seto;
+ var dc0;
+ var dc1;
+ var dc2;
+ var dc3;
+ var dc4;
+ var dc5;
+ var dc6;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var dy0;
+ var dy1;
+ var dy2;
+ var dy3;
+ var dy4;
+ var dy5;
+ var dy6;
+ var do0;
+ var do1;
+ var do2;
+ var do3;
+ var do4;
+ var do5;
+ var do6;
+ var oc1;
+ var oc2;
+ var oc3;
+ var oc4;
+ var oc5;
+ var oc6;
+ var ox1;
+ var ox2;
+ var ox3;
+ var ox4;
+ var ox5;
+ var ox6;
+ var oy1;
+ var oy2;
+ var oy3;
+ var oy4;
+ var oy5;
+ var oy6;
+ var oo1;
+ var oo2;
+ var oo3;
+ var oo4;
+ var oo5;
+ var oo6;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var s4;
+ var s5;
+ var s6;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var oc;
+ var ox;
+ var oy;
+ var oo;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+ var j0;
+ var j1;
+ var j2;
+ var j3;
+ var j4;
+ var j5;
+ var j6;
+ var o;
+
+ // Note on variable naming convention: s#, dc#, dx#, dy#, do#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( condition.shape, condition.strides, x.strides, y.strides, out.strides ); // eslint-disable-line max-len
+
+ // Strides output as follows: sx, sy, sz, sw. According to arguments order respectively..
+ sh = o.sh;
+ sc = o.sx;
+ sx = o.sy;
+ sy = o.sz;
+ so = o.sw;
+
+ // Determine the block size:
+ bsize = blockSize( condition.dtype, x.dtype, y.dtype, out.dtype );
+
+ // Cache the indices of the first indexed elements in the respective ndarrays...
+ oc = condition.offset;
+ ox = x.offset;
+ oy = y.offset;
+ oo = out.offset;
+
+ // Cache references to the input and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.data;
+
+ // Cache offset increments for the innermost loop...
+ dc0 = sc[0];
+ dx0 = sx[0];
+ dy0 = sy[0];
+ do0 = so[0];
+
+ // Cache accessors:
+ getc = condition.accessors[0];
+ getx = x.accessors[0];
+ gety = y.accessors[0];
+ seto = out.accessors[1];
+
+ // Iterate over blocks...
+ for ( j6 = sh[6]; j6 > 0; ) {
+ if ( j6 < bsize ) {
+ s6 = j6;
+ j6 = 0;
+ } else {
+ s6 = bsize;
+ j6 -= bsize;
+ }
+ oc6 = oc - ( j6*sc[6] );
+ ox6 = ox + ( j6*sx[6] );
+ oy6 = oy + ( j6*sy[6] );
+ oo6 = oo + ( j6*so[6] );
+
+ for ( j5 = sh[5]; j5 > 0; ) {
+ if ( j5 < bsize ) {
+ s5 = j5;
+ j5 = 0;
+ } else {
+ s5 = bsize;
+ j5 -= bsize;
+ }
+
+ dc6 = sc[6] - ( s5*sc[5] );
+ dx6 = sx[6] - ( s5*sx[5] );
+ dy6 = sy[6] - ( s5*sy[5] );
+ do6 = so[6] - ( s5*so[5] );
+
+ oc5 = oc6 + ( j5*sc[5] );
+ ox5 = ox6 + ( j5*sx[5] );
+ oy5 = oy6 + ( j5*sy[5] );
+ oo5 = oo6 + ( j5*so[5] );
+
+ for ( j4 = sh[4]; j4 > 0; ) {
+ if ( j4 < bsize ) {
+ s4 = j4;
+ j4 = 0;
+ } else {
+ s4 = bsize;
+ j4 -= bsize;
+ }
+
+ dc5 = sc[5] - ( s4*sc[4] );
+ dx5 = sx[5] - ( s4*sx[4] );
+ dy5 = sy[5] - ( s4*sy[4] );
+ do5 = so[5] - ( s4*so[4] );
+
+ oc4 = oc5 + ( j4*sc[4] );
+ ox4 = ox5 + ( j4*sx[4] );
+ oy4 = oy5 + ( j4*sy[4] );
+ oo4 = oo5 + ( j4*so[4] );
+
+ for ( j3 = sh[3]; j3 > 0; ) {
+ if ( j3 < bsize ) {
+ s3 = j3;
+ j3 = 0;
+ } else {
+ s3 = bsize;
+ j3 -= bsize;
+ }
+
+ dc4 = sc[4] - ( s3*sc[3] );
+ dx4 = sx[4] - ( s3*sx[3] );
+ dy4 = sy[4] - ( s3*sy[3] );
+ do4 = so[4] - ( s3*so[3] );
+
+ oc3 = oc4 + ( j3*sc[3] );
+ ox3 = ox4 + ( j3*sx[3] );
+ oy3 = oy4 + ( j3*sy[3] );
+ oo3 = oo4 + ( j3*so[3] );
+
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+
+ dc3 = sc[3] - ( s2*sc[2] );
+ dx3 = sx[3] - ( s2*sx[2] );
+ dy3 = sy[3] - ( s2*sy[2] );
+ do3 = so[3] - ( s2*so[2] );
+
+ oc2 = oc3 + ( j2*sc[2] );
+ ox2 = ox3 + ( j2*sx[2] );
+ oy2 = oy3 + ( j2*sy[2] );
+ oo2 = oo3 + ( j2*so[2] );
+
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+
+ dc2 = sc[2] - ( s1*sc[1] );
+ dx2 = sx[2] - ( s1*sx[1] );
+ dy2 = sy[2] - ( s1*sy[1] );
+ do2 = so[2] - ( s1*so[1] );
+
+ oc1 = oc2 + ( j1*sc[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ oy1 = oy2 + ( j1*sy[1] );
+ oo1 = oo2 + ( j1*so[1] );
+
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute index offsets for the first input and output ndarray elements in the current block...
+ ic = oc1 + ( j0*sc[0] );
+ ix = ox1 + ( j0*sx[0] );
+ iy = oy1 + ( j0*sy[0] );
+ io = oo1 + ( j0*so[0] );
+
+ // Compute loop offset increments...
+ dc1 = sc[1] - ( s0*sc[0] );
+ dx1 = sx[1] - ( s0*sx[0] );
+ dy1 = sy[1] - ( s0*sy[0] );
+ do1 = so[1] - ( s0*so[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++ ) { // eslint-disable-line max-len
+ for ( i0 = 0; i0 < s0; i0++ ) { // eslint-disable-line max-len
+ seto( obuf, io, ( getc( cbuf, ic ) ) ? getx( xbuf, ix ) : gety( ybuf, iy ) ); // eslint-disable-line max-len
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+ ic += dc2;
+ ix += dx2;
+ iy += dy2;
+ io += do2;
+ }
+ ic += dc3;
+ ix += dx3;
+ iy += dy3;
+ io += do3;
+ }
+ ic += dc4;
+ ix += dx4;
+ iy += dy4;
+ io += do4;
+ }
+ ic += dc5;
+ ix += dx5;
+ iy += dy5;
+ io += do5;
+ }
+ ic += dc6;
+ ix += dx6;
+ iy += dy6;
+ io += do6;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = blockedwhere7d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/8d.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/8d.js
new file mode 100644
index 000000000000..e062723362ce
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/8d.js
@@ -0,0 +1,348 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/* eslint-disable max-depth */
+
+'use strict';
+
+// MAIN //
+
+/**
+* Applies a condition to two eight-dimensional input ndarrays according to a eight-dimensional boolean ndarray and assigns results to elements in a eight-dimensional output ndarray.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order
+* @returns {void}
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+* var Uint8Array = require( '@stdlib/array/uint8' );
+*
+* // Create data buffers:
+* var cbuf = new Uint8Array( [ 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1 ] );
+* 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 ] );
+* var ybuf = 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 ] );
+* var obuf = new Float64Array( 6 );
+*
+* // Define the shape of the input and output arrays:
+* var shape = [ 1, 1, 1, 1, 1, 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 12, 12, 12, 12, 12, 4, 4, 1 ];
+* var sx = [ 12, 12, 12, 12, 12, 4, 4, 1 ];
+* var sy = [ 12, 12, 12, 12, 12, 4, 4, 1 ];
+* var so = [ 6, 6, 6, 6, 6, 2, 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 1;
+* var ox = 1;
+* var oy = 1;
+* var oo = 0;
+*
+* // Create the input and output ndarray-like objects:
+* var condition = {
+* 'dtype': 'uint8',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major'
+* };
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+* var y = {
+* 'dtype': 'float64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major'
+* };
+* var out = {
+* 'dtype': 'float64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major'
+* };
+*
+* // Apply the condition:
+* where8d( condition, x, y, out, true );
+*
+* console.log( out.data );
+* // => [ -2.0, -3.0, 6.0, 7.0, -10.0, -11.0 ]
+*/
+function where8d( condition, x, y, out, isRowMajor ) { // eslint-disable-line max-statements, max-lines-per-function
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var dc0;
+ var dc1;
+ var dc2;
+ var dc3;
+ var dc4;
+ var dc5;
+ var dc6;
+ var dc7;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var dx7;
+ var dy0;
+ var dy1;
+ var dy2;
+ var dy3;
+ var dy4;
+ var dy5;
+ var dy6;
+ var dy7;
+ var do0;
+ var do1;
+ var do2;
+ var do3;
+ var do4;
+ var do5;
+ var do6;
+ var do7;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var S3;
+ var S4;
+ var S5;
+ var S6;
+ var S7;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+ var i7;
+
+ // Note on variable naming convention: S#, dc#, dx#, dy#, do#, 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;
+ sc = condition.strides;
+ sx = x.strides;
+ sy = y.strides;
+ so = out.strides;
+ if ( isRowMajor ) {
+ // 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 ];
+ dc0 = sc[ 7 ]; // offset increment for innermost loop
+ dc1 = sc[ 6 ] - ( S0*sc[7] );
+ dc2 = sc[ 5 ] - ( S1*sc[6] );
+ dc3 = sc[ 4 ] - ( S2*sc[5] );
+ dc4 = sc[ 3 ] - ( S3*sc[4] );
+ dc5 = sc[ 2 ] - ( S4*sc[3] );
+ dc6 = sc[ 1 ] - ( S5*sc[2] );
+ dc7 = sc[ 0 ] - ( S6*sc[1] ); // offset increment for outermost loop
+ dx0 = sx[ 7 ];
+ 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] );
+ dy0 = sy[ 7 ];
+ dy1 = sy[ 6 ] - ( S0*sy[7] );
+ dy2 = sy[ 5 ] - ( S1*sy[6] );
+ dy3 = sy[ 4 ] - ( S2*sy[5] );
+ dy4 = sy[ 3 ] - ( S3*sy[4] );
+ dy5 = sy[ 2 ] - ( S4*sy[3] );
+ dy6 = sy[ 1 ] - ( S5*sy[2] );
+ dy7 = sy[ 0 ] - ( S6*sy[1] );
+ do0 = so[ 7 ];
+ do1 = so[ 6 ] - ( S0*so[7] );
+ do2 = so[ 5 ] - ( S1*so[6] );
+ do3 = so[ 4 ] - ( S2*so[5] );
+ do4 = so[ 3 ] - ( S3*so[4] );
+ do5 = so[ 2 ] - ( S4*so[3] );
+ do6 = so[ 1 ] - ( S5*so[2] );
+ do7 = so[ 0 ] - ( S6*so[1] );
+ } 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 ];
+ dc0 = sc[ 0 ]; // offset increment for innermost loop
+ dc1 = sc[ 1 ] - ( S0*sc[0] );
+ dc2 = sc[ 2 ] - ( S1*sc[1] );
+ dc3 = sc[ 3 ] - ( S2*sc[2] );
+ dc4 = sc[ 4 ] - ( S3*sc[3] );
+ dc5 = sc[ 5 ] - ( S4*sc[4] );
+ dc6 = sc[ 6 ] - ( S5*sc[5] );
+ dc7 = sc[ 7 ] - ( S6*sc[6] ); // offset increment for outermost loop
+ dx0 = sx[ 0 ];
+ 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] );
+ dy0 = sy[ 0 ];
+ dy1 = sy[ 1 ] - ( S0*sy[0] );
+ dy2 = sy[ 2 ] - ( S1*sy[1] );
+ dy3 = sy[ 3 ] - ( S2*sy[2] );
+ dy4 = sy[ 4 ] - ( S3*sy[3] );
+ dy5 = sy[ 5 ] - ( S4*sy[4] );
+ dy6 = sy[ 6 ] - ( S5*sy[5] );
+ dy7 = sy[ 7 ] - ( S6*sy[6] );
+ do0 = so[ 0 ];
+ do1 = so[ 1 ] - ( S0*so[0] );
+ do2 = so[ 2 ] - ( S1*so[1] );
+ do3 = so[ 3 ] - ( S2*so[2] );
+ do4 = so[ 4 ] - ( S3*so[3] );
+ do5 = so[ 5 ] - ( S4*so[4] );
+ do6 = so[ 6 ] - ( S5*so[5] );
+ do7 = so[ 7 ] - ( S6*so[6] );
+ }
+ // Set the pointers to the first indexed elements in the respective ndarrays...
+ ic = condition.offset;
+ ix = x.offset;
+ iy = y.offset;
+ io = out.offset;
+
+ // Cache references to the input and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.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++ ) {
+ obuf[ io ] = ( cbuf[ ic ] ) ? xbuf[ ix ] : ybuf[ iy ];
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+ ic += dc2;
+ ix += dx2;
+ iy += dy2;
+ io += do2;
+ }
+ ic += dc3;
+ ix += dx3;
+ iy += dy3;
+ io += do3;
+ }
+ ic += dc4;
+ ix += dx4;
+ iy += dy4;
+ io += do4;
+ }
+ ic += dc5;
+ ix += dx5;
+ iy += dy5;
+ io += do5;
+ }
+ ic += dc6;
+ ix += dx6;
+ iy += dy6;
+ io += do6;
+ }
+ ic += dc7;
+ ix += dx7;
+ iy += dy7;
+ io += do7;
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = where8d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/8d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/8d_accessors.js
new file mode 100644
index 000000000000..d44f4233af11
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/8d_accessors.js
@@ -0,0 +1,383 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/* eslint-disable max-depth */
+
+'use strict';
+
+// MAIN //
+
+/**
+* Applies a condition to two eight-dimensional input ndarrays according to a eight-dimensional boolean ndarray and assigns results to elements in a eight-dimensional output ndarray.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} condition.accessors - data buffer accessors
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} y.accessors - data buffer accessors
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} out.accessors - data buffer accessors
+* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order
+* @returns {void}
+*
+* @example
+* var BooleanArray = require( '@stdlib/array/bool' );
+* var Complex64Array = require( '@stdlib/array/complex64' );
+* var Complex64 = require( '@stdlib/complex/float32/ctor' );
+* var realf = require( '@stdlib/complex/float32/real' );
+* var imagf = require( '@stdlib/complex/float32/imag' );
+*
+* // Create data buffers:
+* var cbuf = new BooleanArray( [ 1, 0, 0, 1, 0, 1, 1, 0 ] );
+* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0] );
+* var ybuf = new Complex64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0 ] );
+* var obuf = new Complex64Array( 4 );
+*
+* // Define the shape of the input and output arrays:
+* var shape = [ 1, 1, 1, 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 4, 4, 4, 4, 4, 4, 2, 1 ];
+* var sx = [ 4, 4, 4, 4, 4, 4, 2, 1 ];
+* var sy = [ 4, 4, 4, 4, 4, 4, 2, 1 ];
+* var so = [ 4, 4, 4, 4, 4, 4, 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 0;
+* var ox = 0;
+* var oy = 0;
+* var oo = 0;
+*
+* // Define getters and setters:
+* function getter( buf, idx ) {
+* return buf.get( idx );
+* }
+*
+* function setter( buf, idx, value ) {
+* buf.set( value, idx );
+* }
+*
+* // Create the input and output ndarray-like objects:
+* var condition = {
+* 'dtype': 'bool',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var x = {
+* 'dtype': 'complex64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var y = {
+* 'dtype': 'complex64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var out = {
+* 'dtype': 'complex64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+*
+* // Apply the condition:
+* where8d( condition, x, y, out, true );
+*
+* var v = out.data.get( 0 );
+*
+* var re = realf( v );
+* // returns 1.0
+*
+* var im = imagf( v );
+* // returns 2.0
+*/
+function where8d( condition, x, y, out, isRowMajor ) { // eslint-disable-line max-statements, max-lines-per-function
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var getc;
+ var getx;
+ var gety;
+ var seto;
+ var dc0;
+ var dc1;
+ var dc2;
+ var dc3;
+ var dc4;
+ var dc5;
+ var dc6;
+ var dc7;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var dx7;
+ var dy0;
+ var dy1;
+ var dy2;
+ var dy3;
+ var dy4;
+ var dy5;
+ var dy6;
+ var dy7;
+ var do0;
+ var do1;
+ var do2;
+ var do3;
+ var do4;
+ var do5;
+ var do6;
+ var do7;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var S3;
+ var S4;
+ var S5;
+ var S6;
+ var S7;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+ var i7;
+
+ // Note on variable naming convention: S#, dc#, dx#, dy#, do#, 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;
+ sc = condition.strides;
+ sx = x.strides;
+ sy = y.strides;
+ so = out.strides;
+ if ( isRowMajor ) {
+ // 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 ];
+ dc0 = sc[ 7 ]; // offset increment for innermost loop
+ dc1 = sc[ 6 ] - ( S0*sc[7] );
+ dc2 = sc[ 5 ] - ( S1*sc[6] );
+ dc3 = sc[ 4 ] - ( S2*sc[5] );
+ dc4 = sc[ 3 ] - ( S3*sc[4] );
+ dc5 = sc[ 2 ] - ( S4*sc[3] );
+ dc6 = sc[ 1 ] - ( S5*sc[2] );
+ dc7 = sc[ 0 ] - ( S6*sc[1] ); // offset increment for outermost loop
+ dx0 = sx[ 7 ];
+ 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] );
+ dy0 = sy[ 7 ];
+ dy1 = sy[ 6 ] - ( S0*sy[7] );
+ dy2 = sy[ 5 ] - ( S1*sy[6] );
+ dy3 = sy[ 4 ] - ( S2*sy[5] );
+ dy4 = sy[ 3 ] - ( S3*sy[4] );
+ dy5 = sy[ 2 ] - ( S4*sy[3] );
+ dy6 = sy[ 1 ] - ( S5*sy[2] );
+ dy7 = sy[ 0 ] - ( S6*sy[1] );
+ do0 = so[ 7 ];
+ do1 = so[ 6 ] - ( S0*so[7] );
+ do2 = so[ 5 ] - ( S1*so[6] );
+ do3 = so[ 4 ] - ( S2*so[5] );
+ do4 = so[ 3 ] - ( S3*so[4] );
+ do5 = so[ 2 ] - ( S4*so[3] );
+ do6 = so[ 1 ] - ( S5*so[2] );
+ do7 = so[ 0 ] - ( S6*so[1] );
+ } 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 ];
+ dc0 = sc[ 0 ]; // offset increment for innermost loop
+ dc1 = sc[ 1 ] - ( S0*sc[0] );
+ dc2 = sc[ 2 ] - ( S1*sc[1] );
+ dc3 = sc[ 3 ] - ( S2*sc[2] );
+ dc4 = sc[ 4 ] - ( S3*sc[3] );
+ dc5 = sc[ 5 ] - ( S4*sc[4] );
+ dc6 = sc[ 6 ] - ( S5*sc[5] );
+ dc7 = sc[ 7 ] - ( S6*sc[6] ); // offset increment for outermost loop
+ dx0 = sx[ 0 ];
+ 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] );
+ dy0 = sy[ 0 ];
+ dy1 = sy[ 1 ] - ( S0*sy[0] );
+ dy2 = sy[ 2 ] - ( S1*sy[1] );
+ dy3 = sy[ 3 ] - ( S2*sy[2] );
+ dy4 = sy[ 4 ] - ( S3*sy[3] );
+ dy5 = sy[ 5 ] - ( S4*sy[4] );
+ dy6 = sy[ 6 ] - ( S5*sy[5] );
+ dy7 = sy[ 7 ] - ( S6*sy[6] );
+ do0 = so[ 0 ];
+ do1 = so[ 1 ] - ( S0*so[0] );
+ do2 = so[ 2 ] - ( S1*so[1] );
+ do3 = so[ 3 ] - ( S2*so[2] );
+ do4 = so[ 4 ] - ( S3*so[3] );
+ do5 = so[ 5 ] - ( S4*so[4] );
+ do6 = so[ 6 ] - ( S5*so[5] );
+ do7 = so[ 7 ] - ( S6*so[6] );
+ }
+ // Set the pointers to the first indexed elements in the respective ndarrays...
+ ic = condition.offset;
+ ix = x.offset;
+ iy = y.offset;
+ io = out.offset;
+
+ // Cache references to the input and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.data;
+
+ // Cache accessors:
+ getc = condition.accessors[ 0 ];
+ getx = x.accessors[ 0 ];
+ gety = y.accessors[ 0 ];
+ seto = out.accessors[ 1 ];
+
+ // 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++ ) {
+ seto( obuf, io, ( getc( cbuf, ic ) ) ? getx( xbuf, ix ) : gety( ybuf, iy ) ); // eslint-disable-line max-len
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+ ic += dc2;
+ ix += dx2;
+ iy += dy2;
+ io += do2;
+ }
+ ic += dc3;
+ ix += dx3;
+ iy += dy3;
+ io += do3;
+ }
+ ic += dc4;
+ ix += dx4;
+ iy += dy4;
+ io += do4;
+ }
+ ic += dc5;
+ ix += dx5;
+ iy += dy5;
+ io += do5;
+ }
+ ic += dc6;
+ ix += dx6;
+ iy += dy6;
+ io += do6;
+ }
+ ic += dc7;
+ ix += dx7;
+ iy += dy7;
+ io += do7;
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = where8d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/8d_blocked.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/8d_blocked.js
new file mode 100644
index 000000000000..fa53b67cb3f9
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/8d_blocked.js
@@ -0,0 +1,460 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/* eslint-disable max-depth, max-len */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/ternary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/ternary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Applies a condition to two eight-dimensional input ndarrays according to a eight-dimensional boolean ndarray and assigns results to elements in a eight-dimensional output ndarray via loop blocking.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @returns {void}
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+* var Uint8Array = require( '@stdlib/array/uint8' );
+*
+* // Create data buffers:
+* var cbuf = new Uint8Array( [ 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1 ] );
+* 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 ] );
+* var ybuf = 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 ] );
+* var obuf = new Float64Array( 6 );
+*
+* // Define the shape of the input and output arrays:
+* var shape = [ 1, 1, 1, 1, 1, 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 12, 12, 12, 12, 12, 4, 4, 1 ];
+* var sx = [ 12, 12, 12, 12, 12, 4, 4, 1 ];
+* var sy = [ 12, 12, 12, 12, 12, 4, 4, 1 ];
+* var so = [ 6, 6, 6, 6, 6, 2, 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 1;
+* var ox = 1;
+* var oy = 1;
+* var oo = 0;
+*
+* // Create the input and output ndarray-like objects:
+* var condition = {
+* 'dtype': 'uint8',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major'
+* };
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+* var y = {
+* 'dtype': 'float64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major'
+* };
+* var out = {
+* 'dtype': 'float64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major'
+* };
+*
+* // Apply the condition:
+* blockedwhere8d( condition, x, y, out );
+*
+* console.log( out.data );
+* // => [ -2.0, -3.0, 6.0, 7.0, -10.0, -11.0 ]
+*/
+function blockedwhere8d( condition, x, y, out ) { // eslint-disable-line max-statements, max-lines-per-function
+ var bsize;
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var dc0;
+ var dc1;
+ var dc2;
+ var dc3;
+ var dc4;
+ var dc5;
+ var dc6;
+ var dc7;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var dx7;
+ var dy0;
+ var dy1;
+ var dy2;
+ var dy3;
+ var dy4;
+ var dy5;
+ var dy6;
+ var dy7;
+ var do0;
+ var do1;
+ var do2;
+ var do3;
+ var do4;
+ var do5;
+ var do6;
+ var do7;
+ var oc1;
+ var oc2;
+ var oc3;
+ var oc4;
+ var oc5;
+ var oc6;
+ var oc7;
+ var ox1;
+ var ox2;
+ var ox3;
+ var ox4;
+ var ox5;
+ var ox6;
+ var ox7;
+ var oy1;
+ var oy2;
+ var oy3;
+ var oy4;
+ var oy5;
+ var oy6;
+ var oy7;
+ var oo1;
+ var oo2;
+ var oo3;
+ var oo4;
+ var oo5;
+ var oo6;
+ var oo7;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var s4;
+ var s5;
+ var s6;
+ var s7;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var oc;
+ var ox;
+ var oy;
+ var oo;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+ var i7;
+ var j0;
+ var j1;
+ var j2;
+ var j3;
+ var j4;
+ var j5;
+ var j6;
+ var j7;
+ var o;
+
+ // Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( condition.shape, condition.strides, x.strides, y.strides, out.strides );
+
+ // Strides output as follows: sx, sy, sz, sw. According to arguments order respectively..
+ sh = o.sh;
+ sc = o.sx;
+ sx = o.sy;
+ sy = o.sz;
+ so = o.sw;
+
+ // Determine the block size:
+ bsize = blockSize( condition.dtype, x.dtype, y.dtype, out.dtype );
+
+ // Cache the indices of the first indexed elements in the respective ndarrays...
+ oc = condition.offset;
+ ox = x.offset;
+ oy = y.offset;
+ oo = out.offset;
+
+ // Cache references to the input and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.data;
+
+ // Cache offset increments for the innermost loop...
+ dc0 = sc[0];
+ dx0 = sx[0];
+ dy0 = sy[0];
+ do0 = so[0];
+
+ // Iterate over blocks...
+ for ( j7 = sh[7]; j7 > 0; ) {
+ if ( j7 < bsize ) {
+ s7 = j7;
+ j7 = 0;
+ } else {
+ s7 = bsize;
+ j7 -= bsize;
+ }
+ oc7 = oc + ( j7*sc[7] );
+ ox7 = ox + ( j7*sx[7] );
+ oy7 = oy + ( j7*sy[7] );
+ oo7 = oo + ( j7*so[7] );
+ for ( j6 = sh[6]; j6 > 0; ) {
+ if ( j6 < bsize ) {
+ s6 = j6;
+ j6 = 0;
+ } else {
+ s6 = bsize;
+ j6 -= bsize;
+ }
+ dc7 = sc[7] - ( s6*sc[6] );
+ dx7 = sx[7] - ( s6*sx[6] );
+ dy7 = sy[7] - ( s6*sy[6] );
+ do7 = so[7] - ( s6*so[6] );
+ oc6 = oc7 + ( j6*sc[6] );
+ ox6 = ox7 + ( j6*sx[6] );
+ oy6 = oy7 + ( j6*sy[6] );
+ oo6 = oo7 + ( j6*so[6] );
+ for ( j5 = sh[5]; j5 > 0; ) {
+ if ( j5 < bsize ) {
+ s5 = j5;
+ j5 = 0;
+ } else {
+ s5 = bsize;
+ j5 -= bsize;
+ }
+ dc6 = sc[6] - ( s5*sc[5] );
+ dx6 = sx[6] - ( s5*sx[5] );
+ dy6 = sy[6] - ( s5*sy[5] );
+ do6 = so[6] - ( s5*so[5] );
+ oc5 = oc6 + ( j5*sc[5] );
+ ox5 = ox6 + ( j5*sx[5] );
+ oy5 = oy6 + ( j5*sy[5] );
+ oo5 = oo6 + ( j5*so[5] );
+ for ( j4 = sh[4]; j4 > 0; ) {
+ if ( j4 < bsize ) {
+ s4 = j4;
+ j4 = 0;
+ } else {
+ s4 = bsize;
+ j4 -= bsize;
+ }
+ dc5 = sc[5] - ( s4*sc[4] );
+ dx5 = sx[5] - ( s4*sx[4] );
+ dy5 = sy[5] - ( s4*sy[4] );
+ do5 = so[5] - ( s4*so[4] );
+ oc4 = oc5 + ( j4*sc[4] );
+ ox4 = ox5 + ( j4*sx[4] );
+ oy4 = oy5 + ( j4*sy[4] );
+ oo4 = oo5 + ( j4*so[4] );
+ for ( j3 = sh[3]; j3 > 0; ) {
+ if ( j3 < bsize ) {
+ s3 = j3;
+ j3 = 0;
+ } else {
+ s3 = bsize;
+ j3 -= bsize;
+ }
+ dc4 = sc[4] - ( s3*sc[3] );
+ dx4 = sx[4] - ( s3*sx[3] );
+ dy4 = sy[4] - ( s3*sy[3] );
+ do4 = so[4] - ( s3*so[3] );
+ oc3 = oc4 + ( j3*sc[3] );
+ ox3 = ox4 + ( j3*sx[3] );
+ oy3 = oy4 + ( j3*sy[3] );
+ oo3 = oo4 + ( j3*so[3] );
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ dc3 = sc[3] - ( s2*sc[2] );
+ dx3 = sx[3] - ( s2*sx[2] );
+ dy3 = sy[3] - ( s2*sy[2] );
+ do3 = so[3] - ( s2*so[2] );
+ oc2 = oc3 + ( j2*sc[2] );
+ ox2 = ox3 + ( j2*sx[2] );
+ oy2 = oy3 + ( j2*sy[2] );
+ oo2 = oo3 + ( j2*so[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dc2 = sc[2] - ( s1*sc[1] );
+ dx2 = sx[2] - ( s1*sx[1] );
+ dy2 = sy[2] - ( s1*sy[1] );
+ do2 = so[2] - ( s1*so[1] );
+ oc1 = oc2 + ( j1*sc[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ oy1 = oy2 + ( j1*sy[1] );
+ oo1 = oo2 + ( j1*so[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute index offsets for the first input and output ndarray elements in the current block...
+ ic = oc1 + ( j0*sc[0] );
+ ix = ox1 + ( j0*sx[0] );
+ iy = oy1 + ( j0*sy[0] );
+ io = oo1 + ( j0*so[0] );
+
+ // Compute loop offset increments...
+ dc1 = sc[1] - ( s0*sc[0] );
+ dx1 = sx[1] - ( s0*sx[0] );
+ dy1 = sy[1] - ( s0*sy[0] );
+ do1 = so[1] - ( s0*so[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++ ) {
+ obuf[ io ] = ( cbuf[ ic ] ) ? xbuf[ ix ] : ybuf[ iy ];
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+ ic += dc2;
+ ix += dx2;
+ iy += dy2;
+ io += do2;
+ }
+ ic += dc3;
+ ix += dx3;
+ iy += dy3;
+ io += do3;
+ }
+ ic += dc4;
+ ix += dx4;
+ iy += dy4;
+ io += do4;
+ }
+ ic += dc5;
+ ix += dx5;
+ iy += dy5;
+ io += do5;
+ }
+ ic += dc6;
+ ix += dx6;
+ iy += dy6;
+ io += do6;
+ }
+ ic += dc7;
+ ix += dx7;
+ iy += dy7;
+ io += do7;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = blockedwhere8d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/8d_blocked_accessors.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/8d_blocked_accessors.js
new file mode 100644
index 000000000000..0bc562789f47
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/8d_blocked_accessors.js
@@ -0,0 +1,495 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/* eslint-disable max-depth, max-len */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/ternary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/ternary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Applies a condition to two eight-dimensional input ndarrays according to a eight-dimensional boolean ndarray and assigns results to elements in a eight-dimensional output ndarray via loop blocking.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} condition.accessors - data buffer accessors
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} y.accessors - data buffer accessors
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} out.accessors - data buffer accessors
+* @returns {void}
+*
+* @example
+* var Complex64Array = require( '@stdlib/array/complex64' );
+* var BooleanArray = require( '@stdlib/array/bool' )
+* var Complex64 = require( '@stdlib/complex/float32/ctor' );
+* var realf = require( '@stdlib/complex/float32/real' );
+* var imagf = require( '@stdlib/complex/float32/imag' );
+*
+* // Create data buffers:
+* var cbuf = new BooleanArray( [ 1, 0, 0, 1, 0, 1, 1, 0 ] );
+* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+* var ybuf = new Complex64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0 ] );
+* var obuf = new Complex64Array( 4 );
+*
+* // Define the shape of the input and output arrays:
+* var shape = [ 1, 1, 1, 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 4, 4, 4, 4, 4, 4, 2, 1 ];
+* var sx = [ 4, 4, 4, 4, 4, 4, 2, 1 ];
+* var sy = [ 4, 4, 4, 4, 4, 4, 2, 1 ];
+* var so = [ 4, 4, 4, 4, 4, 4, 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 0;
+* var ox = 0;
+* var oy = 0;
+* var oo = 0;
+*
+* // Define getters and setters:
+* function getter( buf, idx ) {
+* return buf.get( idx );
+* }
+*
+* function setter( buf, idx, value ) {
+* buf.set( value, idx );
+* }
+*
+* // Create the input and output ndarray-like objects:
+* var condition = {
+* 'dtype': 'bool',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var x = {
+* 'dtype': 'complex64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var y = {
+* 'dtype': 'complex64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var out = {
+* 'dtype': 'complex64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+*
+* // Apply the condition:
+* blockedwhere8d( condition, x, y, out );
+*
+* var v = out.data.get( 0 );
+*
+* var re = realf( v );
+* // returns 1.0
+*
+* var im = imagf( v );
+* // returns 2.0
+*/
+function blockedwhere8d( condition, x, y, out ) { // eslint-disable-line max-statements, max-lines-per-function
+ var bsize;
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var getc;
+ var getx;
+ var gety;
+ var seto;
+ var dc0;
+ var dc1;
+ var dc2;
+ var dc3;
+ var dc4;
+ var dc5;
+ var dc6;
+ var dc7;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var dx7;
+ var dy0;
+ var dy1;
+ var dy2;
+ var dy3;
+ var dy4;
+ var dy5;
+ var dy6;
+ var dy7;
+ var do0;
+ var do1;
+ var do2;
+ var do3;
+ var do4;
+ var do5;
+ var do6;
+ var do7;
+ var oc1;
+ var oc2;
+ var oc3;
+ var oc4;
+ var oc5;
+ var oc6;
+ var oc7;
+ var ox1;
+ var ox2;
+ var ox3;
+ var ox4;
+ var ox5;
+ var ox6;
+ var ox7;
+ var oy1;
+ var oy2;
+ var oy3;
+ var oy4;
+ var oy5;
+ var oy6;
+ var oy7;
+ var oo1;
+ var oo2;
+ var oo3;
+ var oo4;
+ var oo5;
+ var oo6;
+ var oo7;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var s4;
+ var s5;
+ var s6;
+ var s7;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var oc;
+ var ox;
+ var oy;
+ var oo;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+ var i7;
+ var j0;
+ var j1;
+ var j2;
+ var j3;
+ var j4;
+ var j5;
+ var j6;
+ var j7;
+ var o;
+
+ // Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( condition.shape, condition.strides, x.strides, y.strides, out.strides );
+
+ // Strides output as follows: sx, sy, sz, sw. According to arguments order respectively..
+ sh = o.sh;
+ sc = o.sx;
+ sx = o.sy;
+ sy = o.sz;
+ so = o.sw;
+
+ // Determine the block size:
+ bsize = blockSize( condition.dtype, x.dtype, y.dtype, out.dtype );
+
+ // Cache the indices of the first indexed elements in the respective ndarrays...
+ oc = condition.offset;
+ ox = x.offset;
+ oy = y.offset;
+ oo = out.offset;
+
+ // Cache references to the input and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.data;
+
+ // Cache offset increments for the innermost loop...
+ dc0 = sc[0];
+ dx0 = sx[0];
+ dy0 = sy[0];
+ do0 = so[0];
+
+ // Cache accessors:
+ getc = condition.accessors[0];
+ getx = x.accessors[0];
+ gety = y.accessors[0];
+ seto = out.accessors[1];
+
+ // Iterate over blocks...
+ for ( j7 = sh[7]; j7 > 0; ) {
+ if ( j7 < bsize ) {
+ s7 = j7;
+ j7 = 0;
+ } else {
+ s7 = bsize;
+ j7 -= bsize;
+ }
+ oc7 = oc + ( j7*sc[7] );
+ ox7 = ox + ( j7*sx[7] );
+ oy7 = oy + ( j7*sy[7] );
+ oo7 = oo + ( j7*so[7] );
+ for ( j6 = sh[6]; j6 > 0; ) {
+ if ( j6 < bsize ) {
+ s6 = j6;
+ j6 = 0;
+ } else {
+ s6 = bsize;
+ j6 -= bsize;
+ }
+ dc7 = sc[7] - ( s6*sc[6] );
+ dx7 = sx[7] - ( s6*sx[6] );
+ dy7 = sy[7] - ( s6*sy[6] );
+ do7 = so[7] - ( s6*so[6] );
+ oc6 = oc7 + ( j6*sc[6] );
+ ox6 = ox7 + ( j6*sx[6] );
+ oy6 = oy7 + ( j6*sy[6] );
+ oo6 = oo7 + ( j6*so[6] );
+ for ( j5 = sh[5]; j5 > 0; ) {
+ if ( j5 < bsize ) {
+ s5 = j5;
+ j5 = 0;
+ } else {
+ s5 = bsize;
+ j5 -= bsize;
+ }
+ dc6 = sc[6] - ( s5*sc[5] );
+ dx6 = sx[6] - ( s5*sx[5] );
+ dy6 = sy[6] - ( s5*sy[5] );
+ do6 = so[6] - ( s5*so[5] );
+ oc5 = oc6 + ( j5*sc[5] );
+ ox5 = ox6 + ( j5*sx[5] );
+ oy5 = oy6 + ( j5*sy[5] );
+ oo5 = oo6 + ( j5*so[5] );
+ for ( j4 = sh[4]; j4 > 0; ) {
+ if ( j4 < bsize ) {
+ s4 = j4;
+ j4 = 0;
+ } else {
+ s4 = bsize;
+ j4 -= bsize;
+ }
+ dc5 = sc[5] - ( s4*sc[4] );
+ dx5 = sx[5] - ( s4*sx[4] );
+ dy5 = sy[5] - ( s4*sy[4] );
+ do5 = so[5] - ( s4*so[4] );
+ oc4 = oc5 + ( j4*sc[4] );
+ ox4 = ox5 + ( j4*sx[4] );
+ oy4 = oy5 + ( j4*sy[4] );
+ oo4 = oo5 + ( j4*so[4] );
+ for ( j3 = sh[3]; j3 > 0; ) {
+ if ( j3 < bsize ) {
+ s3 = j3;
+ j3 = 0;
+ } else {
+ s3 = bsize;
+ j3 -= bsize;
+ }
+ dc4 = sc[4] - ( s3*sc[3] );
+ dx4 = sx[4] - ( s3*sx[3] );
+ dy4 = sy[4] - ( s3*sy[3] );
+ do4 = so[4] - ( s3*so[3] );
+ oc3 = oc4 + ( j3*sc[3] );
+ ox3 = ox4 + ( j3*sx[3] );
+ oy3 = oy4 + ( j3*sy[3] );
+ oo3 = oo4 + ( j3*so[3] );
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ dc3 = sc[3] - ( s2*sc[2] );
+ dx3 = sx[3] - ( s2*sx[2] );
+ dy3 = sy[3] - ( s2*sy[2] );
+ do3 = so[3] - ( s2*so[2] );
+ oc2 = oc3 + ( j2*sc[2] );
+ ox2 = ox3 + ( j2*sx[2] );
+ oy2 = oy3 + ( j2*sy[2] );
+ oo2 = oo3 + ( j2*so[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dc2 = sc[2] - ( s1*sc[1] );
+ dx2 = sx[2] - ( s1*sx[1] );
+ dy2 = sy[2] - ( s1*sy[1] );
+ do2 = so[2] - ( s1*so[1] );
+ oc1 = oc2 + ( j1*sc[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ oy1 = oy2 + ( j1*sy[1] );
+ oo1 = oo2 + ( j1*so[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute index offsets for the first input and output ndarray elements in the current block...
+ ic = oc1 + ( j0*sc[0] );
+ ix = ox1 + ( j0*sx[0] );
+ iy = oy1 + ( j0*sy[0] );
+ io = oo1 + ( j0*so[0] );
+
+ // Compute loop offset increments...
+ dc1 = sc[1] - ( s0*sc[0] );
+ dx1 = sx[1] - ( s0*sx[0] );
+ dy1 = sy[1] - ( s0*sy[0] );
+ do1 = so[1] - ( s0*so[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++ ) {
+ seto( obuf, io, ( getc( cbuf, ic ) ) ? getx( xbuf, ix ) : gety( ybuf, iy ) );
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+ ic += dc2;
+ ix += dx2;
+ iy += dy2;
+ io += do2;
+ }
+ ic += dc3;
+ ix += dx3;
+ iy += dy3;
+ io += do3;
+ }
+ ic += dc4;
+ ix += dx4;
+ iy += dy4;
+ io += do4;
+ }
+ ic += dc5;
+ ix += dx5;
+ iy += dy5;
+ io += do5;
+ }
+ ic += dc6;
+ ix += dx6;
+ iy += dy6;
+ io += do6;
+ }
+ ic += dc7;
+ ix += dx7;
+ iy += dy7;
+ io += do7;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = blockedwhere8d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/9d.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/9d.js
new file mode 100644
index 000000000000..31d9f07f364a
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/9d.js
@@ -0,0 +1,370 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/* eslint-disable max-depth */
+
+'use strict';
+
+// MAIN //
+
+/**
+* Applies a condition to two nine-dimensional input ndarrays according to a nine-dimensional boolean ndarray and assigns results to elements in a nine-dimensional output ndarray.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order
+* @returns {void}
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+* var Uint8Array = require( '@stdlib/array/uint8' );
+*
+* // Create data buffers:
+* var cbuf = new Uint8Array( [ 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1 ] );
+* 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 ] );
+* var ybuf = 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 ] );
+* var obuf = new Float64Array( 6 );
+*
+* // Define the shape of the input and output arrays:
+* var shape = [ 1, 1, 1, 1, 1, 1, 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 12, 12, 12, 12, 12, 12, 4, 4, 1 ];
+* var sx = [ 12, 12, 12, 12, 12, 12, 4, 4, 1 ];
+* var sy = [ 12, 12, 12, 12, 12, 12, 4, 4, 1 ];
+* var so = [ 6, 6, 6, 6, 6, 6, 2, 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 1;
+* var ox = 1;
+* var oy = 1;
+* var oo = 0;
+*
+* // Create the input and output ndarray-like objects:
+* var condition = {
+* 'dtype': 'uint8',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major'
+* };
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+* var y = {
+* 'dtype': 'float64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major'
+* };
+* var out = {
+* 'dtype': 'float64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major'
+* };
+*
+* // Apply the condition:
+* where9d( condition, x, y, out, true );
+*
+* console.log( out.data );
+* // => [ -2.0, -3.0, 6.0, 7.0, -10.0, -11.0 ]
+*/
+function where9d( condition, x, y, out, isRowMajor ) { // eslint-disable-line max-statements, max-lines-per-function
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var dc0;
+ var dc1;
+ var dc2;
+ var dc3;
+ var dc4;
+ var dc5;
+ var dc6;
+ var dc7;
+ var dc8;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var dx7;
+ var dx8;
+ var dy0;
+ var dy1;
+ var dy2;
+ var dy3;
+ var dy4;
+ var dy5;
+ var dy6;
+ var dy7;
+ var dy8;
+ var do0;
+ var do1;
+ var do2;
+ var do3;
+ var do4;
+ var do5;
+ var do6;
+ var do7;
+ var do8;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var S3;
+ var S4;
+ var S5;
+ var S6;
+ var S7;
+ var S8;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+ var i7;
+ var i8;
+
+ // Note on variable naming convention: S#, dc#, dx#, dy#, do#, 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;
+ sc = condition.strides;
+ sx = x.strides;
+ sy = y.strides;
+ so = out.strides;
+ if ( isRowMajor ) {
+ // 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 ];
+ dc0 = sc[ 8 ]; // offset increment for innermost loop
+ dc1 = sc[ 7 ] - ( S0*sc[8] );
+ dc2 = sc[ 6 ] - ( S1*sc[7] );
+ dc3 = sc[ 5 ] - ( S2*sc[6] );
+ dc4 = sc[ 4 ] - ( S3*sc[5] );
+ dc5 = sc[ 3 ] - ( S4*sc[4] );
+ dc6 = sc[ 2 ] - ( S5*sc[3] );
+ dc7 = sc[ 1 ] - ( S6*sc[2] );
+ dc8 = sc[ 0 ] - ( S7*sc[1] ); // offset increment for outermost loop
+ dx0 = sx[ 8 ];
+ 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] );
+ dy0 = sy[ 8 ];
+ dy1 = sy[ 7 ] - ( S0*sy[8] );
+ dy2 = sy[ 6 ] - ( S1*sy[7] );
+ dy3 = sy[ 5 ] - ( S2*sy[6] );
+ dy4 = sy[ 4 ] - ( S3*sy[5] );
+ dy5 = sy[ 3 ] - ( S4*sy[4] );
+ dy6 = sy[ 2 ] - ( S5*sy[3] );
+ dy7 = sy[ 1 ] - ( S6*sy[2] );
+ dy8 = sy[ 0 ] - ( S7*sy[1] );
+ do0 = so[ 8 ];
+ do1 = so[ 7 ] - ( S0*so[8] );
+ do2 = so[ 6 ] - ( S1*so[7] );
+ do3 = so[ 5 ] - ( S2*so[6] );
+ do4 = so[ 4 ] - ( S3*so[5] );
+ do5 = so[ 3 ] - ( S4*so[4] );
+ do6 = so[ 2 ] - ( S5*so[3] );
+ do7 = so[ 1 ] - ( S6*so[2] );
+ do8 = so[ 0 ] - ( S7*so[1] );
+ } 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 ];
+ dc0 = sc[ 0 ]; // offset increment for innermost loop
+ dc1 = sc[ 1 ] - ( S0*sc[0] );
+ dc2 = sc[ 2 ] - ( S1*sc[1] );
+ dc3 = sc[ 3 ] - ( S2*sc[2] );
+ dc4 = sc[ 4 ] - ( S3*sc[3] );
+ dc5 = sc[ 5 ] - ( S4*sc[4] );
+ dc6 = sc[ 6 ] - ( S5*sc[5] );
+ dc7 = sc[ 7 ] - ( S6*sc[6] );
+ dc8 = sc[ 8 ] - ( S7*sc[7] ); // offset increment for outermost loop
+ dx0 = sx[ 0 ];
+ 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] );
+ dy0 = sy[ 0 ];
+ dy1 = sy[ 1 ] - ( S0*sy[0] );
+ dy2 = sy[ 2 ] - ( S1*sy[1] );
+ dy3 = sy[ 3 ] - ( S2*sy[2] );
+ dy4 = sy[ 4 ] - ( S3*sy[3] );
+ dy5 = sy[ 5 ] - ( S4*sy[4] );
+ dy6 = sy[ 6 ] - ( S5*sy[5] );
+ dy7 = sy[ 7 ] - ( S6*sy[6] );
+ dy8 = sy[ 8 ] - ( S7*sy[7] );
+ do0 = so[ 0 ];
+ do1 = so[ 1 ] - ( S0*so[0] );
+ do2 = so[ 2 ] - ( S1*so[1] );
+ do3 = so[ 3 ] - ( S2*so[2] );
+ do4 = so[ 4 ] - ( S3*so[3] );
+ do5 = so[ 5 ] - ( S4*so[4] );
+ do6 = so[ 6 ] - ( S5*so[5] );
+ do7 = so[ 7 ] - ( S6*so[6] );
+ do8 = so[ 8 ] - ( S7*so[7] );
+ }
+ // Set the pointers to the first indexed elements in the respective ndarrays...
+ ic = condition.offset;
+ ix = x.offset;
+ iy = y.offset;
+ io = out.offset;
+
+ // Cache references to the input and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.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++ ) {
+ obuf[ io ] = ( cbuf[ ic ] ) ? xbuf[ ix ] : ybuf[ iy ]; // eslint-disable-line max-len
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+ ic += dc2;
+ ix += dx2;
+ iy += dy2;
+ io += do2;
+ }
+ ic += dc3;
+ ix += dx3;
+ iy += dy3;
+ io += do3;
+ }
+ ic += dc4;
+ ix += dx4;
+ iy += dy4;
+ io += do4;
+ }
+ ic += dc5;
+ ix += dx5;
+ iy += dy5;
+ io += do5;
+ }
+ ic += dc6;
+ ix += dx6;
+ iy += dy6;
+ io += do6;
+ }
+ ic += dc7;
+ ix += dx7;
+ iy += dy7;
+ io += do7;
+ }
+ ic += dc8;
+ ix += dx8;
+ iy += dy8;
+ io += do8;
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = where9d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/9d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/9d_accessors.js
new file mode 100644
index 000000000000..dd8a36838581
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/9d_accessors.js
@@ -0,0 +1,405 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/* eslint-disable max-depth */
+
+'use strict';
+
+// MAIN //
+
+/**
+* Applies a condition to two nine-dimensional input ndarrays according to a nine-dimensional boolean ndarray and assigns results to elements in a nine-dimensional output ndarray.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} condition.accessors - data buffer accessors
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} y.accessors - data buffer accessors
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} out.accessors - data buffer accessors
+* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order
+* @returns {void}
+*
+* @example
+* var BooleanArray = require( '@stdlib/array/bool' );
+* var Complex64Array = require( '@stdlib/array/complex64' );
+* var Complex64 = require( '@stdlib/complex/float32/ctor' );
+* var realf = require( '@stdlib/complex/float32/real' );
+* var imagf = require( '@stdlib/complex/float32/imag' );
+*
+* // Create data buffers:
+* var cbuf = new BooleanArray( [ 1, 0, 0, 1, 0, 1, 1, 0 ] );
+* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0] );
+* var ybuf = new Complex64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0 ] );
+* var obuf = new Complex64Array( 4 );
+*
+* // Define the shape of the input and output arrays:
+* var shape = [ 1, 1, 1, 1, 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 4, 4, 4, 4, 4, 4, 4, 2, 1 ];
+* var sx = [ 4, 4, 4, 4, 4, 4, 4, 2, 1 ];
+* var sy = [ 4, 4, 4, 4, 4, 4, 4, 2, 1 ];
+* var so = [ 4, 4, 4, 4, 4, 4, 4, 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 0;
+* var ox = 0;
+* var oy = 0;
+* var oo = 0;
+*
+* // Define getters and setters:
+* function getter( buf, idx ) {
+* return buf.get( idx );
+* }
+*
+* function setter( buf, idx, value ) {
+* buf.set( value, idx );
+* }
+*
+* // Create the input and output ndarray-like objects:
+* var condition = {
+* 'dtype': 'bool',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var x = {
+* 'dtype': 'complex64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var y = {
+* 'dtype': 'complex64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var out = {
+* 'dtype': 'complex64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+*
+* // Apply the condition:
+* where9d( condition, x, y, out, true );
+*
+* var v = out.data.get( 0 );
+*
+* var re = realf( v );
+* // returns 1.0
+*
+* var im = imagf( v );
+* // returns 2.0
+*/
+function where9d( condition, x, y, out, isRowMajor ) { // eslint-disable-line max-statements, max-lines-per-function
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var getc;
+ var getx;
+ var gety;
+ var seto;
+ var dc0;
+ var dc1;
+ var dc2;
+ var dc3;
+ var dc4;
+ var dc5;
+ var dc6;
+ var dc7;
+ var dc8;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var dx7;
+ var dx8;
+ var dy0;
+ var dy1;
+ var dy2;
+ var dy3;
+ var dy4;
+ var dy5;
+ var dy6;
+ var dy7;
+ var dy8;
+ var do0;
+ var do1;
+ var do2;
+ var do3;
+ var do4;
+ var do5;
+ var do6;
+ var do7;
+ var do8;
+ var sh;
+ var S0;
+ var S1;
+ var S2;
+ var S3;
+ var S4;
+ var S5;
+ var S6;
+ var S7;
+ var S8;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+ var i7;
+ var i8;
+
+ // Note on variable naming convention: S#, dc#, dx#, dy#, do#, 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;
+ sc = condition.strides;
+ sx = x.strides;
+ sy = y.strides;
+ so = out.strides;
+ if ( isRowMajor ) {
+ // 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 ];
+ dc0 = sc[ 8 ]; // offset increment for innermost loop
+ dc1 = sc[ 7 ] - ( S0*sc[8] );
+ dc2 = sc[ 6 ] - ( S1*sc[7] );
+ dc3 = sc[ 5 ] - ( S2*sc[6] );
+ dc4 = sc[ 4 ] - ( S3*sc[5] );
+ dc5 = sc[ 3 ] - ( S4*sc[4] );
+ dc6 = sc[ 2 ] - ( S5*sc[3] );
+ dc7 = sc[ 1 ] - ( S6*sc[2] );
+ dc8 = sc[ 0 ] - ( S7*sc[1] ); // offset increment for outermost loop
+ dx0 = sx[ 8 ];
+ 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] );
+ dy0 = sy[ 8 ];
+ dy1 = sy[ 7 ] - ( S0*sy[8] );
+ dy2 = sy[ 6 ] - ( S1*sy[7] );
+ dy3 = sy[ 5 ] - ( S2*sy[6] );
+ dy4 = sy[ 4 ] - ( S3*sy[5] );
+ dy5 = sy[ 3 ] - ( S4*sy[4] );
+ dy6 = sy[ 2 ] - ( S5*sy[3] );
+ dy7 = sy[ 1 ] - ( S6*sy[2] );
+ dy8 = sy[ 0 ] - ( S7*sy[1] );
+ do0 = so[ 8 ];
+ do1 = so[ 7 ] - ( S0*so[8] );
+ do2 = so[ 6 ] - ( S1*so[7] );
+ do3 = so[ 5 ] - ( S2*so[6] );
+ do4 = so[ 4 ] - ( S3*so[5] );
+ do5 = so[ 3 ] - ( S4*so[4] );
+ do6 = so[ 2 ] - ( S5*so[3] );
+ do7 = so[ 1 ] - ( S6*so[2] );
+ do8 = so[ 0 ] - ( S7*so[1] );
+ } 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 ];
+ dc0 = sc[ 0 ]; // offset increment for innermost loop
+ dc1 = sc[ 1 ] - ( S0*sc[0] );
+ dc2 = sc[ 2 ] - ( S1*sc[1] );
+ dc3 = sc[ 3 ] - ( S2*sc[2] );
+ dc4 = sc[ 4 ] - ( S3*sc[3] );
+ dc5 = sc[ 5 ] - ( S4*sc[4] );
+ dc6 = sc[ 6 ] - ( S5*sc[5] );
+ dc7 = sc[ 7 ] - ( S6*sc[6] );
+ dc8 = sc[ 8 ] - ( S7*sc[7] ); // offset increment for outermost loop
+ dx0 = sx[ 0 ];
+ 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] );
+ dy0 = sy[ 0 ];
+ dy1 = sy[ 1 ] - ( S0*sy[0] );
+ dy2 = sy[ 2 ] - ( S1*sy[1] );
+ dy3 = sy[ 3 ] - ( S2*sy[2] );
+ dy4 = sy[ 4 ] - ( S3*sy[3] );
+ dy5 = sy[ 5 ] - ( S4*sy[4] );
+ dy6 = sy[ 6 ] - ( S5*sy[5] );
+ dy7 = sy[ 7 ] - ( S6*sy[6] );
+ dy8 = sy[ 8 ] - ( S7*sy[7] );
+ do0 = so[ 0 ];
+ do1 = so[ 1 ] - ( S0*so[0] );
+ do2 = so[ 2 ] - ( S1*so[1] );
+ do3 = so[ 3 ] - ( S2*so[2] );
+ do4 = so[ 4 ] - ( S3*so[3] );
+ do5 = so[ 5 ] - ( S4*so[4] );
+ do6 = so[ 6 ] - ( S5*so[5] );
+ do7 = so[ 7 ] - ( S6*so[6] );
+ do8 = so[ 8 ] - ( S7*so[7] );
+ }
+ // Set the pointers to the first indexed elements in the respective ndarrays...
+ ic = condition.offset;
+ ix = x.offset;
+ iy = y.offset;
+ io = out.offset;
+
+ // Cache references to the input and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.data;
+
+ // Cache accessors:
+ getc = condition.accessors[ 0 ];
+ getx = x.accessors[ 0 ];
+ gety = y.accessors[ 0 ];
+ seto = out.accessors[ 1 ];
+
+ // 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++ ) {
+ seto( obuf, io, ( getc( cbuf, ic ) ) ? getx( xbuf, ix ) : gety( ybuf, iy ) ); // eslint-disable-line max-len
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+ ic += dc2;
+ ix += dx2;
+ iy += dy2;
+ io += do2;
+ }
+ ic += dc3;
+ ix += dx3;
+ iy += dy3;
+ io += do3;
+ }
+ ic += dc4;
+ ix += dx4;
+ iy += dy4;
+ io += do4;
+ }
+ ic += dc5;
+ ix += dx5;
+ iy += dy5;
+ io += do5;
+ }
+ ic += dc6;
+ ix += dx6;
+ iy += dy6;
+ io += do6;
+ }
+ ic += dc7;
+ ix += dx7;
+ iy += dy7;
+ io += do7;
+ }
+ ic += dc8;
+ ix += dx8;
+ iy += dy8;
+ io += do8;
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = where9d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/9d_blocked.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/9d_blocked.js
new file mode 100644
index 000000000000..44a4e5d61e96
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/9d_blocked.js
@@ -0,0 +1,494 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/* eslint-disable max-depth, max-len, max-lines */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/ternary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/ternary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Applies a condition to two nine-dimensional input ndarrays according to a nine-dimensional boolean ndarray and assigns results to elements in a nine-dimensional output ndarray via loop blocking.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @returns {void}
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+* var Uint8Array = require( '@stdlib/array/uint8' );
+*
+* // Create data buffers:
+* var cbuf = new Uint8Array( [ 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1 ] );
+* 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 ] );
+* var ybuf = 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 ] );
+* var obuf = new Float64Array( 6 );
+*
+* // Define the shape of the input and output arrays:
+* var shape = [ 1, 1, 1, 1, 1, 1, 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 12, 12, 12, 12, 12, 12, 4, 4, 1 ];
+* var sx = [ 12, 12, 12, 12, 12, 12, 4, 4, 1 ];
+* var sy = [ 12, 12, 12, 12, 12, 12, 4, 4, 1 ];
+* var so = [ 6, 6, 6, 6, 6, 6, 2, 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 1;
+* var ox = 1;
+* var oy = 1;
+* var oo = 0;
+*
+* // Create the input and output ndarray-like objects:
+* var condition = {
+* 'dtype': 'uint8',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major'
+* };
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+* var y = {
+* 'dtype': 'float64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major'
+* };
+* var out = {
+* 'dtype': 'float64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major'
+* };
+*
+* // Apply the condition:
+* blockedwhere9d( condition, x, y, out );
+*
+* console.log( out.data );
+* // => [ -2.0, -3.0, 6.0, 7.0, -10.0, -11.0 ]
+*/
+function blockedwhere9d( condition, x, y, out ) { // eslint-disable-line max-statements, max-lines-per-function
+ var bsize;
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var dc0;
+ var dc1;
+ var dc2;
+ var dc3;
+ var dc4;
+ var dc5;
+ var dc6;
+ var dc7;
+ var dc8;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var dx7;
+ var dx8;
+ var dy0;
+ var dy1;
+ var dy2;
+ var dy3;
+ var dy4;
+ var dy5;
+ var dy6;
+ var dy7;
+ var dy8;
+ var do0;
+ var do1;
+ var do2;
+ var do3;
+ var do4;
+ var do5;
+ var do6;
+ var do7;
+ var do8;
+ var oc1;
+ var oc2;
+ var oc3;
+ var oc4;
+ var oc5;
+ var oc6;
+ var oc7;
+ var oc8;
+ var ox1;
+ var ox2;
+ var ox3;
+ var ox4;
+ var ox5;
+ var ox6;
+ var ox7;
+ var ox8;
+ var oy1;
+ var oy2;
+ var oy3;
+ var oy4;
+ var oy5;
+ var oy6;
+ var oy7;
+ var oy8;
+ var oo1;
+ var oo2;
+ var oo3;
+ var oo4;
+ var oo5;
+ var oo6;
+ var oo7;
+ var oo8;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var s4;
+ var s5;
+ var s6;
+ var s7;
+ var s8;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var oc;
+ var ox;
+ var oy;
+ var oo;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+ var i7;
+ var i8;
+ var j0;
+ var j1;
+ var j2;
+ var j3;
+ var j4;
+ var j5;
+ var j6;
+ var j7;
+ var j8;
+ var o;
+
+ // Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( condition.shape, condition.strides, x.strides, y.strides, out.strides );
+
+ // Strides output as follows: sx, sy, sz, sw. According to arguments order respectively..
+ sh = o.sh;
+ sc = o.sx;
+ sx = o.sy;
+ sy = o.sz;
+ so = o.sw;
+
+ // Determine the block size:
+ bsize = blockSize( condition.dtype, x.dtype, y.dtype, out.dtype );
+
+ // Cache the indices of the first indexed elements in the respective ndarrays...
+ oc = condition.offset;
+ ox = x.offset;
+ oy = y.offset;
+ oo = out.offset;
+
+ // Cache references to the input and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.data;
+
+ // Cache offset increments for the innermost loop...
+ dc0 = sc[0];
+ dx0 = sx[0];
+ dy0 = sy[0];
+ do0 = so[0];
+
+ // Iterate over blocks...
+ for ( j8 = sh[8]; j8 > 0; ) {
+ if ( j8 < bsize ) {
+ s8 = j8;
+ j8 = 0;
+ } else {
+ s8 = bsize;
+ j8 -= bsize;
+ }
+ oc8 = oc + ( j8*sc[8] );
+ ox8 = ox + ( j8*sx[8] );
+ oy8 = oy + ( j8*sy[8] );
+ oo8 = oo + ( j8*so[8] );
+ for ( j7 = sh[7]; j7 > 0; ) {
+ if ( j7 < bsize ) {
+ s7 = j7;
+ j7 = 0;
+ } else {
+ s7 = bsize;
+ j7 -= bsize;
+ }
+ dc8 = sc[8] - ( s7*sc[7] );
+ dx8 = sx[8] - ( s7*sx[7] );
+ dy8 = sy[8] - ( s7*sy[7] );
+ do8 = so[8] - ( s7*so[7] );
+ oc7 = oc8 + ( j7*sc[7] );
+ ox7 = ox8 + ( j7*sx[7] );
+ oy7 = oy8 + ( j7*sy[7] );
+ oo7 = oo8 + ( j7*so[7] );
+ for ( j6 = sh[6]; j6 > 0; ) {
+ if ( j6 < bsize ) {
+ s6 = j6;
+ j6 = 0;
+ } else {
+ s6 = bsize;
+ j6 -= bsize;
+ }
+ dc7 = sc[7] - ( s6*sc[6] );
+ dx7 = sx[7] - ( s6*sx[6] );
+ dy7 = sy[7] - ( s6*sy[6] );
+ do7 = so[7] - ( s6*so[6] );
+ oc6 = oc7 + ( j6*sc[6] );
+ ox6 = ox7 + ( j6*sx[6] );
+ oy6 = oy7 + ( j6*sy[6] );
+ oo6 = oo7 + ( j6*so[6] );
+ for ( j5 = sh[5]; j5 > 0; ) {
+ if ( j5 < bsize ) {
+ s5 = j5;
+ j5 = 0;
+ } else {
+ s5 = bsize;
+ j5 -= bsize;
+ }
+ dc6 = sc[6] - ( s5*sc[5] );
+ dx6 = sx[6] - ( s5*sx[5] );
+ dy6 = sy[6] - ( s5*sy[5] );
+ do6 = so[6] - ( s5*so[5] );
+ oc5 = oc6 + ( j5*sc[5] );
+ ox5 = ox6 + ( j5*sx[5] );
+ oy5 = oy6 + ( j5*sy[5] );
+ oo5 = oo6 + ( j5*so[5] );
+ for ( j4 = sh[4]; j4 > 0; ) {
+ if ( j4 < bsize ) {
+ s4 = j4;
+ j4 = 0;
+ } else {
+ s4 = bsize;
+ j4 -= bsize;
+ }
+ dc5 = sc[5] - ( s4*sc[4] );
+ dx5 = sx[5] - ( s4*sx[4] );
+ dy5 = sy[5] - ( s4*sy[4] );
+ do5 = so[5] - ( s4*so[4] );
+ oc4 = oc5 + ( j4*sc[4] );
+ ox4 = ox5 + ( j4*sx[4] );
+ oy4 = oy5 + ( j4*sy[4] );
+ oo4 = oo5 + ( j4*so[4] );
+ for ( j3 = sh[3]; j3 > 0; ) {
+ if ( j3 < bsize ) {
+ s3 = j3;
+ j3 = 0;
+ } else {
+ s3 = bsize;
+ j3 -= bsize;
+ }
+ dc4 = sc[4] - ( s3*sc[3] );
+ dx4 = sx[4] - ( s3*sx[3] );
+ dy4 = sy[4] - ( s3*sy[3] );
+ do4 = so[4] - ( s3*so[3] );
+ oc3 = oc4 + ( j3*sc[3] );
+ ox3 = ox4 + ( j3*sx[3] );
+ oy3 = oy4 + ( j3*sy[3] );
+ oo3 = oo4 + ( j3*so[3] );
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ dc3 = sc[3] - ( s2*sc[2] );
+ dx3 = sx[3] - ( s2*sx[2] );
+ dy3 = sy[3] - ( s2*sy[2] );
+ do3 = so[3] - ( s2*so[2] );
+ oc2 = oc3 + ( j2*sc[2] );
+ ox2 = ox3 + ( j2*sx[2] );
+ oy2 = oy3 + ( j2*sy[2] );
+ oo2 = oo3 + ( j2*so[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dc2 = sc[2] - ( s1*sc[1] );
+ dx2 = sx[2] - ( s1*sx[1] );
+ dy2 = sy[2] - ( s1*sy[1] );
+ do2 = so[2] - ( s1*so[1] );
+ oc1 = oc2 + ( j1*sc[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ oy1 = oy2 + ( j1*sy[1] );
+ oo1 = oo2 + ( j1*so[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute index offsets for the first input and output ndarray elements in the current block...
+ ic = oc1 + ( j0*sc[0] );
+ ix = ox1 + ( j0*sx[0] );
+ iy = oy1 + ( j0*sy[0] );
+ io = oo1 + ( j0*so[0] );
+
+ // Compute loop offset increments...
+ dc1 = sc[1] - ( s0*sc[0] );
+ dx1 = sx[1] - ( s0*sx[0] );
+ dy1 = sy[1] - ( s0*sy[0] );
+ do1 = so[1] - ( s0*so[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++ ) {
+ obuf[ io ] = ( cbuf[ ic ] ) ? xbuf[ ix ] : ybuf[ iy ];
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+ ic += dc2;
+ ix += dx2;
+ iy += dy2;
+ io += do2;
+ }
+ ic += dc3;
+ ix += dx3;
+ iy += dy3;
+ io += do3;
+ }
+ ic += dc4;
+ ix += dx4;
+ iy += dy4;
+ io += do4;
+ }
+ ic += dc5;
+ ix += dx5;
+ iy += dy5;
+ io += do5;
+ }
+ ic += dc6;
+ ix += dx6;
+ iy += dy6;
+ io += do6;
+ }
+ ic += dc7;
+ ix += dx7;
+ iy += dy7;
+ io += do7;
+ }
+ ic += dc8;
+ ix += dx8;
+ iy += dy8;
+ io += do8;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = blockedwhere9d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/9d_blocked_accessors.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/9d_blocked_accessors.js
new file mode 100644
index 000000000000..93ccb9cafcc4
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/9d_blocked_accessors.js
@@ -0,0 +1,529 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/* eslint-disable max-depth, max-len, max-lines */
+
+'use strict';
+
+// MODULES //
+
+var loopOrder = require( '@stdlib/ndarray/base/ternary-loop-interchange-order' );
+var blockSize = require( '@stdlib/ndarray/base/ternary-tiling-block-size' );
+
+
+// MAIN //
+
+/**
+* Applies a condition to two nine-dimensional input ndarrays according to a nine-dimensional boolean ndarray and assigns results to elements in a nine-dimensional output ndarray via loop blocking.
+*
+* @private
+* @param {Object} condition - object containing boolean condition ndarray meta data
+* @param {*} condition.dtype - data type
+* @param {Collection} condition.data - data buffer
+* @param {NonNegativeIntegerArray} condition.shape - dimensions
+* @param {IntegerArray} condition.strides - stride lengths
+* @param {NonNegativeInteger} condition.offset - index offset
+* @param {string} condition.order - specifies whether `condition` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} condition.accessors - data buffer accessors
+* @param {Object} x - object containing first input ndarray meta data
+* @param {*} 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 {Object} y - object containing second input ndarray meta data
+* @param {*} y.dtype - data type
+* @param {Collection} y.data - data buffer
+* @param {NonNegativeIntegerArray} y.shape - dimensions
+* @param {IntegerArray} y.strides - stride lengths
+* @param {NonNegativeInteger} y.offset - index offset
+* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} y.accessors - data buffer accessors
+* @param {Object} out - object containing output ndarray meta data
+* @param {*} out.dtype - data type
+* @param {Collection} out.data - data buffer
+* @param {NonNegativeIntegerArray} out.shape - dimensions
+* @param {IntegerArray} out.strides - stride lengths
+* @param {NonNegativeInteger} out.offset - index offset
+* @param {string} out.order - specifies whether `out` is row-major (C-style) or column-major (Fortran-style)
+* @param {Array} out.accessors - data buffer accessors
+* @returns {void}
+*
+* @example
+* var Complex64Array = require( '@stdlib/array/complex64' );
+* var BooleanArray = require( '@stdlib/array/bool' )
+* var Complex64 = require( '@stdlib/complex/float32/ctor' );
+* var realf = require( '@stdlib/complex/float32/real' );
+* var imagf = require( '@stdlib/complex/float32/imag' );
+*
+* // Create data buffers:
+* var cbuf = new BooleanArray( [ 1, 0, 0, 1, 0, 1, 1, 0 ] );
+* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+* var ybuf = new Complex64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0 ] );
+* var obuf = new Complex64Array( 4 );
+*
+* // Define the shape of the input and output arrays:
+* var shape = [ 1, 1, 1, 1, 1, 1, 1, 2, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 4, 4, 4, 4, 4, 4, 4, 2, 1 ];
+* var sx = [ 4, 4, 4, 4, 4, 4, 4, 2, 1 ];
+* var sy = [ 4, 4, 4, 4, 4, 4, 4, 2, 1 ];
+* var so = [ 4, 4, 4, 4, 4, 4, 4, 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 0;
+* var ox = 0;
+* var oy = 0;
+* var oo = 0;
+*
+* // Define getters and setters:
+* function getter( buf, idx ) {
+* return buf.get( idx );
+* }
+*
+* function setter( buf, idx, value ) {
+* buf.set( value, idx );
+* }
+*
+* // Create the input and output ndarray-like objects:
+* var condition = {
+* 'dtype': 'bool',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var x = {
+* 'dtype': 'complex64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var y = {
+* 'dtype': 'complex64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+* var out = {
+* 'dtype': 'complex64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major',
+* 'accessors': [ getter, setter ]
+* };
+*
+* // Apply the condition:
+* blockedwhere9d( condition, x, y, out );
+*
+* var v = out.data.get( 0 );
+*
+* var re = realf( v );
+* // returns 1.0
+*
+* var im = imagf( v );
+* // returns 2.0
+*/
+function blockedwhere9d( condition, x, y, out ) { // eslint-disable-line max-statements, max-lines-per-function
+ var bsize;
+ var cbuf;
+ var xbuf;
+ var ybuf;
+ var obuf;
+ var getc;
+ var getx;
+ var gety;
+ var seto;
+ var dc0;
+ var dc1;
+ var dc2;
+ var dc3;
+ var dc4;
+ var dc5;
+ var dc6;
+ var dc7;
+ var dc8;
+ var dx0;
+ var dx1;
+ var dx2;
+ var dx3;
+ var dx4;
+ var dx5;
+ var dx6;
+ var dx7;
+ var dx8;
+ var dy0;
+ var dy1;
+ var dy2;
+ var dy3;
+ var dy4;
+ var dy5;
+ var dy6;
+ var dy7;
+ var dy8;
+ var do0;
+ var do1;
+ var do2;
+ var do3;
+ var do4;
+ var do5;
+ var do6;
+ var do7;
+ var do8;
+ var oc1;
+ var oc2;
+ var oc3;
+ var oc4;
+ var oc5;
+ var oc6;
+ var oc7;
+ var oc8;
+ var ox1;
+ var ox2;
+ var ox3;
+ var ox4;
+ var ox5;
+ var ox6;
+ var ox7;
+ var ox8;
+ var oy1;
+ var oy2;
+ var oy3;
+ var oy4;
+ var oy5;
+ var oy6;
+ var oy7;
+ var oy8;
+ var oo1;
+ var oo2;
+ var oo3;
+ var oo4;
+ var oo5;
+ var oo6;
+ var oo7;
+ var oo8;
+ var sh;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var s4;
+ var s5;
+ var s6;
+ var s7;
+ var s8;
+ var sc;
+ var sx;
+ var sy;
+ var so;
+ var oc;
+ var ox;
+ var oy;
+ var oo;
+ var ic;
+ var ix;
+ var iy;
+ var io;
+ var i0;
+ var i1;
+ var i2;
+ var i3;
+ var i4;
+ var i5;
+ var i6;
+ var i7;
+ var i8;
+ var j0;
+ var j1;
+ var j2;
+ var j3;
+ var j4;
+ var j5;
+ var j6;
+ var j7;
+ var j8;
+ var o;
+
+ // Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Resolve the loop interchange order:
+ o = loopOrder( condition.shape, condition.strides, x.strides, y.strides, out.strides );
+
+ // Strides output as follows: sx, sy, sz, sw. According to arguments order respectively..
+ sh = o.sh;
+ sc = o.sx;
+ sx = o.sy;
+ sy = o.sz;
+ so = o.sw;
+
+ // Determine the block size:
+ bsize = blockSize( condition.dtype, x.dtype, y.dtype, out.dtype );
+
+ // Cache the indices of the first indexed elements in the respective ndarrays...
+ oc = condition.offset;
+ ox = x.offset;
+ oy = y.offset;
+ oo = out.offset;
+
+ // Cache references to the input and output ndarray buffers...
+ cbuf = condition.data;
+ xbuf = x.data;
+ ybuf = y.data;
+ obuf = out.data;
+
+ // Cache offset increments for the innermost loop...
+ dc0 = sc[0];
+ dx0 = sx[0];
+ dy0 = sy[0];
+ do0 = so[0];
+
+ // Cache accessors:
+ getc = condition.accessors[0];
+ getx = x.accessors[0];
+ gety = y.accessors[0];
+ seto = out.accessors[1];
+
+ // Iterate over blocks...
+ for ( j8 = sh[8]; j8 > 0; ) {
+ if ( j8 < bsize ) {
+ s8 = j8;
+ j8 = 0;
+ } else {
+ s8 = bsize;
+ j8 -= bsize;
+ }
+ oc8 = oc + ( j8*sc[8] );
+ ox8 = ox + ( j8*sx[8] );
+ oy8 = oy + ( j8*sy[8] );
+ oo8 = oo + ( j8*so[8] );
+ for ( j7 = sh[7]; j7 > 0; ) {
+ if ( j7 < bsize ) {
+ s7 = j7;
+ j7 = 0;
+ } else {
+ s7 = bsize;
+ j7 -= bsize;
+ }
+ dc8 = sc[8] - ( s7*sc[7] );
+ dx8 = sx[8] - ( s7*sx[7] );
+ dy8 = sy[8] - ( s7*sy[7] );
+ do8 = so[8] - ( s7*so[7] );
+ oc7 = oc8 + ( j7*sc[7] );
+ ox7 = ox8 + ( j7*sx[7] );
+ oy7 = oy8 + ( j7*sy[7] );
+ oo7 = oo8 + ( j7*so[7] );
+ for ( j6 = sh[6]; j6 > 0; ) {
+ if ( j6 < bsize ) {
+ s6 = j6;
+ j6 = 0;
+ } else {
+ s6 = bsize;
+ j6 -= bsize;
+ }
+ dc7 = sc[7] - ( s6*sc[6] );
+ dx7 = sx[7] - ( s6*sx[6] );
+ dy7 = sy[7] - ( s6*sy[6] );
+ do7 = so[7] - ( s6*so[6] );
+ oc6 = oc7 + ( j6*sc[6] );
+ ox6 = ox7 + ( j6*sx[6] );
+ oy6 = oy7 + ( j6*sy[6] );
+ oo6 = oo7 + ( j6*so[6] );
+ for ( j5 = sh[5]; j5 > 0; ) {
+ if ( j5 < bsize ) {
+ s5 = j5;
+ j5 = 0;
+ } else {
+ s5 = bsize;
+ j5 -= bsize;
+ }
+ dc6 = sc[6] - ( s5*sc[5] );
+ dx6 = sx[6] - ( s5*sx[5] );
+ dy6 = sy[6] - ( s5*sy[5] );
+ do6 = so[6] - ( s5*so[5] );
+ oc5 = oc6 + ( j5*sc[5] );
+ ox5 = ox6 + ( j5*sx[5] );
+ oy5 = oy6 + ( j5*sy[5] );
+ oo5 = oo6 + ( j5*so[5] );
+ for ( j4 = sh[4]; j4 > 0; ) {
+ if ( j4 < bsize ) {
+ s4 = j4;
+ j4 = 0;
+ } else {
+ s4 = bsize;
+ j4 -= bsize;
+ }
+ dc5 = sc[5] - ( s4*sc[4] );
+ dx5 = sx[5] - ( s4*sx[4] );
+ dy5 = sy[5] - ( s4*sy[4] );
+ do5 = so[5] - ( s4*so[4] );
+ oc4 = oc5 + ( j4*sc[4] );
+ ox4 = ox5 + ( j4*sx[4] );
+ oy4 = oy5 + ( j4*sy[4] );
+ oo4 = oo5 + ( j4*so[4] );
+ for ( j3 = sh[3]; j3 > 0; ) {
+ if ( j3 < bsize ) {
+ s3 = j3;
+ j3 = 0;
+ } else {
+ s3 = bsize;
+ j3 -= bsize;
+ }
+ dc4 = sc[4] - ( s3*sc[3] );
+ dx4 = sx[4] - ( s3*sx[3] );
+ dy4 = sy[4] - ( s3*sy[3] );
+ do4 = so[4] - ( s3*so[3] );
+ oc3 = oc4 + ( j3*sc[3] );
+ ox3 = ox4 + ( j3*sx[3] );
+ oy3 = oy4 + ( j3*sy[3] );
+ oo3 = oo4 + ( j3*so[3] );
+ for ( j2 = sh[2]; j2 > 0; ) {
+ if ( j2 < bsize ) {
+ s2 = j2;
+ j2 = 0;
+ } else {
+ s2 = bsize;
+ j2 -= bsize;
+ }
+ dc3 = sc[3] - ( s2*sc[2] );
+ dx3 = sx[3] - ( s2*sx[2] );
+ dy3 = sy[3] - ( s2*sy[2] );
+ do3 = so[3] - ( s2*so[2] );
+ oc2 = oc3 + ( j2*sc[2] );
+ ox2 = ox3 + ( j2*sx[2] );
+ oy2 = oy3 + ( j2*sy[2] );
+ oo2 = oo3 + ( j2*so[2] );
+ for ( j1 = sh[1]; j1 > 0; ) {
+ if ( j1 < bsize ) {
+ s1 = j1;
+ j1 = 0;
+ } else {
+ s1 = bsize;
+ j1 -= bsize;
+ }
+ dc2 = sc[2] - ( s1*sc[1] );
+ dx2 = sx[2] - ( s1*sx[1] );
+ dy2 = sy[2] - ( s1*sy[1] );
+ do2 = so[2] - ( s1*so[1] );
+ oc1 = oc2 + ( j1*sc[1] );
+ ox1 = ox2 + ( j1*sx[1] );
+ oy1 = oy2 + ( j1*sy[1] );
+ oo1 = oo2 + ( j1*so[1] );
+ for ( j0 = sh[0]; j0 > 0; ) {
+ if ( j0 < bsize ) {
+ s0 = j0;
+ j0 = 0;
+ } else {
+ s0 = bsize;
+ j0 -= bsize;
+ }
+ // Compute index offsets for the first input and output ndarray elements in the current block...
+ ic = oc1 + ( j0*sc[0] );
+ ix = ox1 + ( j0*sx[0] );
+ iy = oy1 + ( j0*sy[0] );
+ io = oo1 + ( j0*so[0] );
+
+ // Compute loop offset increments...
+ dc1 = sc[1] - ( s0*sc[0] );
+ dx1 = sx[1] - ( s0*sx[0] );
+ dy1 = sy[1] - ( s0*sy[0] );
+ do1 = so[1] - ( s0*so[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++ ) {
+ seto( obuf, io, ( getc( cbuf, ic ) ) ? getx( xbuf, ix ) : gety( ybuf, iy ) );
+ ic += dc0;
+ ix += dx0;
+ iy += dy0;
+ io += do0;
+ }
+ ic += dc1;
+ ix += dx1;
+ iy += dy1;
+ io += do1;
+ }
+ ic += dc2;
+ ix += dx2;
+ iy += dy2;
+ io += do2;
+ }
+ ic += dc3;
+ ix += dx3;
+ iy += dy3;
+ io += do3;
+ }
+ ic += dc4;
+ ix += dx4;
+ iy += dy4;
+ io += do4;
+ }
+ ic += dc5;
+ ix += dx5;
+ iy += dy5;
+ io += do5;
+ }
+ ic += dc6;
+ ix += dx6;
+ iy += dy6;
+ io += do6;
+ }
+ ic += dc7;
+ ix += dx7;
+ iy += dy7;
+ io += do7;
+ }
+ ic += dc8;
+ ix += dx8;
+ iy += dy8;
+ io += do8;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = blockedwhere9d;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/index.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/index.js
new file mode 100644
index 000000000000..986d7ebdc4f8
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/index.js
@@ -0,0 +1,100 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+/**
+* Apply a condition to elements in two input ndarrays and assign results to elements in an output ndarray.
+*
+* @module @stdlib/ndarray/base/where
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+* var Uint8Array = require( '@stdlib/array/uint8' );
+* var where = require( '@stdlib/ndarray/base/where' );
+*
+* // Create data buffers:
+* var cbuf = new Uint8Array( [ 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1 ] );
+* 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 ] );
+* var ybuf = 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 ] );
+* var obuf = new Float64Array( 6 );
+*
+* // Define the shape of the input and output arrays:
+* var shape = [ 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sc = [ 4, 4, 1 ];
+* var sx = [ 4, 4, 1 ];
+* var sy = [ 4, 4, 1 ];
+* var so = [ 2, 2, 1 ];
+*
+* // Define the index offsets:
+* var oc = 1;
+* var ox = 1;
+* var oy = 1;
+* var oo = 0;
+*
+* // Create the input and output ndarray-like objects:
+* var condition = {
+* 'dtype': 'uint8',
+* 'data': cbuf,
+* 'shape': shape,
+* 'strides': sc,
+* 'offset': oc,
+* 'order': 'row-major'
+* };
+* var x = {
+* 'dtype': 'float64',
+* 'data': xbuf,
+* 'shape': shape,
+* 'strides': sx,
+* 'offset': ox,
+* 'order': 'row-major'
+* };
+* var y = {
+* 'dtype': 'float64',
+* 'data': ybuf,
+* 'shape': shape,
+* 'strides': sy,
+* 'offset': oy,
+* 'order': 'row-major'
+* };
+* var out = {
+* 'dtype': 'float64',
+* 'data': obuf,
+* 'shape': shape,
+* 'strides': so,
+* 'offset': oo,
+* 'order': 'row-major'
+* };
+*
+* // Apply the condition:
+* where( [ condition, x, y, out ] );
+*
+* console.log( out.data );
+* // => [ -2.0, -3.0, 6.0, 7.0, -10.0, -11.0 ]
+*/
+
+// MODULES //
+
+var main = require( './main.js' );
+
+
+// EXPORTS //
+
+module.exports = main;
diff --git a/lib/node_modules/@stdlib/ndarray/base/where/lib/main.js b/lib/node_modules/@stdlib/ndarray/base/where/lib/main.js
new file mode 100644
index 000000000000..b51583c4cc38
--- /dev/null
+++ b/lib/node_modules/@stdlib/ndarray/base/where/lib/main.js
@@ -0,0 +1,534 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/* eslint-disable max-lines */
+
+'use strict';
+
+// MODULES //
+
+var format = require( '@stdlib/string/format' );
+var isComplexDataType = require( '@stdlib/ndarray/base/assert/is-complex-floating-point-data-type' );
+var isRealDataType = require( '@stdlib/ndarray/base/assert/is-real-data-type' );
+var isComplexArray = require( '@stdlib/array/base/assert/is-complex-typed-array' );
+var isBooleanArray = require( '@stdlib/array/base/assert/is-booleanarray' );
+var isUint8Array = require( '@stdlib/assert/is-uint8array' );
+var iterationOrder = require( '@stdlib/ndarray/base/iteration-order' );
+var strides2order = require( '@stdlib/ndarray/base/strides2order' );
+var anyIsEntryIn = require( '@stdlib/array/base/any-is-entry-in' );
+var castReturn = require( '@stdlib/complex/base/cast-return' );
+var complexCtors = require( '@stdlib/complex/ctors' );
+var minmaxViewBufferIndex = require( '@stdlib/ndarray/base/minmax-view-buffer-index' );
+var ndarray2object = require( '@stdlib/ndarray/base/ndarraylike2object' );
+var reinterpretComplex = require( '@stdlib/strided/base/reinterpret-complex' );
+var reinterpretBoolean = require( '@stdlib/strided/base/reinterpret-boolean' );
+var gscal = require( '@stdlib/blas/base/gscal' );
+var blockedaccessorwhere2d = require( './2d_blocked_accessors.js' );
+var blockedaccessorwhere3d = require( './3d_blocked_accessors.js' );
+var blockedaccessorwhere4d = require( './4d_blocked_accessors.js' );
+var blockedaccessorwhere5d = require( './5d_blocked_accessors.js' );
+var blockedaccessorwhere6d = require( './6d_blocked_accessors.js' );
+var blockedaccessorwhere7d = require( './7d_blocked_accessors.js' );
+var blockedaccessorwhere8d = require( './8d_blocked_accessors.js' );
+var blockedaccessorwhere9d = require( './9d_blocked_accessors.js' );
+var blockedaccessorwhere10d = require( './10d_blocked_accessors.js' );
+var blockedwhere2d = require( './2d_blocked.js' );
+var blockedwhere3d = require( './3d_blocked.js' );
+var blockedwhere4d = require( './4d_blocked.js' );
+var blockedwhere5d = require( './5d_blocked.js' );
+var blockedwhere6d = require( './6d_blocked.js' );
+var blockedwhere7d = require( './7d_blocked.js' );
+var blockedwhere8d = require( './8d_blocked.js' );
+var blockedwhere9d = require( './9d_blocked.js' );
+var blockedwhere10d = require( './10d_blocked.js' );
+var accessorwhere0d = require( './0d_accessors.js' );
+var accessorwhere1d = require( './1d_accessors.js' );
+var accessorwhere2d = require( './2d_accessors.js' );
+var accessorwhere3d = require( './3d_accessors.js' );
+var accessorwhere4d = require( './4d_accessors.js' );
+var accessorwhere5d = require( './5d_accessors.js' );
+var accessorwhere6d = require( './6d_accessors.js' );
+var accessorwhere7d = require( './7d_accessors.js' );
+var accessorwhere8d = require( './8d_accessors.js' );
+var accessorwhere9d = require( './9d_accessors.js' );
+var accessorwhere10d = require( './10d_accessors.js' );
+var accessorwherend = require( './nd_accessors.js' );
+var where0d = require( './0d.js' );
+var where1d = require( './1d.js' );
+var where2d = require( './2d.js' );
+var where3d = require( './3d.js' );
+var where4d = require( './4d.js' );
+var where5d = require( './5d.js' );
+var where6d = require( './6d.js' );
+var where7d = require( './7d.js' );
+var where8d = require( './8d.js' );
+var where9d = require( './9d.js' );
+var where10d = require( './10d.js' );
+var wherend = require( './nd.js' );
+
+
+// VARIABLES //
+
+var WHERE = [
+ where0d,
+ where1d,
+ where2d,
+ where3d,
+ where4d,
+ where5d,
+ where6d,
+ where7d,
+ where8d,
+ where9d,
+ where10d
+];
+var ACCESSOR_WHERE = [
+ accessorwhere0d,
+ accessorwhere1d,
+ accessorwhere2d,
+ accessorwhere3d,
+ accessorwhere4d,
+ accessorwhere5d,
+ accessorwhere6d,
+ accessorwhere7d,
+ accessorwhere8d,
+ accessorwhere9d,
+ accessorwhere10d
+];
+var BLOCKED_WHERE = [
+ blockedwhere2d, // 0
+ blockedwhere3d,
+ blockedwhere4d,
+ blockedwhere5d,
+ blockedwhere6d,
+ blockedwhere7d,
+ blockedwhere8d,
+ blockedwhere9d,
+ blockedwhere10d // 8
+];
+var BLOCKED_ACCESSOR_WHERE = [
+ blockedaccessorwhere2d, // 0
+ blockedaccessorwhere3d,
+ blockedaccessorwhere4d,
+ blockedaccessorwhere5d,
+ blockedaccessorwhere6d,
+ blockedaccessorwhere7d,
+ blockedaccessorwhere8d,
+ blockedaccessorwhere9d,
+ blockedaccessorwhere10d // 8
+];
+var MAX_DIMS = WHERE.length - 1;
+
+// TODO: consider adding a package utility for mapping a complex dtype to its complementary real-valued counterpart
+var COMPLEX_TO_REAL = { // WARNING: this table needs to be manually updated if we add support for additional complex number dtypes
+ 'complex128': 'float64',
+ 'complex64': 'float32',
+ 'complex32': 'float16'
+};
+
+
+// FUNCTIONS //
+
+/**
+* Returns a boolean indicating if at least one ndarray data buffer implements the accessor protocol.
+*
+* @private
+* @param {ndarrayLike} x - first ndarray
+* @param {ndarrayLike} y - second ndarray
+* @param {ndarrayLike} z - third ndarray
+* @param {ndarrayLike} w - fourth ndarray
+* @returns {boolean} boolean indicating whether an ndarray data buffer implements the accessor protocol
+*/
+function hasAccessors( x, y, z, w ) {
+ return anyIsEntryIn( [ x, y, z, w ], 'accessorProtocol', true );
+}
+
+/**
+* Converts a boolean ndarray to an 8-bit unsigned integer ndarray.
+*
+* ## Notes
+*
+* - The function mutates the input ndarray object.
+*
+* @private
+* @param {Object} x - input ndarray object
+* @returns {Object} output ndarray object
+*/
+function boolean2uint8( x ) {
+ x.data = reinterpretBoolean( x.data, 0 );
+ x.accessorProtocol = false;
+ return x;
+}
+
+/**
+* Converts a complex-valued floating-point ndarray to a real-valued floating-point ndarray.
+*
+* ## Notes
+*
+* - The function mutates the input ndarray object.
+*
+* @private
+* @param {Object} x - input ndarray object
+* @returns {Object} output ndarray object
+*/
+function complex2real( x ) {
+ var ndims = x.shape.length;
+
+ x.data = reinterpretComplex( x.data, 0 );
+ x.accessorProtocol = false;
+ x.dtype = COMPLEX_TO_REAL[ String( x.dtype ) ];
+ x.strides = gscal( ndims, 2, x.strides, 1 );
+ x.offset *= 2;
+
+ // Append a trailing dimension where each element is the real and imaginary component for a corresponding element in the original input ndarray (note: this means that a two-dimensional complex-valued ndarray becomes a three-dimensional real-valued ndarray; while this does entail additional loop overhead, it is still significantly faster than sending complex-valued ndarrays down the accessor path):
+ x.shape.push( 2 ); // real and imaginary components
+
+ // Augment the strides, where we assume that real and imaginary components are adjacent in memory...
+ if ( ndims === 0 ) {
+ x.strides[ 0 ] = 1;
+ } else {
+ x.strides.push( 1 );
+ }
+ return x;
+}
+
+
+// MAIN //
+
+/**
+* Applies a condition to elements in two input ndarrays and assigns results to elements in an output ndarray.
+*
+* ## Notes
+*
+* - 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).
+*
+* @param {ArrayLikeObject