diff --git a/lib/node_modules/@stdlib/stats/incr/nanwmean/README.md b/lib/node_modules/@stdlib/stats/incr/nanwmean/README.md
new file mode 100644
index 000000000000..f65c4de963b7
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanwmean/README.md
@@ -0,0 +1,126 @@
+
+
+# incrnanwmean
+
+> Compute a [weighted arithmetic mean][weighted-arithmetic-mean] incrementally, ignoring `NaN` values.
+
+
+
+The [weighted arithmetic mean][weighted-arithmetic-mean] is defined as
+
+
+
+```math
+\bar{x} = \frac{\displaystyle\sum_{i=0, x_i \neq \text{NaN}}^{n-1} w_{i} x_{i}}{\displaystyle\sum_{i=0, x_i \neq \text{NaN}}^{n-1} w_{i}}
+```
+
+
+
+
+
+
+
+
+
+
+
+## Usage
+
+```javascript
+var incrnanwmean = require( '@stdlib/stats/incr/nanwmean' );
+```
+
+#### incrnanwmean()
+
+Returns an accumulator `function` which incrementally computes a [weighted arithmetic mean][weighted-arithmetic-mean], ignoring `NaN` values.
+
+```javascript
+var accumulator = incrnanwmean();
+```
+
+#### accumulator( \[x, w] )
+
+If provided an input value `x` and a weight `w`, the accumulator function returns an updated weighted mean while ignoring `NaN` values. If not provided any input values, the accumulator function returns the current mean.
+
+```javascript
+var accumulator = incrnanwmean();
+
+var mu = accumulator();
+// returns null
+
+mu = accumulator( 2.0, 1.0 );
+// returns 2.0
+
+mu = accumulator( 2.0, 0.5 );
+// returns 2.0
+
+mu = accumulator( 3.0, 1.5 );
+// returns 2.5
+
+mu = accumulator();
+// returns 2.5
+```
+
+
+
+
+
+
+
+
+## Notes
+
+- Input values are **not** type checked. If provided `NaN` for the value `x`, the accumulator **ignores** it and does not update the weighted mean. If provided `NaN` for the weight `w`, the corresponding value is ignored. If non-numeric inputs are possible, you are advised to type check and handle accordingly **before** passing the value to the accumulator function.
+
+
+
+
+
+
+
+
+## Examples
+
+
+
+```javascript
+var randu = require( '@stdlib/random/base/randu' );
+var incrnanwmean = require( '@stdlib/stats/incr/nanwmean' );
+
+var accumulator;
+var v;
+var w;
+var i;
+
+accumulator = incrnanwmean();
+
+for ( i = 0; i < 100; i++ ) {
+ v = ( randu() < 0.1 ) ? NaN : randu() * 100.0; // Introduce NaNs randomly
+ w = ( randu() < 0.1 ) ? NaN : randu() * 100.0; // Introduce NaNs randomly
+ accumulator( v, w );
+}
+console.log( accumulator() );
+```
+
+
diff --git a/lib/node_modules/@stdlib/stats/incr/nanwmean/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/incr/nanwmean/benchmark/benchmark.js
new file mode 100644
index 000000000000..0cfb3fde34fc
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanwmean/benchmark/benchmark.js
@@ -0,0 +1,69 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var randu = require( '@stdlib/random/base/randu' );
+var pkg = require( './../package.json' ).name;
+var incrnanwmean = require( './../lib' );
+
+
+// MAIN //
+
+bench( pkg, function benchmark( b ) {
+ var f;
+ var i;
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ f = incrnanwmean();
+ if ( typeof f !== 'function' ) {
+ b.fail( 'should return a function' );
+ }
+ }
+ b.toc();
+ if ( typeof f !== 'function' ) {
+ b.fail( 'should return a function' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+});
+
+bench( pkg+'::accumulator', function benchmark( b ) {
+ var acc;
+ var v;
+ var i;
+
+ acc = incrnanwmean();
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ v = acc( randu(), 1.0 );
+ if ( v !== v ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( v !== v ) {
+ b.fail( 'should not return NaN' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+});
diff --git a/lib/node_modules/@stdlib/stats/incr/nanwmean/docs/img/equation_weighted_arithmetic_mean_nan.svg b/lib/node_modules/@stdlib/stats/incr/nanwmean/docs/img/equation_weighted_arithmetic_mean_nan.svg
new file mode 100644
index 000000000000..2a57b6dc52c6
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanwmean/docs/img/equation_weighted_arithmetic_mean_nan.svg
@@ -0,0 +1,39 @@
+
+
diff --git a/lib/node_modules/@stdlib/stats/incr/nanwmean/docs/repl.txt b/lib/node_modules/@stdlib/stats/incr/nanwmean/docs/repl.txt
new file mode 100644
index 000000000000..e44bdc288965
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanwmean/docs/repl.txt
@@ -0,0 +1,40 @@
+{{alias}}()
+ Returns an accumulator function which incrementally computes a weighted
+ arithmetic mean while ignoring NaN values.
+
+ If provided arguments, the accumulator function returns an updated weighted
+ mean. If not provided arguments, the accumulator function returns the
+ current weighted mean.
+
+ If `x` is `NaN`, the function ignores it and does not update the mean.
+ If `w` is `NaN` or less than or equal to zero, the function ignores the input.
+ If all values provided are `NaN`, the accumulated value remains `null`.
+
+ The accumulator function accepts two arguments:
+
+ - x: value.
+ - w: weight.
+
+ Returns
+ -------
+ acc: Function
+ Accumulator function.
+
+ Examples
+ --------
+ > var accumulator = {{alias}}();
+ > var mean = accumulator()
+ null
+ > mean = accumulator(2.0, 3.0)
+ 2.0
+ > mean = accumulator(NaN, 4.0)
+ 2.0 (NaN value is ignored)
+ > mean = accumulator(3.0, NaN)
+ 2.0 (NaN weight is ignored)
+ > mean = accumulator(5.0, 2.0)
+ 3.5
+ > mean = accumulator()
+ 3.5
+
+ See Also
+ --------
diff --git a/lib/node_modules/@stdlib/stats/incr/nanwmean/docs/types/index.d.ts b/lib/node_modules/@stdlib/stats/incr/nanwmean/docs/types/index.d.ts
new file mode 100644
index 000000000000..a8d1f7cc6c7a
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanwmean/docs/types/index.d.ts
@@ -0,0 +1,70 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+// TypeScript Version: 4.1
+
+///
+
+/**
+* If provided both arguments, returns an updated weighted arithmetic mean while ignoring NaN values; otherwise, returns the current weighted arithmetic mean.
+*
+* ## Notes
+*
+* - If `x` is `NaN`, the function ignores it and does not update the mean.
+* - If `w` is `NaN` or less than or equal to zero, the function ignores the input.
+* - If all values provided are `NaN`, the accumulated value remains `null`.
+*
+* @param x - value
+* @param w - weight
+* @returns weighted arithmetic mean (ignoring NaN values)
+*/
+type accumulator = ( x?: number, w?: number ) => number | null;
+
+/**
+* Returns an accumulator function which incrementally computes a weighted arithmetic mean while ignoring NaN values.
+*
+* @returns accumulator function
+*
+* @example
+* var incrnanwmean = require('@stdlib/stats/incr/nanwmean');
+ *
+ * var accumulator = incrnanwmean();
+ *
+ * var mean = accumulator();
+ * // returns null
+ *
+ * mean = accumulator(2.0, 3.0);
+ * // returns 2.0
+ *
+ * mean = accumulator(NaN, 4.0);
+ * // returns 2.0 (Skips NaN)
+ *
+ * mean = accumulator(3.0 , NaN);
+ * // returns 2.0 (Skips NaN)
+ *
+ * mean = accumulator(5.0, 2.0);
+ * // returns 3.5
+ *
+ * mean = accumulator();
+ * // returns 3.5
+*/
+declare function incrnanwmean(): accumulator;
+
+// EXPORTS //
+
+export = incrnanwmean;
diff --git a/lib/node_modules/@stdlib/stats/incr/nanwmean/docs/types/test.ts b/lib/node_modules/@stdlib/stats/incr/nanwmean/docs/types/test.ts
new file mode 100644
index 000000000000..d0d2992ffaf6
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanwmean/docs/types/test.ts
@@ -0,0 +1,70 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2019 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 incrnanwmean = require( './index' );
+
+// TESTS //
+
+// The function returns an accumulator function...
+{
+ incrnanwmean(); // $ExpectType accumulator
+}
+
+// The compiler throws an error if the function is provided arguments...
+{
+ incrnanwmean( '5' ); // $ExpectError
+ incrnanwmean( 5 ); // $ExpectError
+ incrnanwmean( true ); // $ExpectError
+ incrnanwmean( false ); // $ExpectError
+ incrnanwmean( null ); // $ExpectError
+ incrnanwmean( undefined ); // $ExpectError
+ incrnanwmean( [] ); // $ExpectError
+ incrnanwmean( {} ); // $ExpectError
+ incrnanwmean( ( x: number ): number => x ); // $ExpectError
+}
+
+// The function returns an accumulator function which returns an accumulated result...
+{
+ const acc = incrnanwmean();
+
+ acc(); // $ExpectType number | null
+ acc( 3.14, 1.0 ); // $ExpectType number | null
+ acc( NaN, 2.0 ); // $ExpectType number | null
+ acc( 4.5, NaN ); // $ExpectType number | null
+}
+
+// The compiler throws an error if the returned accumulator function is provided invalid arguments...
+{
+ const acc = incrnanwmean();
+
+ acc( '5', 1.0 ); // $ExpectError
+ acc( true, 1.0 ); // $ExpectError
+ acc( false, 1.0 ); // $ExpectError
+ acc( null, 1.0 ); // $ExpectError
+ acc( [], 1.0 ); // $ExpectError
+ acc( {}, 1.0 ); // $ExpectError
+ acc( ( x: number ): number => x, 1.0 ); // $ExpectError
+
+ acc( 3.14, '5' ); // $ExpectError
+ acc( 3.14, true ); // $ExpectError
+ acc( 3.14, false ); // $ExpectError
+ acc( 3.14, null ); // $ExpectError
+ acc( 3.14, [] ); // $ExpectError
+ acc( 3.14, {} ); // $ExpectError
+ acc( 3.14, ( x: number ): number => x ); // $ExpectError
+}
diff --git a/lib/node_modules/@stdlib/stats/incr/nanwmean/examples/index.js b/lib/node_modules/@stdlib/stats/incr/nanwmean/examples/index.js
new file mode 100644
index 000000000000..21ab75abd2a7
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanwmean/examples/index.js
@@ -0,0 +1,41 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+var randu = require( '@stdlib/random/base/randu' );
+var incrnanwmean = require( './../lib' );
+
+var accumulator;
+var mu;
+var x;
+var w;
+var i;
+
+// Initialize an accumulator:
+accumulator = incrnanwmean();
+
+// For each simulated datum, update the weighted mean...
+console.log( '\nValue\tWeight\tWeighted Mean\n' );
+for ( i = 0; i < 100; i++ ) {
+ x = randu() * 100.0;
+ w = randu() * 100.0;
+ mu = accumulator( x, w );
+ console.log( '%d\t%d\t%d', x.toFixed( 4 ), w.toFixed( 4 ), mu.toFixed( 4 ) );
+}
+console.log( '\nFinal weighted mean: %d\n', accumulator() );
diff --git a/lib/node_modules/@stdlib/stats/incr/nanwmean/lib/index.js b/lib/node_modules/@stdlib/stats/incr/nanwmean/lib/index.js
new file mode 100644
index 000000000000..cbb8e83983f4
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanwmean/lib/index.js
@@ -0,0 +1,57 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+/**
+ * Compute a moving weighted mean while handling NaN values incrementally.
+ *
+ * @module @stdlib/stats/incr/nanwmean
+ *
+ * @example
+ * var incrnanwmean = require('@stdlib/stats/incr/nanwmean');
+ *
+ * var accumulator = incrnanwmean();
+ *
+ * var mean = accumulator();
+ * // returns null
+ *
+ * mean = accumulator(2.0, 3.0);
+ * // returns 2.0
+ *
+ * mean = accumulator(NaN, 4.0);
+ * // returns 2.0 (Skips NaN)
+ *
+ * mean = accumulator(3.0 , NaN);
+ * // returns 2.0 (Skips NaN)
+ *
+ * mean = accumulator(5.0, 2.0);
+ * // returns 3.5
+ *
+ * mean = accumulator();
+ * // returns 3.5
+ */
+
+// MODULES //
+
+var main = require('./main');
+
+
+// EXPORTS //
+
+module.exports = main;
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/stats/incr/nanwmean/lib/main.js b/lib/node_modules/@stdlib/stats/incr/nanwmean/lib/main.js
new file mode 100644
index 000000000000..6b745cde1402
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanwmean/lib/main.js
@@ -0,0 +1,137 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+/**
+* Returns an accumulator function which compute a moving weighted mean while handling NaN values incrementally.
+*
+* ## Method
+*
+* - The weighted arithmetic mean is defined as
+*
+* ```tex
+* \mu = \frac{\sum_{i=0 , x_i \neq\text{NaN}}^{n-1} w_i x_i}{\sum_{i=0 , x_i \neq\text{NaN}}^{n-1} w_i}
+* ```
+*
+* where \\( w_i \\) are the weights.
+*
+* - The weighted arithmetic mean is equivalent to the simple arithmetic mean when all weights are equal.
+*
+* If the value of \\( x_k \\ ) is NaN, it is **excluded** from both numerator and denominator
+*
+* ```tex
+* \begin{align*}
+* \mu &= \frac{\sum_{i=0}^{n-1} w x_i}{\sum_{i=0}^{n-1} w} \\
+* &= \frac{w\sum_{i=0}^{n-1} x_i}{nw} \\
+* &= \frac{1}{n} \sum_{i=0}^{n-1}
+* \end{align*}
+* ```
+*
+* - If the weights are different, then one can view weights either as sample frequencies or as a means to calculate probabilities where \\( p_i = w_i / \sum w_i \\).
+*
+* - To derive an incremental formula for computing a weighted arithmetic mean while ignoring NaN values, let
+*
+* ```tex
+* W_n = \sum_{i=1, x_i \neq \text{NaN}}^{n} w_i
+* ```
+*
+* - Accordingly,
+*
+* ```tex
+* \begin{align*}
+* \mu_{n-1}, & \text{if } x_n = \text{NaN} \\
+* \mu_{n-1} + \frac{w_n}{W_n} (x_n - \mu_{n-1}) , & \text{otherwise}
+* \end{align*}
+* ```
+*
+* This ensures NaN values **do not effect the mean**, and only valid values contribute to the calculation.
+*
+* @returns {Function} accumulator function
+*
+* @example
+ * var incrnanwmean = require('@stdlib/stats/incr/nanwmean');
+ *
+ * var accumulator = incrnanwmean();
+ *
+ * var mean = accumulator();
+ * // returns null
+ *
+ * mean = accumulator(2.0, 3.0);
+ * // returns 2.0
+ *
+ * mean = accumulator(NaN, 4.0);
+ * // returns 2.0 (Skips NaN)
+ *
+ * mean = accumulator(3.0 , NaN);
+ * // returns 2.0 (Skips NaN)
+ *
+ * mean = accumulator(5.0, 2.0);
+ * // returns 3.5
+ *
+ * mean = accumulator();
+ * // returns 3.5
+*/
+function incrnanwmean() {
+ var wsum = 0.0;
+ var mu = null;
+ var FLG = false;
+
+ return accumulator;
+
+ /**
+ * If provided arguments, the accumulator function returns an updated weighted mean. If not provided arguments, the accumulator function returns the current weighted mean.
+ *
+ * @private
+ * @param {number} [x] - value
+ * @param {number} [w] - weight
+ * @returns {(number|null)} weighted mean or null
+ */
+ function accumulator( x, w ) {
+ if ( arguments.length === 0 ) {
+ if ( !FLG ) {
+ return null;
+ }
+ return mu;
+ }
+
+ if( arguments.length == 1 && w == undefined ) {
+ return NaN;
+ }
+
+ // Skipping NaN values
+ if(isNaN(x) || isNaN(w)) {
+ return mu; // return current mean without updating
+ }
+
+ if(w < 0) {
+ return NaN; // return NaN if weight is negative
+ }
+
+ FLG = true; // make FLG true which means function has at least one valid value.
+ wsum += w;
+ mu += ( w/wsum ) * ( x-mu );
+
+ return mu;
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = incrnanwmean;
diff --git a/lib/node_modules/@stdlib/stats/incr/nanwmean/package.json b/lib/node_modules/@stdlib/stats/incr/nanwmean/package.json
new file mode 100644
index 000000000000..238bc5450e91
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanwmean/package.json
@@ -0,0 +1,69 @@
+{
+ "name": "@stdlib/stats/incr/nanwmean",
+ "version": "0.0.0",
+ "description": "Compute a weighted arithmetic mean incrementally while ignoring NaN values.",
+ "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": {
+ "glob": "^11.0.1",
+ "minimist": "^1.2.8"
+ },
+ "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",
+ "average",
+ "avg",
+ "mean",
+ "arithmetic mean",
+ "central tendency",
+ "incremental",
+ "accumulator",
+ "weighted"
+ ]
+}
diff --git a/lib/node_modules/@stdlib/stats/incr/nanwmean/test/test.js b/lib/node_modules/@stdlib/stats/incr/nanwmean/test/test.js
new file mode 100644
index 000000000000..7e7ce9ad42a7
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanwmean/test/test.js
@@ -0,0 +1,124 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var EPS = require( '@stdlib/constants/float64/eps' );
+var abs = require( '@stdlib/math/base/special/abs' );
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var incrnanwmean = require( './../lib' );
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof incrnanwmean, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function returns an accumulator function', function test( t ) {
+ t.equal( typeof incrnanwmean(), 'function', 'returns a function' );
+ t.end();
+});
+
+tape( 'the initial accumulated value is `null`', function test( t ) {
+ var acc = incrnanwmean();
+ t.equal( acc(), null, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the accumulator function incrementally computes a weighted arithmetic mean', function test( t ) {
+ var expected;
+ var actual;
+ var delta;
+ var dataX;
+ var dataW;
+ var xwSum;
+ var wSum;
+ var acc;
+ var tol;
+ var N;
+ var x;
+ var w;
+ var i;
+
+ dataX = [ 2.0, 3.0, 2.0, 4.0, 3.0, 4.0 ];
+ dataW = [ 1.0, 2.0, 0.1, 1.8, 9.9, 3.6 ];
+ N = dataX.length;
+
+ acc = incrnanwmean();
+
+ xwSum = 0.0;
+ wSum = 0.0;
+ for ( i = 0; i < N; i++ ) {
+ x = dataX[ i ];
+ w = dataW[ i ];
+ xwSum += x * w;
+ wSum += w;
+ expected = xwSum / wSum;
+ actual = acc( x, w );
+ delta = abs( actual - expected );
+ tol = EPS * abs( expected );
+ t.ok( delta <= tol, 'within tolerance. x: ' + x + '. Value: ' + actual + '. Expected: ' + expected + '. Tolerance: ' + tol + '.' );
+ }
+
+ t.end();
+});
+
+tape( 'if not provided arguments, the accumulator function returns the current weighted mean', function test( t ) {
+ var dataX;
+ var dataW;
+ var acc;
+ var i;
+
+ dataX = [ 2.0, 3.0, 1.0 ];
+ dataW = [ 2.0, 2.0, 1.0 ];
+ acc = incrnanwmean();
+ for ( i = 0; i < dataX.length; i++ ) {
+ acc( dataX[ i ], dataW[ i ] );
+ }
+
+ t.equal( acc(), 2.2, 'returns the current accumulated mean' );
+ t.end();
+});
+
+tape( 'if provided `NaN` for either a value or a weight, the accumulator function skips the value and returns the current mean', function test( t ) {
+ var dataX;
+ var dataW;
+ var acc;
+ var i;
+
+ dataX = [ 2.0, NaN, 3.0, 2.0, 1.0 ];
+ dataW = [ 2.0, 2.0, 2.0, NaN, 1.0 ];
+
+ acc = incrnanwmean();
+
+ for ( i = 0; i < dataX.length; i++ ) {
+ acc( dataX[ i ], dataW[ i ] );
+ }
+
+ t.equal( acc( 2.0, NaN ), 2.2, 'returns the current accumulated mean' );
+ t.equal( acc( NaN, 1.0 ), 2.2, 'returns the current accumulated mean' );
+ t.equal( acc( NaN, NaN ), 2.2, 'returns the current accumulated mean' );
+
+ t.end();
+});
+