From bc80ce2cf67aa298f2b850503546d1a3514b0693 Mon Sep 17 00:00:00 2001
From: Anshu <contact.anshukumar@protonmail.com>
Date: Sat, 15 Mar 2025 16:09:11 +0530
Subject: [PATCH 1/7] feat(stats): add nanmeanabs package

---
 .../@stdlib/stats/incr/nanmeanabs/README.md   | 133 ++++++++++++++++++
 .../incr/nanmeanabs/benchmark/benchmark.js    |  68 +++++++++
 ...uation_arithmetic_mean_absolute_values.svg |  45 ++++++
 .../stats/incr/nanmeanabs/docs/repl.txt       |  30 ++++
 .../incr/nanmeanabs/docs/types/index.d.ts     |  62 ++++++++
 .../stats/incr/nanmeanabs/docs/types/test.ts  |  61 ++++++++
 .../stats/incr/nanmeanabs/examples/index.js   |  38 +++++
 .../stats/incr/nanmeanabs/lib/index.js        |  54 +++++++
 .../@stdlib/stats/incr/nanmeanabs/lib/main.js |  74 ++++++++++
 .../stats/incr/nanmeanabs/package.json        |  71 ++++++++++
 .../stats/incr/nanmeanabs/test/test.js        |  95 +++++++++++++
 11 files changed, 731 insertions(+)
 create mode 100644 lib/node_modules/@stdlib/stats/incr/nanmeanabs/README.md
 create mode 100644 lib/node_modules/@stdlib/stats/incr/nanmeanabs/benchmark/benchmark.js
 create mode 100644 lib/node_modules/@stdlib/stats/incr/nanmeanabs/docs/img/equation_arithmetic_mean_absolute_values.svg
 create mode 100644 lib/node_modules/@stdlib/stats/incr/nanmeanabs/docs/repl.txt
 create mode 100644 lib/node_modules/@stdlib/stats/incr/nanmeanabs/docs/types/index.d.ts
 create mode 100644 lib/node_modules/@stdlib/stats/incr/nanmeanabs/docs/types/test.ts
 create mode 100644 lib/node_modules/@stdlib/stats/incr/nanmeanabs/examples/index.js
 create mode 100644 lib/node_modules/@stdlib/stats/incr/nanmeanabs/lib/index.js
 create mode 100644 lib/node_modules/@stdlib/stats/incr/nanmeanabs/lib/main.js
 create mode 100644 lib/node_modules/@stdlib/stats/incr/nanmeanabs/package.json
 create mode 100644 lib/node_modules/@stdlib/stats/incr/nanmeanabs/test/test.js

