diff --git a/lib/node_modules/@stdlib/stats/mskrange/README.md b/lib/node_modules/@stdlib/stats/mskrange/README.md
new file mode 100644
index 000000000000..0c82b3aff97a
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/mskrange/README.md
@@ -0,0 +1,256 @@
+
+
+# mskrange
+
+> Compute the [range][range] along one or more [ndarray][@stdlib/ndarray/ctor] dimensions according to a mask.
+
+
+
+The [**range**][range] is defined as the difference between the maximum and minimum values.
+
+
+
+
+
+
+
+## Usage
+
+```javascript
+var mskrange = require( '@stdlib/stats/mskrange' );
+```
+
+#### mskrange( x, mask\[, options] )
+
+Computes the [range][range] along one or more [ndarray][@stdlib/ndarray/ctor] dimensions according to a mask.
+
+```javascript
+var Float64Array = require( '@stdlib/array/float64' );
+var Uint8Array = require( '@stdlib/array/uint8' );
+var array = require( '@stdlib/ndarray/array' );
+
+var x = array( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ), {
+ 'shape': [ 3, 2 ]
+});
+var mask = array( new Uint8Array( [ 0, 0, 1, 0, 0, 1 ] ), {
+ 'shape': [ 3, 2 ]
+});
+
+var y = mskrange( x, mask );
+// returns [ 4.0 ]
+```
+
+The function has the following parameters:
+
+- **x**: input [ndarray][@stdlib/ndarray/ctor]. Must have a real-valued or "generic" [data type][@stdlib/ndarray/dtypes].
+- **mask**: mask [ndarray][@stdlib/ndarray/ctor]. Must have a data type that can be interpreted as a mask.
+- **options**: function options (_optional_).
+
+The function accepts the following options:
+
+- **dims**: list of dimensions over which to perform a reduction. If not provided, the function performs a reduction over all elements in a provided input [ndarray][@stdlib/ndarray/ctor].
+- **dtype**: output ndarray [data type][@stdlib/ndarray/dtypes]. Must be a real-valued or "generic" [data type][@stdlib/ndarray/dtypes].
+- **keepdims**: boolean indicating whether the reduced dimensions should be included in the returned [ndarray][@stdlib/ndarray/ctor] as singleton dimensions. Default: `false`.
+
+By default, the function performs a reduction over all elements in a provided input [ndarray][@stdlib/ndarray/ctor]. To perform a reduction over specific dimensions, provide a `dims` option.
+
+```javascript
+var Float64Array = require( '@stdlib/array/float64' );
+var Uint8Array = require( '@stdlib/array/uint8' );
+var array = require( '@stdlib/ndarray/array' );
+
+var x = array( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ), {
+ 'shape': [ 3, 2 ],
+ 'order': 'row-major'
+});
+var mask = array( new Uint8Array( [ 0, 0, 1, 1, 0, 0 ] ), {
+ 'shape': [ 3, 2 ],
+ 'order': 'row-major'
+});
+
+var y = mskrange( x, mask, {
+ 'dims': [ 0 ]
+});
+// returns [ 4.0, 4.0 ]
+```
+
+By default, the function excludes reduced dimensions from the output [ndarray][@stdlib/ndarray/ctor]. To include the reduced dimensions as singleton dimensions, set the `keepdims` option to `true`.
+
+```javascript
+var Float64Array = require( '@stdlib/array/float64' );
+var Uint8Array = require( '@stdlib/array/uint8' );
+var array = require( '@stdlib/ndarray/array' );
+
+var x = array( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ), {
+ 'shape': [ 3, 2 ],
+ 'order': 'row-major'
+});
+var mask = array( new Uint8Array( [ 0, 0, 1, 1, 0, 0 ] ), {
+ 'shape': [ 3, 2 ],
+ 'order': 'row-major'
+});
+
+var y = mskrange( x, mask, {
+ 'dims': [ 0 ],
+ 'keepdims': true
+});
+// returns [ [ 4.0, 4.0 ] ]
+```
+
+By default, the function returns an [ndarray][@stdlib/ndarray/ctor] having a [data type][@stdlib/ndarray/dtypes] determined by the function's output data type [policy][@stdlib/ndarray/output-dtype-policies]. To override the default behavior, set the `dtype` option.
+
+```javascript
+var Float64Array = require( '@stdlib/array/float64' );
+var Uint8Array = require( '@stdlib/array/uint8' );
+var getDType = require( '@stdlib/ndarray/dtype' );
+var array = require( '@stdlib/ndarray/array' );
+
+var x = array( new Float64Array( [ 1.0, 2.0, 3.0 ] ), {
+ 'dtype': 'generic'
+});
+var mask = array( new Uint8Array( [ 0, 0, 0 ] ), {
+ 'dtype': 'uint8'
+});
+
+var y = mskrange( x, mask, {
+ 'dtype': 'float64'
+});
+// returns [ 2.0 ]
+
+var dt = String( getDType( y ) );
+// returns 'float64'
+```
+
+#### mskrange.assign( x, mask, out\[, options] )
+
+Computes the [range][range] along one or more [ndarray][@stdlib/ndarray/ctor] dimensions according to a mask and assigns results to a provided output [ndarray][@stdlib/ndarray/ctor].
+
+```javascript
+var Float64Array = require( '@stdlib/array/float64' );
+var Uint8Array = require( '@stdlib/array/uint8' );
+var array = require( '@stdlib/ndarray/array' );
+var zeros = require( '@stdlib/ndarray/zeros' );
+
+var x = array( new Float64Array( [ 1.0, 2.0, 3.0 ] ) );
+var mask = array( new Uint8Array( [ 0, 0, 0 ] ) );
+var y = zeros( [] );
+
+var out = mskrange.assign( x, mask, y );
+// returns [ 2.0 ]
+
+var bool = ( out === y );
+// returns true
+```
+
+The method has the following parameters:
+
+- **x**: input [ndarray][@stdlib/ndarray/ctor]. Must have a real-valued or "generic" [data type][@stdlib/ndarray/dtypes].
+- **mask**: mask [ndarray][@stdlib/ndarray/ctor]. Must have a data type that can be interpreted as a mask.
+- **out**: output [ndarray][@stdlib/ndarray/ctor].
+- **options**: function options (_optional_).
+
+The method accepts the following options:
+
+- **dims**: list of dimensions over which to perform a reduction. If not provided, the function performs a reduction over all elements in a provided input [ndarray][@stdlib/ndarray/ctor].
+
+
+
+
+
+
+
+## Notes
+
+- Setting the `keepdims` option to `true` can be useful when wanting to ensure that the output [ndarray][@stdlib/ndarray/ctor] is [broadcast-compatible][@stdlib/ndarray/base/broadcast-shapes] with ndarrays having the same shape as the input [ndarray][@stdlib/ndarray/ctor].
+- The output data type [policy][@stdlib/ndarray/output-dtype-policies] only applies to the main function and specifies that, by default, the function must return an [ndarray][@stdlib/ndarray/ctor] having the same [data type][@stdlib/ndarray/dtypes] as the input [ndarray][@stdlib/ndarray/ctor] (or a promoted data type if the input data types differ). For the `assign` method, the output [ndarray][@stdlib/ndarray/ctor] is allowed to have any supported output [data type][@stdlib/ndarray/dtypes].
+
+
+
+
+
+
+
+## Examples
+
+
+
+```javascript
+var uniform = require( '@stdlib/random/uniform' );
+var bernoulli = require( '@stdlib/random/bernoulli' );
+var getDType = require( '@stdlib/ndarray/dtype' );
+var ndarray2array = require( '@stdlib/ndarray/to-array' );
+var mskrange = require( '@stdlib/stats/mskrange' );
+
+// Generate an array of random numbers:
+var x = uniform( [ 5, 5 ], 0.0, 20.0 );
+console.log( 'x:' );
+console.log( ndarray2array( x ) );
+
+// Generate a random mask:
+var mask = bernoulli( [ 5, 5 ], 0.2, {
+ 'dtype': 'uint8'
+});
+console.log( 'mask:' );
+console.log( ndarray2array( mask ) );
+
+// Perform a reduction:
+var y = mskrange( x, mask, {
+ 'dims': [ 0 ]
+});
+
+// Resolve the output array data type:
+var dt = getDType( y );
+console.log( 'Output dtype: %s', dt );
+
+// Print the results:
+console.log( 'y:' );
+console.log( ndarray2array( y ) );
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+[@stdlib/ndarray/ctor]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/ctor
+
+[@stdlib/ndarray/dtypes]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/dtypes
+
+[@stdlib/ndarray/output-dtype-policies]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/output-dtype-policies
+
+[@stdlib/ndarray/base/broadcast-shapes]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/broadcast-shapes
+
+[range]: https://en.wikipedia.org/wiki/Range_%28statistics%29
+
+
+
+
diff --git a/lib/node_modules/@stdlib/stats/mskrange/benchmark/benchmark.assign.js b/lib/node_modules/@stdlib/stats/mskrange/benchmark/benchmark.assign.js
new file mode 100644
index 000000000000..2b052c1726d2
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/mskrange/benchmark/benchmark.assign.js
@@ -0,0 +1,119 @@
+/**
+* @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 isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var uniform = require( '@stdlib/random/array/uniform' );
+var format = require( '@stdlib/string/format' );
+var bernoulli = require( '@stdlib/random/array/bernoulli' );
+var zeros = require( '@stdlib/array/zeros' );
+var ndarray = require( '@stdlib/ndarray/base/ctor' );
+var pkg = require( './../package.json' ).name;
+var mskrange = require( './../lib' );
+
+
+// VARIABLES //
+
+var options = {
+ 'dtype': 'float64'
+};
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - array length
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len ) {
+ var mask;
+ var out;
+ var x;
+
+ x = uniform( len, -50.0, 50.0, options );
+ x = new ndarray( options.dtype, x, [ len ], [ 1 ], 0, 'row-major' );
+
+ mask = bernoulli( len, 0.2, {
+ 'dtype': 'uint8'
+ });
+ mask = new ndarray( 'uint8', mask, [ len ], [ 1 ], 0, 'row-major' );
+
+ out = new ndarray( options.dtype, zeros( 1, options.dtype ), [], [ 0 ], 0, 'row-major' );
+
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var o;
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ o = mskrange.assign( x, mask, out );
+ if ( typeof o !== 'object' ) {
+ b.fail( 'should return an ndarray' );
+ }
+ }
+ b.toc();
+ if ( isnan( o.get() ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+ }
+}
+
+
+// MAIN //
+
+/**
+* Main execution sequence.
+*
+* @private
+*/
+function main() {
+ var len;
+ var min;
+ var max;
+ var f;
+ var i;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+ f = createBenchmark( len );
+ bench( format( '%s:assign:dtype=%s,len=%d', pkg, options.dtype, len ), f );
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/stats/mskrange/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/mskrange/benchmark/benchmark.js
new file mode 100644
index 000000000000..d055072ec848
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/mskrange/benchmark/benchmark.js
@@ -0,0 +1,112 @@
+/**
+* @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 isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var uniform = require( '@stdlib/random/array/uniform' );
+var format = require( '@stdlib/string/format' );
+var bernoulli = require( '@stdlib/random/array/bernoulli' );
+var ndarray = require( '@stdlib/ndarray/base/ctor' );
+var pkg = require( './../package.json' ).name;
+var mskrange = require( './../lib' );
+
+
+// VARIABLES //
+
+var options = {
+ 'dtype': 'float64'
+};
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - array length
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len ) {
+ var mask = bernoulli( len, 0.2, {
+ 'dtype': 'uint8'
+ });
+ var x = uniform( len, -50.0, 50.0, options );
+
+ x = new ndarray( options.dtype, x, [ len ], [ 1 ], 0, 'row-major' );
+ mask = new ndarray( 'uint8', mask, [ len ], [ 1 ], 0, 'row-major' );
+
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var o;
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ o = mskrange( x, mask );
+ if ( typeof o !== 'object' ) {
+ b.fail( 'should return an ndarray' );
+ }
+ }
+ b.toc();
+ if ( isnan( o.get() ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+ }
+}
+
+
+// MAIN //
+
+/**
+* Main execution sequence.
+*
+* @private
+*/
+function main() {
+ var len;
+ var min;
+ var max;
+ var f;
+ var i;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+ f = createBenchmark( len );
+ bench( format( '%s:dtype=%s,len=%d', pkg, options.dtype, len ), f );
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/stats/mskrange/docs/repl.txt b/lib/node_modules/@stdlib/stats/mskrange/docs/repl.txt
new file mode 100644
index 000000000000..d7fe9669ca18
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/mskrange/docs/repl.txt
@@ -0,0 +1,81 @@
+
+{{alias}}( x, mask[, options] )
+ Computes the range along one or more ndarray dimensions according to a mask.
+
+ Parameters
+ ----------
+ x: ndarray
+ Input array. Must have a real-valued or "generic" data type.
+
+ mask: ndarray
+ Mask array. Must have a data type that can be interpreted as a mask.
+
+ options: Object (optional)
+ Function options.
+
+ options.dtype: string|DataType (optional)
+ Output array data type. Must be a real-valued or "generic" data type.
+
+ options.dims: Array (optional)
+ List of dimensions over which to perform a reduction. If not provided,
+ the function performs a reduction over all elements in a provided input
+ ndarray.
+
+ options.keepdims: boolean (optional)
+ Boolean indicating whether the reduced dimensions should be included in
+ the returned ndarray as singleton dimensions. Default: false.
+
+ Returns
+ -------
+ out: ndarray
+ Output array.
+
+ Examples
+ --------
+ > var x = {{alias:@stdlib/ndarray/array}}( [ -1.0, 2.0, -3.0, -4.0 ] );
+ > var mask = {{alias:@stdlib/ndarray/array}}( [ 0, 0, 1, 0 ] );
+ > var y = {{alias}}( x, mask )
+ [ 6.0 ]
+
+
+{{alias}}.assign( x, mask, out[, options] )
+ Computes the range along one or more ndarray dimensions according to a mask
+ and assigns results to a provided output ndarray.
+
+ Parameters
+ ----------
+ x: ndarray
+ Input array. Must have a real-valued or "generic" data type.
+
+ mask: ndarray
+ Mask array. Must have a data type that can be interpreted as a mask.
+
+ out: ndarray
+ Output array.
+
+ options: Object (optional)
+ Function options.
+
+ options.dims: Array (optional)
+ List of dimensions over which to perform a reduction. If not provided,
+ the function performs a reduction over all elements in a provided input
+ ndarray.
+
+ Returns
+ -------
+ out: ndarray
+ Output array.
+
+ Examples
+ --------
+ > var x = {{alias:@stdlib/ndarray/array}}( [ -1.0, 2.0, -3.0, -4.0 ] );
+ > var mask = {{alias:@stdlib/ndarray/array}}( [ 0, 0, 1, 0 ] );
+ > var out = {{alias:@stdlib/ndarray/zeros}}( [] );
+ > var y = {{alias}}.assign( x, mask, out )
+ [ 6.0 ]
+ > var bool = ( out === y )
+ true
+
+ See Also
+ --------
+
diff --git a/lib/node_modules/@stdlib/stats/mskrange/docs/types/index.d.ts b/lib/node_modules/@stdlib/stats/mskrange/docs/types/index.d.ts
new file mode 100644
index 000000000000..5bd7023e4830
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/mskrange/docs/types/index.d.ts
@@ -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.
+*/
+
+// TypeScript Version: 4.1
+
+///
+
+import { ArrayLike } from '@stdlib/types/array';
+import { RealAndGenericDataType as DataType, typedndarray } from '@stdlib/types/ndarray';
+
+/**
+* Input array.
+*/
+type InputArray = typedndarray;
+
+/**
+* Output array.
+*/
+type OutputArray = typedndarray;
+
+/**
+* Interface defining "base" options.
+*/
+interface BaseOptions {
+ /**
+ * List of dimensions over which to perform a reduction.
+ */
+ dims?: ArrayLike;
+}
+
+/**
+* Interface defining options.
+*/
+interface Options extends BaseOptions {
+ /**
+ * Output array data type.
+ */
+ dtype?: DataType;
+
+ /**
+ * Boolean indicating whether the reduced dimensions should be included in the returned array as singleton dimensions. Default: `false`.
+ */
+ keepdims?: boolean;
+}
+
+/**
+* Interface for performing a reduction on two ndarrays.
+*/
+interface Binary {
+ /**
+ * Computes the range along one or more ndarray dimensions according to a mask.
+ *
+ * @param x - input ndarray
+ * @param mask - mask ndarray
+ * @param options - function options
+ * @returns output ndarray
+ *
+ * @example
+ * var Float64Array = require( '@stdlib/array/float64' );
+ * var Uint8Array = require( '@stdlib/array/uint8' );
+ * var array = require( '@stdlib/ndarray/array' );
+ *
+ * var x = array( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ), {
+ * 'shape': [ 3, 2 ]
+ * });
+ * var mask = array( new Uint8Array( [ 0, 0, 1, 0, 0, 1 ] ), {
+ * 'shape': [ 3, 2 ]
+ * });
+ *
+ * var y = mskrange( x, mask );
+ * // returns [ 4.0 ]
+ */
+ ( x: InputArray, mask: InputArray, options?: Options ): OutputArray;
+
+ /**
+ * Computes the range along one or more ndarray dimensions according to a mask and assigns results to a provided output ndarray.
+ *
+ * @param x - input ndarray
+ * @param mask - mask ndarray
+ * @param out - output ndarray
+ * @param options - function options
+ * @returns output ndarray
+ *
+ * @example
+ * var Float64Array = require( '@stdlib/array/float64' );
+ * var Uint8Array = require( '@stdlib/array/uint8' );
+ * var array = require( '@stdlib/ndarray/array' );
+ * var zeros = require( '@stdlib/ndarray/zeros' );
+ *
+ * var x = array( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ), {
+ * 'shape': [ 3, 2 ]
+ * });
+ * var mask = array( new Uint8Array( [ 0, 0, 1, 0, 0, 1 ] ), {
+ * 'shape': [ 3, 2 ]
+ * });
+ * var y = zeros( [] );
+ *
+ * var out = mskrange.assign( x, mask, y );
+ * // returns [ 4.0 ]
+ *
+ * var bool = ( out === y );
+ * // returns true
+ */
+ assign = OutputArray>( x: InputArray, mask: InputArray, out: U, options?: BaseOptions ): U;
+}
+
+/**
+* Computes the range along one or more ndarray dimensions according to a mask.
+*
+* @param x - input ndarray
+* @param mask - mask ndarray
+* @param options - function options
+* @returns output ndarray
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+* var Uint8Array = require( '@stdlib/array/uint8' );
+* var array = require( '@stdlib/ndarray/array' );
+*
+* var x = array( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ), {
+* 'shape': [ 3, 2 ]
+* });
+* var mask = array( new Uint8Array( [ 0, 0, 1, 0, 0, 1 ] ), {
+* 'shape': [ 3, 2 ]
+* });
+*
+* var y = mskrange( x, mask );
+* // returns [ 4.0 ]
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+* var Uint8Array = require( '@stdlib/array/uint8' );
+* var array = require( '@stdlib/ndarray/array' );
+* var zeros = require( '@stdlib/ndarray/zeros' );
+*
+* var x = array( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ), {
+* 'shape': [ 3, 2 ]
+* });
+* var mask = array( new Uint8Array( [ 0, 0, 1, 0, 0, 1 ] ), {
+* 'shape': [ 3, 2 ]
+* });
+* var y = zeros( [] );
+*
+* var out = mskrange.assign( x, mask, y );
+* // returns [ 4.0 ]
+*
+* var bool = ( out === y );
+* // returns true
+*/
+declare const mskrange: Binary;
+
+
+// EXPORTS //
+
+export = mskrange;
diff --git a/lib/node_modules/@stdlib/stats/mskrange/docs/types/test.ts b/lib/node_modules/@stdlib/stats/mskrange/docs/types/test.ts
new file mode 100644
index 000000000000..3bcc46355138
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/mskrange/docs/types/test.ts
@@ -0,0 +1,202 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/* eslint-disable space-in-parens */
+
+///
+
+import zeros = require( '@stdlib/ndarray/zeros' );
+import mskrange = require( './index' );
+
+
+// TESTS //
+
+// The function returns an ndarray...
+{
+ const x = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+ const mask = zeros( [ 2, 2 ], {
+ 'dtype': 'uint8'
+ });
+
+ mskrange( x, mask ); // $ExpectType OutputArray
+ mskrange( x, mask, {} ); // $ExpectType OutputArray
+}
+
+// The compiler throws an error if the function is provided a first argument which is not an ndarray...
+{
+ const mask = zeros( [ 2, 2 ], {
+ 'dtype': 'uint8'
+ });
+
+ mskrange( '5', mask ); // $ExpectError
+ mskrange( 5, mask ); // $ExpectError
+ mskrange( true, mask ); // $ExpectError
+ mskrange( false, mask ); // $ExpectError
+ mskrange( null, mask ); // $ExpectError
+ mskrange( void 0, mask ); // $ExpectError
+ mskrange( {}, mask ); // $ExpectError
+ mskrange( ( x: number ): number => x, mask ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a second argument which is not an ndarray...
+{
+ const x = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+
+ mskrange( x, '5' ); // $ExpectError
+ mskrange( x, 5 ); // $ExpectError
+ mskrange( x, true ); // $ExpectError
+ mskrange( x, false ); // $ExpectError
+ mskrange( x, null ); // $ExpectError
+ mskrange( x, void 0 ); // $ExpectError
+ mskrange( x, {} ); // $ExpectError
+ mskrange( x, ( x: number ): number => x ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a third argument which is not an object...
+{
+ const x = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+ const mask = zeros( [ 2, 2 ], {
+ 'dtype': 'uint8'
+ });
+
+ mskrange( x, mask, '5' ); // $ExpectError
+ mskrange( x, mask, true ); // $ExpectError
+ mskrange( x, mask, false ); // $ExpectError
+ mskrange( x, mask, null ); // $ExpectError
+ mskrange( x, mask, [] ); // $ExpectError
+ mskrange( x, mask, ( x: number ): number => x ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an invalid `dtype` option...
+{
+ const x = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+ const mask = zeros( [ 2, 2 ], {
+ 'dtype': 'uint8'
+ });
+
+ mskrange( x, mask, { 'dtype': '5' } ); // $ExpectError
+ mskrange( x, mask, { 'dtype': 5 } ); // $ExpectError
+ mskrange( x, mask, { 'dtype': true } ); // $ExpectError
+ mskrange( x, mask, { 'dtype': false } ); // $ExpectError
+ mskrange( x, mask, { 'dtype': null } ); // $ExpectError
+ mskrange( x, mask, { 'dtype': [] } ); // $ExpectError
+ mskrange( x, mask, { 'dtype': {} } ); // $ExpectError
+ mskrange( x, mask, { 'dtype': ( x: number ): number => x } ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an unsupported number of arguments...
+{
+ const x = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+ const mask = zeros( [ 2, 2 ], {
+ 'dtype': 'uint8'
+ });
+
+ mskrange(); // $ExpectError
+ mskrange( x ); // $ExpectError
+ mskrange( x, mask, {}, {} ); // $ExpectError
+}
+
+// Attached to the function is an `assign` method which returns an ndarray...
+{
+ const x = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+ const mask = zeros( [ 2, 2 ], {
+ 'dtype': 'uint8'
+ });
+
+ mskrange.assign( x, mask, x ); // $ExpectType float64ndarray
+ mskrange.assign( x, mask, x, {} ); // $ExpectType float64ndarray
+}
+
+// The compiler throws an error if the `assign` method is provided a first argument which is not an ndarray...
+{
+ const x = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+ const mask = zeros( [ 2, 2 ], {
+ 'dtype': 'uint8'
+ });
+
+ mskrange.assign( '5', mask, x ); // $ExpectError
+ mskrange.assign( 5, mask, x ); // $ExpectError
+ mskrange.assign( true, mask, x ); // $ExpectError
+ mskrange.assign( false, mask, x ); // $ExpectError
+ mskrange.assign( null, mask, x ); // $ExpectError
+ mskrange.assign( void 0, mask, x ); // $ExpectError
+ mskrange.assign( {}, mask, x ); // $ExpectError
+ mskrange.assign( ( x: number ): number => x, mask, x ); // $ExpectError
+}
+
+// The compiler throws an error if the `assign` method is provided a second argument which is not an ndarray...
+{
+ const x = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+
+ mskrange.assign( x, '5', x ); // $ExpectError
+ mskrange.assign( x, 5, x ); // $ExpectError
+ mskrange.assign( x, true, x ); // $ExpectError
+ mskrange.assign( x, false, x ); // $ExpectError
+ mskrange.assign( x, null, x ); // $ExpectError
+ mskrange.assign( x, void 0, x ); // $ExpectError
+ mskrange.assign( x, {}, x ); // $ExpectError
+}
+
+// The compiler throws an error if the `assign` method is provided a third argument which is not an ndarray...
+{
+ const x = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+ const mask = zeros( [ 2, 2 ], {
+ 'dtype': 'uint8'
+ });
+
+ mskrange.assign( x, mask, '5' ); // $ExpectError
+ mskrange.assign( x, mask, 5 ); // $ExpectError
+ mskrange.assign( x, mask, true ); // $ExpectError
+ mskrange.assign( x, mask, false ); // $ExpectError
+ mskrange.assign( x, mask, null ); // $ExpectError
+ mskrange.assign( x, mask, void 0 ); // $ExpectError
+ mskrange.assign( x, mask, {} ); // $ExpectError
+}
+
+// The compiler throws an error if the `assign` method is provided an unsupported number of arguments...
+{
+ const x = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+ const mask = zeros( [ 2, 2 ], {
+ 'dtype': 'uint8'
+ });
+
+ mskrange.assign(); // $ExpectError
+ mskrange.assign( x ); // $ExpectError
+ mskrange.assign( x, mask ); // $ExpectError
+ mskrange.assign( x, mask, x, {}, {} ); // $ExpectError
+}
diff --git a/lib/node_modules/@stdlib/stats/mskrange/examples/index.js b/lib/node_modules/@stdlib/stats/mskrange/examples/index.js
new file mode 100644
index 000000000000..b1cf95d0e8df
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/mskrange/examples/index.js
@@ -0,0 +1,50 @@
+/**
+* @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 uniform = require( '@stdlib/random/uniform' );
+var bernoulli = require( '@stdlib/random/bernoulli' );
+var getDType = require( '@stdlib/ndarray/dtype' );
+var ndarray2array = require( '@stdlib/ndarray/to-array' );
+var mskrange = require( './../lib' );
+
+// Generate an array of random numbers:
+var x = uniform( [ 5, 5 ], 0.0, 20.0 );
+console.log( 'x:' );
+console.log( ndarray2array( x ) );
+
+// Generate a random mask:
+var mask = bernoulli( [ 5, 5 ], 0.2, {
+ 'dtype': 'uint8'
+});
+console.log( 'mask:' );
+console.log( ndarray2array( mask ) );
+
+// Perform a reduction:
+var y = mskrange( x, mask, {
+ 'dims': [ 0 ]
+});
+
+// Resolve the output array data type:
+var dt = getDType( y );
+console.log( 'Output dtype: %s', dt );
+
+// Print the results:
+console.log( 'y:' );
+console.log( ndarray2array( y ) );
diff --git a/lib/node_modules/@stdlib/stats/mskrange/lib/index.js b/lib/node_modules/@stdlib/stats/mskrange/lib/index.js
new file mode 100644
index 000000000000..13a5ae73a61a
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/mskrange/lib/index.js
@@ -0,0 +1,51 @@
+/**
+* @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';
+
+/**
+* Compute the range along one or more ndarray dimensions according to a mask.
+*
+* @module @stdlib/stats/mskrange
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+* var Uint8Array = require( '@stdlib/array/uint8' );
+* var ndarray = require( '@stdlib/ndarray/ctor' );
+* var mskrange = require( '@stdlib/stats/mskrange' );
+*
+* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+* var x = new ndarray( 'float64', xbuf, [ 3, 2 ], [ 2, 1 ], 0, 'row-major' );
+*
+* var mbuf = new Uint8Array( [ 0, 0, 1, 0, 0, 1 ] );
+* var mask = new ndarray( 'uint8', mbuf, [ 3, 2 ], [ 2, 1 ], 0, 'row-major' );
+*
+* var out = mskrange( x, mask );
+* // returns [ 4.0 ]
+*/
+
+// MODULES //
+
+var main = require( './main.js' );
+
+
+// EXPORTS //
+
+module.exports = main;
+
+// exports: { "assign": "main.assign" }
diff --git a/lib/node_modules/@stdlib/stats/mskrange/lib/main.js b/lib/node_modules/@stdlib/stats/mskrange/lib/main.js
new file mode 100644
index 000000000000..bc9d3b010490
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/mskrange/lib/main.js
@@ -0,0 +1,109 @@
+/**
+* @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 dtypes = require( '@stdlib/ndarray/dtypes' );
+var gmskrange = require( '@stdlib/stats/base/ndarray/mskrange' );
+var dmskrange = require( '@stdlib/stats/base/ndarray/dmskrange' );
+var smskrange = require( '@stdlib/stats/base/ndarray/smskrange' );
+var factory = require( '@stdlib/ndarray/base/binary-reduce-strided1d-dispatch-factory' );
+
+
+// VARIABLES //
+
+var idtypes = dtypes( 'real_and_generic' );
+var odtypes = dtypes( 'real_and_generic' );
+var policies = {
+ 'output': 'promoted',
+ 'casting': 'none'
+};
+var table = {
+ 'types': [
+ 'float64',
+ 'uint8',
+ 'float32',
+ 'uint8'
+ ],
+ 'fcns': [
+ dmskrange,
+ smskrange
+ ],
+ 'default': gmskrange
+};
+
+
+// MAIN //
+
+/**
+* Computes the range along one or more ndarray dimensions according to a mask.
+*
+* @name mskrange
+* @type {Function}
+* @param {ndarray} x - input ndarray
+* @param {ndarray} mask - mask ndarray
+* @param {Options} [options] - function options
+* @param {IntegerArray} [options.dims] - list of dimensions over which to perform a reduction
+* @param {boolean} [options.keepdims=false] - boolean indicating whether the reduced dimensions should be included in the returned ndarray as singleton dimensions
+* @param {*} [options.dtype] - output ndarray data type
+* @throws {TypeError} first argument must be an ndarray-like object
+* @throws {TypeError} second argument must be an ndarray-like object
+* @throws {TypeError} options argument must be an object
+* @throws {RangeError} dimension indices must not exceed input ndarray bounds
+* @throws {RangeError} number of dimension indices must not exceed the number of input ndarray dimensions
+* @throws {Error} must provide valid options
+* @returns {ndarray} output ndarray
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+* var Uint8Array = require( '@stdlib/array/uint8' );
+* var ndarray = require( '@stdlib/ndarray/ctor' );
+*
+* // Create a data buffer:
+* var xbuf = new Float64Array( [ 0.0, 2.0, 3.0, 0.0, 0.0, 6.0, 7.0, 0.0, 0.0, 10.0, 11.0, 0.0 ] );
+*
+* // Define the shape of the input array:
+* var sh = [ 3, 1, 2 ];
+*
+* // Define the array strides:
+* var sx = [ 4, 4, 1 ];
+*
+* // Define the index offset:
+* var ox = 1;
+*
+* // Create an input ndarray:
+* var x = new ndarray( 'float64', xbuf, sh, sx, ox, 'row-major' );
+*
+* // Create a mask buffer:
+* var mbuf = new Uint8Array( [ 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0 ] );
+*
+* // Create a mask ndarray:
+* var mask = new ndarray( 'uint8', mbuf, sh, sx, ox, 'row-major' );
+*
+* // Perform reduction:
+* var out = mskrange( x, mask );
+* // returns [ 9.0 ]
+*/
+var mskrange = factory( table, [ idtypes, idtypes ], odtypes, policies );
+
+
+// EXPORTS //
+
+module.exports = mskrange;
diff --git a/lib/node_modules/@stdlib/stats/mskrange/package.json b/lib/node_modules/@stdlib/stats/mskrange/package.json
new file mode 100644
index 000000000000..5fca0713731f
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/mskrange/package.json
@@ -0,0 +1,64 @@
+{
+ "name": "@stdlib/stats/mskrange",
+ "version": "0.0.0",
+ "description": "Compute the range along one or more ndarray dimensions according to a mask.",
+ "license": "Apache-2.0",
+ "author": {
+ "name": "The Stdlib Authors",
+ "url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
+ },
+ "contributors": [
+ {
+ "name": "The Stdlib Authors",
+ "url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
+ }
+ ],
+ "main": "./lib",
+ "directories": {
+ "benchmark": "./benchmark",
+ "doc": "./docs",
+ "example": "./examples",
+ "lib": "./lib",
+ "test": "./test"
+ },
+ "types": "./docs/types",
+ "scripts": {},
+ "homepage": "https://github.com/stdlib-js/stdlib",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/stdlib-js/stdlib.git"
+ },
+ "bugs": {
+ "url": "https://github.com/stdlib-js/stdlib/issues"
+ },
+ "dependencies": {},
+ "devDependencies": {},
+ "engines": {
+ "node": ">=0.10.0",
+ "npm": ">2.7.0"
+ },
+ "os": [
+ "aix",
+ "darwin",
+ "freebsd",
+ "linux",
+ "macos",
+ "openbsd",
+ "sunos",
+ "win32",
+ "windows"
+ ],
+ "keywords": [
+ "stdlib",
+ "stdmath",
+ "statistics",
+ "stats",
+ "mathematics",
+ "math",
+ "range",
+ "masked",
+ "mask",
+ "ndarray"
+ ],
+ "__stdlib__": {}
+}
diff --git a/lib/node_modules/@stdlib/stats/mskrange/test/test.assign.js b/lib/node_modules/@stdlib/stats/mskrange/test/test.assign.js
new file mode 100644
index 000000000000..9d6b453e1117
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/mskrange/test/test.assign.js
@@ -0,0 +1,175 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var ndarray = require( '@stdlib/ndarray/ctor' );
+var zeros = require( '@stdlib/ndarray/zeros' );
+var emptyLike = require( '@stdlib/ndarray/empty-like' );
+var mskrange = require( './../lib' ).assign;
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof mskrange, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function throws an error if provided a first argument which is not an ndarray-like object', function test( t ) {
+ var values;
+ var mask;
+ var out;
+ var i;
+
+ mask = zeros( [ 2, 2 ], {
+ 'dtype': 'uint8'
+ });
+ out = zeros( [], {
+ 'dtype': 'generic'
+ });
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ mskrange( value, mask, out );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a second argument which is not an ndarray-like object', function test( t ) {
+ var values;
+ var out;
+ var x;
+ var i;
+
+ x = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+ out = zeros( [], {
+ 'dtype': 'generic'
+ });
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ mskrange( x, value, out );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a third argument which is not an ndarray-like object', function test( t ) {
+ var values;
+ var mask;
+ var x;
+ var i;
+
+ x = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+ mask = zeros( [ 2, 2 ], {
+ 'dtype': 'uint8'
+ });
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ mskrange( x, mask, value );
+ };
+ }
+});
+
+tape( 'the function performs a reduction on an ndarray (default, row-major)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var mbuf;
+ var out;
+ var x;
+ var m;
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ mbuf = [ 0, 0, 1, 0 ];
+ m = new ndarray( 'generic', mbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ out = emptyLike( x, {
+ 'shape': []
+ });
+
+ actual = mskrange( x, m, out );
+ expected = 5.0;
+
+ t.strictEqual( actual, out, 'returns expected value' );
+ t.strictEqual( actual.get(), expected, 'returns expected value' );
+
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/stats/mskrange/test/test.js b/lib/node_modules/@stdlib/stats/mskrange/test/test.js
new file mode 100644
index 000000000000..c679f5945148
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/mskrange/test/test.js
@@ -0,0 +1,83 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var isMethod = require( '@stdlib/assert/is-method' );
+var Float64Array = require( '@stdlib/array/float64' );
+var Uint8Array = require( '@stdlib/array/uint8' );
+var ndarray = require( '@stdlib/ndarray/ctor' );
+var isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );
+var mskrange = require( './../lib' );
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof mskrange, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'attached to the main export is an `assign` method', function test( t ) {
+ t.strictEqual( isMethod( mskrange, 'assign' ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function computes the range according to a mask', function test( t ) {
+ var xbuf;
+ var mbuf;
+ var mask;
+ var out;
+ var x;
+
+ xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+ x = new ndarray( 'float64', xbuf, [ 3, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ mbuf = new Uint8Array( [ 0, 0, 1, 0, 0, 1 ] );
+ mask = new ndarray( 'uint8', mbuf, [ 3, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ out = mskrange( x, mask );
+
+ t.strictEqual( isndarrayLike( out ), true, 'returns an ndarray' );
+ t.strictEqual( out.get(), 4.0, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function computes the range according to a mask (multiple dimensions)', function test( t ) {
+ var xbuf;
+ var mbuf;
+ var mask;
+ var out;
+ var x;
+
+ xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+ x = new ndarray( 'float64', xbuf, [ 2, 2, 2 ], [ 4, 2, 1 ], 0, 'row-major' );
+
+ mbuf = new Uint8Array( [ 0, 0, 0, 0, 0, 0, 1, 1 ] );
+ mask = new ndarray( 'uint8', mbuf, [ 2, 2, 2 ], [ 4, 2, 1 ], 0, 'row-major' );
+
+ out = mskrange( x, mask );
+
+ t.strictEqual( isndarrayLike( out ), true, 'returns an ndarray' );
+ t.strictEqual( out.get(), 5.0, 'returns expected value (8-1 = 7, but 7 and 8 are masked, so 6-1 = 5)' );
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/stats/mskrange/test/test.main.js b/lib/node_modules/@stdlib/stats/mskrange/test/test.main.js
new file mode 100644
index 000000000000..ae74ba235d0a
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/mskrange/test/test.main.js
@@ -0,0 +1,250 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );
+var ndarray = require( '@stdlib/ndarray/ctor' );
+var zeros = require( '@stdlib/ndarray/zeros' );
+var empty = require( '@stdlib/ndarray/empty' );
+var ndarray2array = require( '@stdlib/ndarray/to-array' );
+var getShape = require( '@stdlib/ndarray/shape' );
+var mskrange = require( './../lib' );
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof mskrange, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function throws an error if provided a first argument which is not an ndarray-like object', function test( t ) {
+ var values;
+ var mask;
+ var i;
+
+ mask = zeros( [ 2, 2 ], {
+ 'dtype': 'uint8'
+ });
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ mskrange( value, mask );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a second argument which is not an ndarray-like object', function test( t ) {
+ var values;
+ var x;
+ var i;
+
+ x = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ mskrange( x, value );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a first argument which is not an ndarray-like object having a supported data type', function test( t ) {
+ var values;
+ var mask;
+ var i;
+
+ mask = zeros( [ 2, 2 ], {
+ 'dtype': 'uint8'
+ });
+
+ values = [
+ empty( [ 2, 2 ], {
+ 'dtype': 'bool'
+ })
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ mskrange( value, mask );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a third argument which is not an object', function test( t ) {
+ var values;
+ var mask;
+ var x;
+ var i;
+
+ x = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+ mask = zeros( [ 2, 2 ], {
+ 'dtype': 'uint8'
+ });
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ mskrange( x, mask, value );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a `dtype` option which is not a supported data type', function test( t ) {
+ var values;
+ var mask;
+ var x;
+ var i;
+
+ x = zeros( [ 2, 2 ], {
+ 'dtype': 'float64'
+ });
+ mask = zeros( [ 2, 2 ], {
+ 'dtype': 'uint8'
+ });
+
+ values = [
+ 'foo',
+ 'bar',
+ 'beep',
+ 'boop'
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ mskrange( x, mask, {
+ 'dtype': value
+ });
+ };
+ }
+});
+
+tape( 'the function performs a reduction on an ndarray (default, row-major)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var mbuf;
+ var x;
+ var m;
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ mbuf = [ 0, 0, 1, 0 ];
+ m = new ndarray( 'generic', mbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ actual = mskrange( x, m );
+ expected = 5.0; // max=4, min=-1 => range=5
+
+ t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
+ t.deepEqual( getShape( actual ), [], 'returns expected value' );
+ t.strictEqual( actual.get(), expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports specifying reduction dimensions (row-major)', function test( t ) {
+ var expected;
+ var actual;
+ var xbuf;
+ var mbuf;
+ var x;
+ var m;
+
+ xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
+ x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ mbuf = [ 0, 0, 0, 1 ];
+ m = new ndarray( 'generic', mbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
+
+ actual = mskrange( x, m, {
+ 'dims': [ 0 ]
+ });
+ expected = [ 2.0, 0.0 ];
+
+ t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
+ t.deepEqual( getShape( actual ), [ 2 ], 'returns expected value' );
+ t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
+
+ t.end();
+});