diff --git a/lib/node_modules/@stdlib/stats/incr/nanmeanabs/README.md b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/README.md
new file mode 100644
index 000000000000..cf711f2ab612
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/README.md
@@ -0,0 +1,133 @@
+<!--
+
+@license Apache-2.0
+
+Copyright (c) 2025 The Stdlib Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+
+# incrnanmeanabs
+
+> Compute an [arithmetic mean][arithmetic-mean] of absolute values incrementally, ignoring `NaN` values.
+
+<section class="intro">
+
+The [arithmetic mean][arithmetic-mean] of absolute values is defined as
+
+<!-- <equation class="equation" label="eq:arithmetic_mean_absolute_values" align="center" raw="\mu = \frac{1}{n} \sum_{i=0}^{n-1} |x_i|" alt="Equation for the arithmetic mean of absolute values."> -->
+
+```math
+\mu = \frac{1}{n} \sum_{i=0}^{n-1} |x_i|
+```
+
+<!-- <div class="equation" align="center" data-raw-text="\mu = \frac{1}{n} \sum_{i=0}^{n-1} |x_i|" data-equation="eq:arithmetic_mean_absolute_values">
+    <img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@49d8cabda84033d55d7b8069f19ee3dd8b8d1496/lib/node_modules/@stdlib/stats/incr/nanmeanabs/docs/img/equation_arithmetic_mean_absolute_values.svg" alt="Equation for the arithmetic mean of absolute values.">
+    <br>
+</div> -->
+
+<!-- </equation> -->
+
+</section>
+
+<!-- /.intro -->
+
+<section class="usage">
+
+## Usage
+
+```javascript
+var incrnanmeanabs = require( '@stdlib/stats/incr/nanmeanabs' );
+```
+
+#### incrnanmeanabs()
+
+Returns an accumulator `function` which incrementally computes an [arithmetic mean][arithmetic-mean] of absolute values, ignoring `NaN` values.
+
+```javascript
+var accumulator = incrnanmeanabs();
+```
+
+#### accumulator( \[x] )
+
+If provided an input value `x`, the accumulator function returns an updated mean. If not provided an input value `x`, the accumulator function returns the current mean.
+
+```javascript
+var accumulator = incrnanmeanabs();
+
+var mu = accumulator( 2.0 );
+// returns 2.0
+
+mu = accumulator( NaN );
+// returns 2.0
+
+mu = accumulator( -1.0 );
+// returns 1.5
+
+mu = accumulator( -3.0 );
+// returns 2.0
+
+mu = accumulator();
+// returns 2.0
+```
+
+</section>
+
+<!-- /.usage -->
+
+<section class="notes">
+
+## Notes
+
+-   Input values are **not** type checked. If non-numeric inputs are possible, you are advised to type check and handle accordingly **before** passing the value to the accumulator function.
+
+</section>
+
+<!-- /.notes -->
+
+<section class="examples">
+
+## Examples
+
+<!-- eslint no-undef: "error" -->
+
+```javascript
+var uniform = require( '@stdlib/random/base/uniform' );
+var bernoulli = require( '@stdlib/random/base/bernoulli' );
+var incrnanmeanabs = require( '@stdlib/stats/incr/nanmeanabs' );
+
+// Initialize an accumulator:
+var accumulator = incrnanmeanabs();
+
+// For each simulated datum, update the mean...
+var v;
+var i;
+
+for ( i = 0; i < 100; i++ ) {
+    accumulator( ( bernoulli( 0.8 ) < 1 ) ? NaN : uniform( 0.0, 100.0 ) );
+}
+console.log( accumulator() );
+```
+
+</section>
+
+<!-- /.examples -->
+
+<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
+
+<section class="related">
+
+</section>
+
+<!-- /.links -->
diff --git a/lib/node_modules/@stdlib/stats/incr/nanmeanabs/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/benchmark/benchmark.js
new file mode 100644
index 000000000000..56b1d2f48e7d
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/benchmark/benchmark.js
@@ -0,0 +1,68 @@
+/**
+* @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 pkg = require( './../package.json' ).name;
+var incrnanmeanabs = require( './../lib' );
+
+
+// MAIN //
+
+bench( pkg, function benchmark( b ) {
+	var f;
+	var i;
+	b.tic();
+	for ( i = 0; i < b.iterations; i++ ) {
+		f = incrnanmeanabs();
+		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 = incrnanmeanabs();
+
+	b.tic();
+	for ( i = 0; i < b.iterations; i++ ) {
+		v = acc( i );
+		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/nanmeanabs/docs/img/equation_arithmetic_mean_absolute_values.svg b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/docs/img/equation_arithmetic_mean_absolute_values.svg
new file mode 100644
index 000000000000..257657a0f016
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/docs/img/equation_arithmetic_mean_absolute_values.svg
@@ -0,0 +1,45 @@
+<svg xmlns:xlink="http://www.w3.org/1999/xlink" width="14.283ex" height="7.343ex" style="vertical-align: -3.005ex;" viewBox="0 -1867.7 6149.7 3161.4" role="img" focusable="false" xmlns="http://www.w3.org/2000/svg" aria-labelledby="MathJax-SVG-1-Title">
+<title id="MathJax-SVG-1-Title">mu equals StartFraction 1 Over n EndFraction sigma-summation Underscript i equals 0 Overscript n minus 1 Endscripts StartAbsoluteValue x Subscript i Baseline EndAbsoluteValue</title>
+<defs aria-hidden="true">
+<path stroke-width="1" id="E1-MJMATHI-3BC" d="M58 -216Q44 -216 34 -208T23 -186Q23 -176 96 116T173 414Q186 442 219 442Q231 441 239 435T249 423T251 413Q251 401 220 279T187 142Q185 131 185 107V99Q185 26 252 26Q261 26 270 27T287 31T302 38T315 45T327 55T338 65T348 77T356 88T365 100L372 110L408 253Q444 395 448 404Q461 431 491 431Q504 431 512 424T523 412T525 402L449 84Q448 79 448 68Q448 43 455 35T476 26Q485 27 496 35Q517 55 537 131Q543 151 547 152Q549 153 557 153H561Q580 153 580 144Q580 138 575 117T555 63T523 13Q510 0 491 -8Q483 -10 467 -10Q446 -10 429 -4T402 11T385 29T376 44T374 51L368 45Q362 39 350 30T324 12T288 -4T246 -11Q199 -11 153 12L129 -85Q108 -167 104 -180T92 -202Q76 -216 58 -216Z"></path>
+<path stroke-width="1" id="E1-MJMAIN-3D" d="M56 347Q56 360 70 367H707Q722 359 722 347Q722 336 708 328L390 327H72Q56 332 56 347ZM56 153Q56 168 72 173H708Q722 163 722 153Q722 140 707 133H70Q56 140 56 153Z"></path>
+<path stroke-width="1" id="E1-MJMAIN-31" d="M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z"></path>
+<path stroke-width="1" id="E1-MJMATHI-6E" d="M21 287Q22 293 24 303T36 341T56 388T89 425T135 442Q171 442 195 424T225 390T231 369Q231 367 232 367L243 378Q304 442 382 442Q436 442 469 415T503 336T465 179T427 52Q427 26 444 26Q450 26 453 27Q482 32 505 65T540 145Q542 153 560 153Q580 153 580 145Q580 144 576 130Q568 101 554 73T508 17T439 -10Q392 -10 371 17T350 73Q350 92 386 193T423 345Q423 404 379 404H374Q288 404 229 303L222 291L189 157Q156 26 151 16Q138 -11 108 -11Q95 -11 87 -5T76 7T74 17Q74 30 112 180T152 343Q153 348 153 366Q153 405 129 405Q91 405 66 305Q60 285 60 284Q58 278 41 278H27Q21 284 21 287Z"></path>
+<path stroke-width="1" id="E1-MJSZ2-2211" d="M60 948Q63 950 665 950H1267L1325 815Q1384 677 1388 669H1348L1341 683Q1320 724 1285 761Q1235 809 1174 838T1033 881T882 898T699 902H574H543H251L259 891Q722 258 724 252Q725 250 724 246Q721 243 460 -56L196 -356Q196 -357 407 -357Q459 -357 548 -357T676 -358Q812 -358 896 -353T1063 -332T1204 -283T1307 -196Q1328 -170 1348 -124H1388Q1388 -125 1381 -145T1356 -210T1325 -294L1267 -449L666 -450Q64 -450 61 -448Q55 -446 55 -439Q55 -437 57 -433L590 177Q590 178 557 222T452 366T322 544L56 909L55 924Q55 945 60 948Z"></path>
+<path stroke-width="1" id="E1-MJMATHI-69" d="M184 600Q184 624 203 642T247 661Q265 661 277 649T290 619Q290 596 270 577T226 557Q211 557 198 567T184 600ZM21 287Q21 295 30 318T54 369T98 420T158 442Q197 442 223 419T250 357Q250 340 236 301T196 196T154 83Q149 61 149 51Q149 26 166 26Q175 26 185 29T208 43T235 78T260 137Q263 149 265 151T282 153Q302 153 302 143Q302 135 293 112T268 61T223 11T161 -11Q129 -11 102 10T74 74Q74 91 79 106T122 220Q160 321 166 341T173 380Q173 404 156 404H154Q124 404 99 371T61 287Q60 286 59 284T58 281T56 279T53 278T49 278T41 278H27Q21 284 21 287Z"></path>
+<path stroke-width="1" id="E1-MJMAIN-30" d="M96 585Q152 666 249 666Q297 666 345 640T423 548Q460 465 460 320Q460 165 417 83Q397 41 362 16T301 -15T250 -22Q224 -22 198 -16T137 16T82 83Q39 165 39 320Q39 494 96 585ZM321 597Q291 629 250 629Q208 629 178 597Q153 571 145 525T137 333Q137 175 145 125T181 46Q209 16 250 16Q290 16 318 46Q347 76 354 130T362 333Q362 478 354 524T321 597Z"></path>
+<path stroke-width="1" id="E1-MJMAIN-2212" d="M84 237T84 250T98 270H679Q694 262 694 250T679 230H98Q84 237 84 250Z"></path>
+<path stroke-width="1" id="E1-MJMAIN-7C" d="M139 -249H137Q125 -249 119 -235V251L120 737Q130 750 139 750Q152 750 159 735V-235Q151 -249 141 -249H139Z"></path>
+<path stroke-width="1" id="E1-MJMATHI-78" d="M52 289Q59 331 106 386T222 442Q257 442 286 424T329 379Q371 442 430 442Q467 442 494 420T522 361Q522 332 508 314T481 292T458 288Q439 288 427 299T415 328Q415 374 465 391Q454 404 425 404Q412 404 406 402Q368 386 350 336Q290 115 290 78Q290 50 306 38T341 26Q378 26 414 59T463 140Q466 150 469 151T485 153H489Q504 153 504 145Q504 144 502 134Q486 77 440 33T333 -11Q263 -11 227 52Q186 -10 133 -10H127Q78 -10 57 16T35 71Q35 103 54 123T99 143Q142 143 142 101Q142 81 130 66T107 46T94 41L91 40Q91 39 97 36T113 29T132 26Q168 26 194 71Q203 87 217 139T245 247T261 313Q266 340 266 352Q266 380 251 392T217 404Q177 404 142 372T93 290Q91 281 88 280T72 278H58Q52 284 52 289Z"></path>
+</defs>
+<g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)" aria-hidden="true">
+ <use xlink:href="#E1-MJMATHI-3BC" x="0" y="0"></use>
+ <use xlink:href="#E1-MJMAIN-3D" x="881" y="0"></use>
+<g transform="translate(1659,0)">
+<g transform="translate(397,0)">
+<rect stroke="none" width="720" height="60" x="0" y="220"></rect>
+ <use xlink:href="#E1-MJMAIN-31" x="110" y="676"></use>
+ <use xlink:href="#E1-MJMATHI-6E" x="60" y="-686"></use>
+</g>
+</g>
+<g transform="translate(3064,0)">
+ <use xlink:href="#E1-MJSZ2-2211" x="0" y="0"></use>
+<g transform="translate(147,-1090)">
+ <use transform="scale(0.707)" xlink:href="#E1-MJMATHI-69" x="0" y="0"></use>
+ <use transform="scale(0.707)" xlink:href="#E1-MJMAIN-3D" x="345" y="0"></use>
+ <use transform="scale(0.707)" xlink:href="#E1-MJMAIN-30" x="1124" y="0"></use>
+</g>
+<g transform="translate(57,1151)">
+ <use transform="scale(0.707)" xlink:href="#E1-MJMATHI-6E" x="0" y="0"></use>
+ <use transform="scale(0.707)" xlink:href="#E1-MJMAIN-2212" x="600" y="0"></use>
+ <use transform="scale(0.707)" xlink:href="#E1-MJMAIN-31" x="1379" y="0"></use>
+</g>
+</g>
+ <use xlink:href="#E1-MJMAIN-7C" x="4675" y="0"></use>
+<g transform="translate(4954,0)">
+ <use xlink:href="#E1-MJMATHI-78" x="0" y="0"></use>
+ <use transform="scale(0.707)" xlink:href="#E1-MJMATHI-69" x="809" y="-213"></use>
+</g>
+ <use xlink:href="#E1-MJMAIN-7C" x="5871" y="0"></use>
+</g>
+</svg>
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/stats/incr/nanmeanabs/docs/repl.txt b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/docs/repl.txt
new file mode 100644
index 000000000000..eed62415b149
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/docs/repl.txt
@@ -0,0 +1,30 @@
+
+{{alias}}()
+    Returns an accumulator function which incrementally computes an arithmetic
+    mean of absolute values, ignoring `NaN` values.
+
+    If provided a value, the accumulator function returns an updated mean. If
+    not provided a value, the accumulator function returns the current mean.
+
+    Returns
+    -------
+    acc: Function
+        Accumulator function.
+
+    Examples
+    --------
+    > var accumulator = {{alias}}();
+    > var mu = accumulator()
+    null
+    > mu = accumulator( 2.0 )
+    2.0
+    > mu = accumulator( NaN )
+    2.0
+    > mu = accumulator( -5.0 )
+    3.5
+    > mu = accumulator()
+    3.5
+
+    See Also
+    --------
+
diff --git a/lib/node_modules/@stdlib/stats/incr/nanmeanabs/docs/types/index.d.ts b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/docs/types/index.d.ts
new file mode 100644
index 000000000000..a821ac57c092
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/docs/types/index.d.ts
@@ -0,0 +1,62 @@
+/*
+* @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
+
+/// <reference types="@stdlib/types"/>
+
+/**
+* If provided a value, returns an updated arithmetic mean; otherwise, returns the current arithmetic mean.
+*
+* @param x - value
+* @returns arithmetic mean of absolute values
+*/
+type accumulator = ( x?: number ) => number | null;
+
+/**
+* Returns an accumulator function which incrementally computes an arithmetic mean of absolute values, ignoring `NaN` values.
+*
+* @returns accumulator function
+*
+* @example
+* var accumulator = incrnanmeanabs();
+*
+* var mu = accumulator();
+* // returns null
+*
+* mu = accumulator( 2.0 );
+* // returns 2.0
+*
+* mu = accumulator( NaN );
+* // returns 2.0
+*
+* mu = accumulator( -3.0 );
+* // returns 2.5
+*
+* mu = accumulator( -4.0 );
+* // returns 3.0
+*
+* mu = accumulator();
+* // returns 3.0
+*/
+declare function incrnanmeanabs(): accumulator;
+
+
+// EXPORTS //
+
+export = incrnanmeanabs;
diff --git a/lib/node_modules/@stdlib/stats/incr/nanmeanabs/docs/types/test.ts b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/docs/types/test.ts
new file mode 100644
index 000000000000..f127ba3950a6
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/docs/types/test.ts
@@ -0,0 +1,61 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+import incrnanmeanabs = require( './index' );
+
+
+// TESTS //
+
+// The function returns an accumulator function...
+{
+	incrnanmeanabs(); // $ExpectType accumulator
+}
+
+// The compiler throws an error if the function is provided arguments...
+{
+	incrnanmeanabs( '5' ); // $ExpectError
+	incrnanmeanabs( 5 ); // $ExpectError
+	incrnanmeanabs( true ); // $ExpectError
+	incrnanmeanabs( false ); // $ExpectError
+	incrnanmeanabs( null ); // $ExpectError
+	incrnanmeanabs( undefined ); // $ExpectError
+	incrnanmeanabs( [] ); // $ExpectError
+	incrnanmeanabs( {} ); // $ExpectError
+	incrnanmeanabs( ( x: number ): number => x ); // $ExpectError
+}
+
+// The function returns an accumulator function which returns an accumulated result...
+{
+	const acc = incrnanmeanabs();
+
+	acc(); // $ExpectType number | null
+	acc( 3.14 ); // $ExpectType number | null
+}
+
+// The compiler throws an error if the returned accumulator function is provided invalid arguments...
+{
+	const acc = incrnanmeanabs();
+
+	acc( '5' ); // $ExpectError
+	acc( true ); // $ExpectError
+	acc( false ); // $ExpectError
+	acc( null ); // $ExpectError
+	acc( [] ); // $ExpectError
+	acc( {} ); // $ExpectError
+	acc( ( x: number ): number => x ); // $ExpectError
+}
diff --git a/lib/node_modules/@stdlib/stats/incr/nanmeanabs/examples/index.js b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/examples/index.js
new file mode 100644
index 000000000000..835617e1b915
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/examples/index.js
@@ -0,0 +1,38 @@
+/**
+* @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 uniform = require( '@stdlib/random/base/uniform' );
+var bernoulli = require( '@stdlib/random/base/bernoulli' );
+var incrnanmeanabs = require( './../lib' );
+
+// Initialize an accumulator:
+var accumulator = incrnanmeanabs();
+
+// For each simulated datum, update the mean...
+console.log( '\nValue\tMean\n' );
+var mu;
+var v;
+var i;
+for ( i = 0; i < 100; i++ ) {
+	v = ( bernoulli( 0.8 ) < 1 ) ? NaN : uniform( -100.0, 100.0 );
+	mu = accumulator( v );
+	console.log( '%d\t%d', v.toFixed( 3 ), ( mu === null ) ? NaN : mu.toFixed( 3 ) );
+}
+console.log( '\nFinal mean: %d\n', accumulator() );
diff --git a/lib/node_modules/@stdlib/stats/incr/nanmeanabs/lib/index.js b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/lib/index.js
new file mode 100644
index 000000000000..7f3da39488b7
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/lib/index.js
@@ -0,0 +1,54 @@
+/**
+* @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 an arithmetic mean of absolute values incrementally, ignoring `NaN` values.
+*
+* @module @stdlib/stats/incr/nanmeanabs
+*
+* @example
+* var incrnanmeanabs = require( '@stdlib/stats/incr/nanmeanabs' );
+*
+* var accumulator = incrnanmeanabs();
+*
+* var mu = accumulator();
+* // returns null
+*
+* mu = accumulator( 2.0 );
+* // returns 2.0
+*
+* mu = accumulator( NaN );
+* // returns 2.0
+*
+* mu = accumulator( -5.0 );
+* // returns 3.5
+*
+* mu = accumulator();
+* // returns 3.5
+*/
+
+// MODULES //
+
+var main = require( './main.js' );
+
+
+// EXPORTS //
+
+module.exports = main;
diff --git a/lib/node_modules/@stdlib/stats/incr/nanmeanabs/lib/main.js b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/lib/main.js
new file mode 100644
index 000000000000..85e23c72b8bf
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/lib/main.js
@@ -0,0 +1,74 @@
+/**
+* @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 isnan = require( '@stdlib/math/base/assert/is-nan' );
+var incrmeanabs = require( '@stdlib/stats/incr/meanabs' );
+
+
+// MAIN //
+
+/**
+* Returns an accumulator function which incrementally computes an arithmetic mean of absolute values, ignoring `NaN` values.
+*
+* @returns {Function} accumulator function
+*
+* @example
+* var accumulator = incrnanmeanabs();
+*
+* var mu = accumulator();
+* // returns null
+*
+* mu = accumulator( 2.0 );
+* // returns 2.0
+*
+* mu = accumulator( NaN );
+* // returns 2.0
+*
+* mu = accumulator( -5.0 );
+* // returns 3.5
+*
+* mu = accumulator();
+* // returns 3.5
+*/
+function incrnanmeanabs() {
+	var meanabs = incrmeanabs();
+	return accumulator;
+
+	/**
+	* If provided a value, the accumulator function returns an updated mean. If not provided a value, the accumulator function returns the current mean.
+	*
+	* @private
+	* @param {number} [x] - new value
+	* @returns {(number|null)} mean value or null
+	*/
+	function accumulator( x ) {
+		if ( arguments.length === 0 || isnan( x ) ) {
+			return meanabs();
+		}
+		return meanabs( x );
+	}
+}
+
+
+// EXPORTS //
+
+module.exports = incrnanmeanabs;
diff --git a/lib/node_modules/@stdlib/stats/incr/nanmeanabs/package.json b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/package.json
new file mode 100644
index 000000000000..b4d0f75662f7
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/package.json
@@ -0,0 +1,71 @@
+{
+  "name": "@stdlib/stats/incr/nanmeanabs",
+  "version": "0.0.0",
+  "description": "Compute an arithmetic mean of absolute values incrementally, 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": {},
+  "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",
+    "average",
+    "avg",
+    "mean",
+    "arithmetic mean",
+    "central tendency",
+    "incremental",
+    "accumulator",
+    "absolute",
+    "value",
+    "abs",
+    "magnitude",
+    "math.abs"
+  ]
+}
diff --git a/lib/node_modules/@stdlib/stats/incr/nanmeanabs/test/test.js b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/test/test.js
new file mode 100644
index 000000000000..277e813ffd04
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/test/test.js
@@ -0,0 +1,95 @@
+/**
+* @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 isnan = require( '@stdlib/math/base/assert/is-nan' );
+var abs = require( '@stdlib/math/base/special/abs' );
+var incrnanmeanabs = require( './../lib' );
+var tape = require( 'tape' );
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+	t.ok( true, __filename );
+	t.strictEqual( typeof incrnanmeanabs, 'function', 'main export is a function' );
+	t.end();
+});
+
+tape( 'the function returns an accumulator function', function test( t ) {
+	t.equal( typeof incrnanmeanabs(), 'function', 'returns a function' );
+	t.end();
+});
+
+tape( 'the initial accumulated value is `null`', function test( t ) {
+	var acc = incrnanmeanabs();
+	t.equal( acc(), null, 'returns expected value' );
+	t.end();
+});
+
+tape( 'the accumulator function incrementally computes an arithmetic mean of absolute values', function test( t ) {
+	var expected;
+	var actual;
+	var count;
+	var data;
+	var sum;
+	var acc;
+	var i;
+	var d;
+	var N;
+
+	data = [ 2.0, -3.0, 2.0, NaN, -4.0, NaN, 3.0, -4.0 ];
+	N = data.length;
+	count = 0;
+	sum = 0;
+
+	expected = [];
+	actual = [];
+
+	acc = incrnanmeanabs();
+
+	for ( i = 0; i < N; i++ ) {
+		d = data[ i ];
+		if ( isnan( d ) === false ) {
+			sum += abs( d );
+			count += 1;
+		}
+		expected.push( ( count === 0 ) ? null : sum / count );
+		actual.push( acc( d ) );
+	}
+	t.deepEqual( actual, expected, 'returns expected value' );
+	t.end();
+});
+
+tape( 'if not provided an input value, the accumulator function returns the current mean', function test( t ) {
+	var data;
+	var acc;
+	var i;
+
+	data = [ 2.0, NaN, -3.0, NaN, -1.0 ];
+	acc = incrnanmeanabs();
+	for ( i = 0; i < data.length; i++ ) {
+		acc( data[ i ] );
+	}
+	t.equal( acc(), 2.0, 'returns expected value' );
+	t.end();
+});

From 3aca5121f542ec51d149a440e2628aa2c5fee553 Mon Sep 17 00:00:00 2001
From: Anshu <contact.anshukumar@protonmail.com>
Date: Sat, 15 Mar 2025 16:23:41 +0530
Subject: [PATCH 2/7] style: fix style related lint errors

---
 .../@stdlib/stats/incr/nanmeanabs/README.md            | 10 ++++++++++
 .../@stdlib/stats/incr/nanmeanabs/test/test.js         |  3 +--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/lib/node_modules/@stdlib/stats/incr/nanmeanabs/README.md b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/README.md
index cf711f2ab612..52f42f27fa27 100644
--- a/lib/node_modules/@stdlib/stats/incr/nanmeanabs/README.md
+++ b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/README.md
@@ -130,4 +130,14 @@ console.log( accumulator() );
 
 </section>
 
+<!-- /.related -->
+
+<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
+
+<section class="links">
+
+[arithmetic-mean]: https://en.wikipedia.org/wiki/Arithmetic_mean
+
+</section>
+
 <!-- /.links -->
diff --git a/lib/node_modules/@stdlib/stats/incr/nanmeanabs/test/test.js b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/test/test.js
index 277e813ffd04..b3f0f629443f 100644
--- a/lib/node_modules/@stdlib/stats/incr/nanmeanabs/test/test.js
+++ b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/test/test.js
@@ -20,11 +20,10 @@
 
 // MODULES //
 
-
 var isnan = require( '@stdlib/math/base/assert/is-nan' );
 var abs = require( '@stdlib/math/base/special/abs' );
-var incrnanmeanabs = require( './../lib' );
 var tape = require( 'tape' );
+var incrnanmeanabs = require( './../lib' );
 
 
 // TESTS //

From 8071e5d96cf92280d3d8b4e110695ef7f034f07b Mon Sep 17 00:00:00 2001
From: Anshu <contact.anshukumar@protonmail.com>
Date: Sat, 15 Mar 2025 16:27:22 +0530
Subject: [PATCH 3/7] style: fix test.js lint error

---
 lib/node_modules/@stdlib/stats/incr/nanmeanabs/test/test.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/node_modules/@stdlib/stats/incr/nanmeanabs/test/test.js b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/test/test.js
index b3f0f629443f..1252eb13e12c 100644
--- a/lib/node_modules/@stdlib/stats/incr/nanmeanabs/test/test.js
+++ b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/test/test.js
@@ -20,9 +20,9 @@
 
 // MODULES //
 
+var tape = require( 'tape' );
 var isnan = require( '@stdlib/math/base/assert/is-nan' );
 var abs = require( '@stdlib/math/base/special/abs' );
-var tape = require( 'tape' );
 var incrnanmeanabs = require( './../lib' );
 
 

From 81fb8112556002dadaf855dfb9be00fbd780906f Mon Sep 17 00:00:00 2001
From: Anshu Kumar <contact.anshukumar@protonmail.com>
Date: Tue, 18 Mar 2025 12:55:02 +0530
Subject: [PATCH 4/7] chore: update benchmark.js

Signed-off-by: Anshu Kumar <contact.anshukumar@protonmail.com>
---
 .../@stdlib/stats/incr/nanmeanabs/benchmark/benchmark.js       | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/node_modules/@stdlib/stats/incr/nanmeanabs/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/benchmark/benchmark.js
index 56b1d2f48e7d..8ce0714c4e40 100644
--- a/lib/node_modules/@stdlib/stats/incr/nanmeanabs/benchmark/benchmark.js
+++ b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/benchmark/benchmark.js
@@ -21,6 +21,7 @@
 // MODULES //
 
 var bench = require( '@stdlib/bench' );
+var randu = require( '@stdlib/random/base/randu' );
 var pkg = require( './../package.json' ).name;
 var incrnanmeanabs = require( './../lib' );
 
@@ -54,7 +55,7 @@ bench( pkg+'::accumulator', function benchmark( b ) {
 
 	b.tic();
 	for ( i = 0; i < b.iterations; i++ ) {
-		v = acc( i );
+		v = acc(  randu()-0.5  );
 		if ( v !== v ) {
 			b.fail( 'should not return NaN' );
 		}

From d6ca37408e052135303a329497c607fdf579b37c Mon Sep 17 00:00:00 2001
From: Anshu Kumar <contact.anshukumar@protonmail.com>
Date: Tue, 18 Mar 2025 12:59:57 +0530
Subject: [PATCH 5/7] style: fix lint error in benchmark.js

Signed-off-by: Anshu Kumar <contact.anshukumar@protonmail.com>
---
 .../@stdlib/stats/incr/nanmeanabs/benchmark/benchmark.js        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/node_modules/@stdlib/stats/incr/nanmeanabs/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/benchmark/benchmark.js
index 8ce0714c4e40..9e67b90ecb26 100644
--- a/lib/node_modules/@stdlib/stats/incr/nanmeanabs/benchmark/benchmark.js
+++ b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/benchmark/benchmark.js
@@ -55,7 +55,7 @@ bench( pkg+'::accumulator', function benchmark( b ) {
 
 	b.tic();
 	for ( i = 0; i < b.iterations; i++ ) {
-		v = acc(  randu()-0.5  );
+		v = acc( randu()-0.5 );
 		if ( v !== v ) {
 			b.fail( 'should not return NaN' );
 		}

From 620386cabc2a023a262d234055de4c76092649aa Mon Sep 17 00:00:00 2001
From: Anshu Kumar <contact.anshukumar@protonmail.com>
Date: Tue, 18 Mar 2025 13:56:00 +0530
Subject: [PATCH 6/7] docs: update README.md

Signed-off-by: Anshu Kumar <contact.anshukumar@protonmail.com>
---
 lib/node_modules/@stdlib/stats/incr/nanmeanabs/README.md | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/node_modules/@stdlib/stats/incr/nanmeanabs/README.md b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/README.md
index 52f42f27fa27..3c90a384c3e4 100644
--- a/lib/node_modules/@stdlib/stats/incr/nanmeanabs/README.md
+++ b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/README.md
@@ -111,11 +111,10 @@ var incrnanmeanabs = require( '@stdlib/stats/incr/nanmeanabs' );
 var accumulator = incrnanmeanabs();
 
 // For each simulated datum, update the mean...
-var v;
 var i;
 
 for ( i = 0; i < 100; i++ ) {
-    accumulator( ( bernoulli( 0.8 ) < 1 ) ? NaN : uniform( 0.0, 100.0 ) );
+    accumulator( ( bernoulli( 0.8 ) < 1 ) ? NaN : uniform( -100.0, 100.0 ) );
 }
 console.log( accumulator() );
 ```

From 09cd1c68699b1c463a72bdf7e7e6e6ee8ce3c80c Mon Sep 17 00:00:00 2001
From: Athan <kgryte@gmail.com>
Date: Tue, 18 Mar 2025 01:33:47 -0700
Subject: [PATCH 7/7] Apply suggestions from code review

Signed-off-by: Athan <kgryte@gmail.com>
---
 lib/node_modules/@stdlib/stats/incr/nanmeanabs/README.md       | 3 +--
 .../@stdlib/stats/incr/nanmeanabs/docs/types/index.d.ts        | 2 --
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/lib/node_modules/@stdlib/stats/incr/nanmeanabs/README.md b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/README.md
index 3c90a384c3e4..dbef25bded83 100644
--- a/lib/node_modules/@stdlib/stats/incr/nanmeanabs/README.md
+++ b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/README.md
@@ -53,7 +53,7 @@ var incrnanmeanabs = require( '@stdlib/stats/incr/nanmeanabs' );
 
 #### incrnanmeanabs()
 
-Returns an accumulator `function` which incrementally computes an [arithmetic mean][arithmetic-mean] of absolute values, ignoring `NaN` values.
+Returns an accumulator function which incrementally computes an [arithmetic mean][arithmetic-mean] of absolute values, ignoring `NaN` values.
 
 ```javascript
 var accumulator = incrnanmeanabs();
@@ -112,7 +112,6 @@ var accumulator = incrnanmeanabs();
 
 // For each simulated datum, update the mean...
 var i;
-
 for ( i = 0; i < 100; i++ ) {
     accumulator( ( bernoulli( 0.8 ) < 1 ) ? NaN : uniform( -100.0, 100.0 ) );
 }
diff --git a/lib/node_modules/@stdlib/stats/incr/nanmeanabs/docs/types/index.d.ts b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/docs/types/index.d.ts
index a821ac57c092..89a6ecaaf3d6 100644
--- a/lib/node_modules/@stdlib/stats/incr/nanmeanabs/docs/types/index.d.ts
+++ b/lib/node_modules/@stdlib/stats/incr/nanmeanabs/docs/types/index.d.ts
@@ -18,8 +18,6 @@
 
 // TypeScript Version: 4.1
 
-/// <reference types="@stdlib/types"/>
-
 /**
 * If provided a value, returns an updated arithmetic mean; otherwise, returns the current arithmetic mean.
 *