diff --git a/lib/node_modules/@stdlib/stats/strided/dztest2/README.md b/lib/node_modules/@stdlib/stats/strided/dztest2/README.md
new file mode 100644
index 000000000000..36ef7ec63ae3
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/dztest2/README.md
@@ -0,0 +1,422 @@
+
+
+
+
+# dztest2
+
+> Compute a two-sample Z-test for double-precision floating-point strided arrays.
+
+
+
+A Z-test commonly refers to a two-sample location test which compares the means of two independent sets of measurements `X` and `Y` when the population standard deviations are known. A Z-test supports testing three different null hypotheses `H0`:
+
+- `H0: μX - μY ≥ Δ` versus the alternative hypothesis `H1: μX - μY < Δ`.
+- `H0: μX - μY ≤ Δ` versus the alternative hypothesis `H1: μX - μY > Δ`.
+- `H0: μX - μY = Δ` versus the alternative hypothesis `H1: μX - μY ≠ Δ`.
+
+Here, `μX` and `μY` are the true population means of samples `X` and `Y`, respectively, and `Δ` is the hypothesized difference in means (typically `0` by default).
+
+
+
+
+
+
+
+## Usage
+
+```javascript
+var dztest2 = require( '@stdlib/stats/strided/dztest2' );
+```
+
+#### dztest2( NX, NY, alternative, alpha, diff, sigmax, x, strideX, sigmay, y, strideY, out )
+
+Computes a two-sample Z-test for double-precision floating-point strided arrays.
+
+```javascript
+var Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+var Float64Array = require( '@stdlib/array/float64' );
+
+var x = new Float64Array( [ 4.0, 4.0, 6.0, 6.0, 5.0 ] );
+var y = new Float64Array( [ 3.0, 3.0, 5.0, 7.0, 7.0 ] );
+
+var results = new Results();
+var out = dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 2.0, y, 1, results );
+// returns {...}
+
+var bool = ( out === results );
+// returns true
+```
+
+The function has the following parameters:
+
+- **NX**: number of indexed elements in `x`.
+- **NY**: number of indexed elements in `y`.
+- **alternative**: [alternative hypothesis][@stdlib/stats/base/ztest/alternatives].
+- **alpha**: significance level.
+- **diff**: difference in means under the null hypothesis.
+- **sigmax**: known standard deviation of `x`.
+- **x**: first input [`Float64Array`][@stdlib/array/float64].
+- **strideX**: stride length for `x`.
+- **sigmay**: known standard deviation of `y`.
+- **y**: second input [`Float64Array`][@stdlib/array/float64].
+- **strideY**: stride length for `y`.
+- **out**: output [results object][@stdlib/stats/base/ztest/two-sample/results/float64].
+
+The `N` and stride parameters determine which elements in the strided arrays are accessed at runtime. For example, to perform a two-sample Z-test over every other element in `x` and `y`,
+
+```javascript
+var Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+var Float64Array = require( '@stdlib/array/float64' );
+
+var x = new Float64Array( [ 4.0, 0.0, 4.0, 0.0, 6.0, 0.0, 6.0, 0.0, 5.0, 0.0 ] );
+var y = new Float64Array( [ 3.0, 0.0, 3.0, 0.0, 5.0, 0.0, 7.0, 0.0, 7.0, 0.0 ] );
+
+var results = new Results();
+var out = dztest2( 5, 5, 'two-sided', 0.05, 0.0, 1.0, x, 2, 2.0, y, 2, results );
+// returns {...}
+
+var bool = ( out === results );
+// returns true
+```
+
+Note that indexing is relative to the first index. To introduce an offset, use [`typed array`][mdn-typed-array] views.
+
+
+
+```javascript
+var Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+var Float64Array = require( '@stdlib/array/float64' );
+
+var x0 = new Float64Array( [ 0.0, 4.0, 4.0, 6.0, 6.0, 5.0 ] );
+var x1 = new Float64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
+
+var y0 = new Float64Array( [ 0.0, 3.0, 3.0, 5.0, 7.0, 7.0 ] );
+var y1 = new Float64Array( y0.buffer, y0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
+
+var results = new Results();
+var out = dztest2( 5, 5, 'two-sided', 0.05, 0.0, 1.0, x1, 1, 2.0, y1, 1, results );
+// returns {...}
+
+var bool = ( out === results );
+// returns true
+```
+
+#### dztest2.ndarray( NX, NY, alternative, alpha, diff, sigmax, x, strideX, offsetX, sigmay, y, strideY, offsetY, out )
+
+Computes a two-sample Z-test for double-precision floating-point strided arrays using alternative indexing semantics.
+
+```javascript
+var Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+var Float64Array = require( '@stdlib/array/float64' );
+
+var x = new Float64Array( [ 4.0, 4.0, 6.0, 6.0, 5.0 ] );
+var y = new Float64Array( [ 3.0, 3.0, 5.0, 7.0, 7.0 ] );
+
+var results = new Results();
+var out = dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 2.0, y, 1, 0, results );
+// returns {...}
+
+var bool = ( out === results );
+// returns true
+```
+
+The function has the following additional parameters:
+
+- **offsetX**: starting index for `x`.
+- **offsetY**: starting index for `y`.
+
+While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, offset parameters support indexing semantics based on starting indices. For example, to perform a two-sample Z-test over every other element in `x` and `y` starting from the second element
+
+```javascript
+var Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+var Float64Array = require( '@stdlib/array/float64' );
+
+var x = new Float64Array( [ 0.0, 4.0, 0.0, 4.0, 0.0, 6.0, 0.0, 6.0, 0.0, 5.0 ] );
+var y = new Float64Array( [ 0.0, 3.0, 0.0, 3.0, 0.0, 5.0, 0.0, 7.0, 0.0, 7.0 ] );
+
+var results = new Results();
+var out = dztest2.ndarray( 5, 5, 'two-sided', 0.05, 0.0, 1.0, x, 2, 1, 2.0, y, 2, 1, results );
+// returns {...}
+
+var bool = ( out === results );
+// returns true
+```
+
+
+
+
+
+
+
+## Notes
+
+- As a general rule of thumb, a Z-test is most reliable when `N >= 50`. For smaller sample sizes or when the standard deviations are unknown, prefer a t-test.
+
+
+
+
+
+
+
+## Examples
+
+
+
+```javascript
+var Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+var normal = require( '@stdlib/random/array/normal' );
+var dztest2 = require( '@stdlib/stats/strided/dztest2' );
+
+var x = normal( 1000, 4.0, 2.0, {
+ 'dtype': 'float64'
+});
+var y = normal( 800, 3.0, 2.0, {
+ 'dtype': 'float64'
+});
+
+var results = new Results();
+var out = dztest2( x.length, y.length, 'two-sided', 0.05, 1.0, 2.0, x, 1, 2.0, y, 1, results );
+// returns {...}
+
+console.log( out.toString() );
+```
+
+
+
+
+
+
+
+* * *
+
+
+
+## C APIs
+
+
+
+
+
+
+
+
+
+
+
+### Usage
+
+```c
+#include "stdlib/stats/strided/dztest2.h"
+```
+
+#### stdlib_strided_dztest2( NX, NY, alternative, alpha, diff, sigmax, \*X, strideX, sigmay, \*Y, strideY, \*results )
+
+Computes a two-sample Z-test for double-precision floating-point strided arrays.
+
+```c
+#include "stdlib/stats/base/ztest/two-sample/results/float64.h"
+#include "stdlib/stats/base/ztest/alternatives.h"
+
+struct stdlib_stats_ztest_two_sample_float64_results results = {
+ .rejected = false,
+ .alpha = 0.0,
+ .alternative = STDLIB_STATS_ZTEST_TWO_SIDED,
+ .pValue = 0.0,
+ .statistic = 0.0,
+ .ci = { 0.0, 0.0 },
+ .nullValue = 0.0,
+ .xmean = 0.0,
+ .ymean = 0.0
+};
+
+const double x[] = { 4.0, 4.0, 6.0, 6.0, 5.0 };
+const double y[] = { 3.0, 3.0, 5.0, 7.0, 7.0 };
+
+stdlib_strided_dztest2( 5, 5, STDLIB_STATS_ZTEST_TWO_SIDED, 0.05, 0.0, 1.0, x, 1, 2.0, y, 1, &results );
+```
+
+The function accepts the following arguments:
+
+- **NX**: `[in] CBLAS_INT` number of indexed elements in `x`.
+- **NY**: `[in] CBLAS_INT` number of indexed elements in `y`.
+- **alternative**: `[in] enum STDLIB_STATS_ZTEST_ALTERNATIVE` [alternative hypothesis][@stdlib/stats/base/ztest/alternatives].
+- **alpha**: `[in] double` significance level.
+- **diff**: `[in] double` difference in means under the null hypothesis.
+- **sigmax** `[in] double` known standard deviation of `x`.
+- **X**: `[in] double*` first input [`Float64Array`][@stdlib/array/float64].
+- **strideX**: `[in] CBLAS_INT` stride length for `X`.
+- **sigmay** `[in] double` known standard deviation of `y`.
+- **Y**: `[in] double*` second input [`Float64Array`][@stdlib/array/float64].
+- **strideY**: `[in] CBLAS_INT` stride length for `Y`.
+- **results**: `[out] struct stdlib_stats_ztest_two_sample_results_float64*` output [results object][@stdlib/stats/base/ztest/two-sample/results/float64].
+
+```c
+void stdlib_strided_dztest2( const CBLAS_INT NX, const CBLAS_INT NY, const enum STDLIB_STATS_ZTEST_ALTERNATIVE alternative, const double alpha, const double diff, const double sigmax, const double *X, const CBLAS_INT strideX, const double sigmay, const double *Y, const CBLAS_INT strideY, struct stdlib_stats_ztest_two_sample_float64_results *results );
+```
+
+#### stdlib_strided_dztest2_ndarray( NX, NY, alternative, alpha, diff, sigmax, \*X, strideX, offsetX, sigmay, \*Y, strideY, offsetY, \*results )
+
+Computes a two-sample Z-test for double-precision floating-point strided arrays using alternative indexing semantics.
+
+```c
+#include "stdlib/stats/base/ztest/two-sample/results/float64.h"
+#include "stdlib/stats/base/ztest/alternatives.h"
+
+struct stdlib_stats_ztest_two_sample_float64_results results = {
+ .rejected = false,
+ .alpha = 0.0,
+ .alternative = STDLIB_STATS_ZTEST_TWO_SIDED,
+ .pValue = 0.0,
+ .statistic = 0.0,
+ .ci = { 0.0, 0.0 },
+ .nullValue = 0.0,
+ .xmean = 0.0,
+ .ymean = 0.0
+};
+
+const double x[] = { 4.0, 4.0, 6.0, 6.0, 5.0 };
+const double y[] = { 3.0, 3.0, 5.0, 7.0, 7.0 };
+
+stdlib_strided_dztest2_ndarray( 5, 5, STDLIB_STATS_ZTEST_TWO_SIDED, 0.05, 0.0, 1.0, x, 1, 0, 2.0, y, 1, 0, &results );
+```
+
+The function accepts the following arguments:
+
+- **NX**: `[in] CBLAS_INT` number of indexed elements in `x`.
+- **NY**: `[in] CBLAS_INT` number of indexed elements in `y`.
+- **alternative**: `[in] enum STDLIB_STATS_ZTEST_ALTERNATIVE` [alternative hypothesis][@stdlib/stats/base/ztest/alternatives].
+- **alpha**: `[in] double` significance level.
+- **diff**: `[in] double` difference in means under the null hypothesis.
+- **sigmax** `[in] double` known standard deviation of `x`.
+- **X**: `[in] double*` first input [`Float64Array`][@stdlib/array/float64].
+- **strideX**: `[in] CBLAS_INT` stride length for `X`.
+- **offsetX**: `[in] CBLAS_INT` starting index for `X`.
+- **sigmay** `[in] double` known standard deviation of `y`.
+- **Y**: `[in] double*` second input [`Float64Array`][@stdlib/array/float64].
+- **strideY**: `[in] CBLAS_INT` stride length for `Y`.
+- **offsetY**: `[in] CBLAS_INT` starting index for `Y`.
+- **results**: `[out] struct stdlib_stats_ztest_two_sample_results_float64*` output [results object][@stdlib/stats/base/ztest/two-sample/results/float64].
+
+```c
+void stdlib_strided_dztest2_ndarray( const CBLAS_INT NX, const CBLAS_INT NY, const enum STDLIB_STATS_ZTEST_ALTERNATIVE alternative, const double alpha, const double diff, const double sigmax, const double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, const double sigmay, const double *Y, const CBLAS_INT strideY, const CBLAS_INT offsetY, struct stdlib_stats_ztest_two_sample_float64_results *results );
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+### Examples
+
+```c
+#include "stdlib/stats/strided/dztest2.h"
+#include "stdlib/stats/base/ztest/two-sample/results/float64.h"
+#include "stdlib/stats/base/ztest/alternatives.h"
+#include
+#include
+
+int main( void ) {
+ // Create a strided arrays:
+ const double x[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 };
+ const double y[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 };
+
+ // Specify the number of elements:
+ const int NX = 4;
+ const int NY = 4;
+
+ // Specify the stride lengths:
+ const int strideX = 2;
+ const int strideY = 2;
+
+ // Initialize a results object:
+ struct stdlib_stats_ztest_two_sample_float64_results results = {
+ .rejected = false,
+ .alpha = 0.0,
+ .alternative = STDLIB_STATS_ZTEST_TWO_SIDED,
+ .pValue = 0.0,
+ .statistic = 0.0,
+ .ci = { 0.0, 0.0 },
+ .nullValue = 0.0,
+ .xmean = 0.0,
+ .ymean = 0.0
+ };
+
+ // Compute a Z-test:
+ stdlib_strided_dztest2( NX, NY, STDLIB_STATS_ZTEST_TWO_SIDED, 0.05, 5.0, 3.0, x, strideX, 3.0, y, strideY, &results );
+
+ // Print the result:
+ printf( "Statistic: %lf\n", results.statistic );
+ printf( "Null hypothesis was %s\n", ( results.rejected ) ? "rejected" : "not rejected" );
+}
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+[variance]: https://en.wikipedia.org/wiki/Variance
+
+[@stdlib/array/float64]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/float64
+
+[@stdlib/stats/base/ztest/alternatives]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/stats/base/ztest/alternatives
+
+[@stdlib/stats/base/ztest/two-sample/results/float64]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/stats/base/ztest/two-sample/results/float64
+
+[mdn-typed-array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray
+
+
+
+
diff --git a/lib/node_modules/@stdlib/stats/strided/dztest2/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/strided/dztest2/benchmark/benchmark.js
new file mode 100644
index 000000000000..d60bb28b694c
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/dztest2/benchmark/benchmark.js
@@ -0,0 +1,104 @@
+/**
+* @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 normal = require( '@stdlib/random/array/normal' );
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+var pkg = require( './../package.json' ).name;
+var dztest2 = require( './../lib/dztest2.js' );
+
+
+// VARIABLES //
+
+var options = {
+ 'dtype': 'float64'
+};
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - array length
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len ) {
+ var results;
+ var x;
+ var y;
+
+ results = new Results();
+ x = normal( len, 0.0, 1.0, options );
+ y = normal( len, 0.0, 1.0, options );
+
+ return benchmark;
+
+ function benchmark( b ) {
+ var out;
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ out = dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, results );
+ if ( isnan( out.statistic ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( out.statistic ) ) {
+ 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( pkg+':len='+len, f );
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/stats/strided/dztest2/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/stats/strided/dztest2/benchmark/benchmark.native.js
new file mode 100644
index 000000000000..86384ace550f
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/dztest2/benchmark/benchmark.native.js
@@ -0,0 +1,109 @@
+/**
+* @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 resolve = require( 'path' ).resolve;
+var bench = require( '@stdlib/bench' );
+var normal = require( '@stdlib/random/array/normal' );
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var tryRequire = require( '@stdlib/utils/try-require' );
+var Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+var pkg = require( './../package.json' ).name;
+
+
+// VARIABLES //
+
+var dztest2 = tryRequire( resolve( __dirname, './../lib/dztest2.native.js' ) );
+var opts = {
+ 'skip': ( dztest2 instanceof Error )
+};
+var options = {
+ 'dtype': 'float64'
+};
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - array length
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len ) {
+ var results;
+ var x;
+ var y;
+
+ results = new Results();
+ x = normal( len, 0.0, 1.0, options );
+ y = normal( len, 0.0, 1.0, options );
+
+ return benchmark;
+
+ function benchmark( b ) {
+ var out;
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ out = dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, results );
+ if ( isnan( out.statistic ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( out.statistic ) ) {
+ 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( pkg+'::native:len='+len, opts, f );
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/stats/strided/dztest2/benchmark/benchmark.ndarray.js b/lib/node_modules/@stdlib/stats/strided/dztest2/benchmark/benchmark.ndarray.js
new file mode 100644
index 000000000000..3914c077955e
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/dztest2/benchmark/benchmark.ndarray.js
@@ -0,0 +1,104 @@
+/**
+* @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 normal = require( '@stdlib/random/array/normal' );
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+var pkg = require( './../package.json' ).name;
+var dztest2 = require( './../lib/ndarray.js' );
+
+
+// VARIABLES //
+
+var options = {
+ 'dtype': 'float64'
+};
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - array length
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len ) {
+ var results;
+ var x;
+ var y;
+
+ results = new Results();
+ x = normal( len, 0.0, 1.0, options );
+ y = normal( len, 0.0, 1.0, options );
+
+ return benchmark;
+
+ function benchmark( b ) {
+ var out;
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ out = dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, results );
+ if ( isnan( out.statistic ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( out.statistic ) ) {
+ 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( pkg+':len='+len, f );
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/stats/strided/dztest2/benchmark/benchmark.ndarray.native.js b/lib/node_modules/@stdlib/stats/strided/dztest2/benchmark/benchmark.ndarray.native.js
new file mode 100644
index 000000000000..55f44518ea2e
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/dztest2/benchmark/benchmark.ndarray.native.js
@@ -0,0 +1,109 @@
+/**
+* @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 resolve = require( 'path' ).resolve;
+var bench = require( '@stdlib/bench' );
+var normal = require( '@stdlib/random/array/normal' );
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var tryRequire = require( '@stdlib/utils/try-require' );
+var Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+var pkg = require( './../package.json' ).name;
+
+
+// VARIABLES //
+
+var dztest2 = tryRequire( resolve( __dirname, './../lib/ndarray.native.js' ) );
+var opts = {
+ 'skip': ( dztest2 instanceof Error )
+};
+var options = {
+ 'dtype': 'float64'
+};
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - array length
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len ) {
+ var results;
+ var x;
+ var y;
+
+ results = new Results();
+ x = normal( len, 0.0, 1.0, options );
+ y = normal( len, 0.0, 1.0, options );
+
+ return benchmark;
+
+ function benchmark( b ) {
+ var out;
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ out = dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, results );
+ if ( isnan( out.statistic ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( out.statistic ) ) {
+ 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( pkg+'::native:ndarray:len='+len, opts, f );
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/stats/strided/dztest2/benchmark/c/Makefile b/lib/node_modules/@stdlib/stats/strided/dztest2/benchmark/c/Makefile
new file mode 100644
index 000000000000..cce2c865d7ad
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/dztest2/benchmark/c/Makefile
@@ -0,0 +1,146 @@
+#/
+# @license Apache-2.0
+#
+# Copyright (c) 2025 The Stdlib Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#/
+
+# VARIABLES #
+
+ifndef VERBOSE
+ QUIET := @
+else
+ QUIET :=
+endif
+
+# Determine the OS ([1][1], [2][2]).
+#
+# [1]: https://en.wikipedia.org/wiki/Uname#Examples
+# [2]: http://stackoverflow.com/a/27776822/2225624
+OS ?= $(shell uname)
+ifneq (, $(findstring MINGW,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring MSYS,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring CYGWIN,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring Windows_NT,$(OS)))
+ OS := WINNT
+endif
+endif
+endif
+endif
+
+# Define the program used for compiling C source files:
+ifdef C_COMPILER
+ CC := $(C_COMPILER)
+else
+ CC := gcc
+endif
+
+# Define the command-line options when compiling C files:
+CFLAGS ?= \
+ -std=c99 \
+ -O3 \
+ -Wall \
+ -pedantic
+
+# Determine whether to generate position independent code ([1][1], [2][2]).
+#
+# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options
+# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option
+ifeq ($(OS), WINNT)
+ fPIC ?=
+else
+ fPIC ?= -fPIC
+endif
+
+# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`):
+INCLUDE ?=
+
+# List of source files:
+SOURCE_FILES ?=
+
+# List of libraries (e.g., `-lopenblas -lpthread`):
+LIBRARIES ?=
+
+# List of library paths (e.g., `-L /foo/bar -L /beep/boop`):
+LIBPATH ?=
+
+# List of C targets:
+c_targets := benchmark.length.out
+
+
+# RULES #
+
+#/
+# Compiles source files.
+#
+# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`)
+# @param {string} [CFLAGS] - C compiler options
+# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`)
+# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`)
+# @param {string} [SOURCE_FILES] - list of source files
+# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`)
+# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`)
+#
+# @example
+# make
+#
+# @example
+# make all
+#/
+all: $(c_targets)
+
+.PHONY: all
+
+#/
+# Compiles C source files.
+#
+# @private
+# @param {string} CC - C compiler (e.g., `gcc`)
+# @param {string} CFLAGS - C compiler options
+# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`)
+# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`)
+# @param {string} SOURCE_FILES - list of source files
+# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`)
+# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`)
+#/
+$(c_targets): %.out: %.c
+ $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES)
+
+#/
+# Runs compiled benchmarks.
+#
+# @example
+# make run
+#/
+run: $(c_targets)
+ $(QUIET) ./$<
+
+.PHONY: run
+
+#/
+# Removes generated files.
+#
+# @example
+# make clean
+#/
+clean:
+ $(QUIET) -rm -f *.o *.out
+
+.PHONY: clean
diff --git a/lib/node_modules/@stdlib/stats/strided/dztest2/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dztest2/benchmark/c/benchmark.length.c
new file mode 100644
index 000000000000..2aa390754091
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/dztest2/benchmark/c/benchmark.length.c
@@ -0,0 +1,225 @@
+/**
+* @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.
+*/
+
+#include "stdlib/stats/strided/dztest2.h"
+#include "stdlib/stats/base/ztest/two-sample/results/float64.h"
+#include "stdlib/stats/base/ztest/alternatives.h"
+#include
+#include
+#include
+#include
+#include
+
+#define NAME "dztest2"
+#define ITERATIONS 1000000
+#define REPEATS 3
+#define MIN 1
+#define MAX 6
+
+/**
+* Prints the TAP version.
+*/
+static void print_version( void ) {
+ printf( "TAP version 13\n" );
+}
+
+/**
+* Prints the TAP summary.
+*
+* @param total total number of tests
+* @param passing total number of passing tests
+*/
+static void print_summary( int total, int passing ) {
+ printf( "#\n" );
+ printf( "1..%d\n", total ); // TAP plan
+ printf( "# total %d\n", total );
+ printf( "# pass %d\n", passing );
+ printf( "#\n" );
+ printf( "# ok\n" );
+}
+
+/**
+* Prints benchmarks results.
+*
+* @param iterations number of iterations
+* @param elapsed elapsed time in seconds
+*/
+static void print_results( int iterations, double elapsed ) {
+ double rate = (double)iterations / elapsed;
+ printf( " ---\n" );
+ printf( " iterations: %d\n", iterations );
+ printf( " elapsed: %0.9f\n", elapsed );
+ printf( " rate: %0.9f\n", rate );
+ printf( " ...\n" );
+}
+
+/**
+* Returns a clock time.
+*
+* @return clock time
+*/
+static double tic( void ) {
+ struct timeval now;
+ gettimeofday( &now, NULL );
+ return (double)now.tv_sec + (double)now.tv_usec/1.0e6;
+}
+
+/**
+* Generates a random number on the interval [min,max).
+*
+* @param min minimum value (inclusive)
+* @param max maximum value (exclusive)
+* @return random number
+*/
+static double random_uniform( const double min, const double max ) {
+ double v = (double)rand() / ( (double)RAND_MAX + 1.0 );
+ return min + ( v*(max-min) );
+}
+
+/**
+* Runs a benchmark.
+*
+* @param iterations number of iterations
+* @param len array length
+* @return elapsed time in seconds
+*/
+static double benchmark1( int iterations, int len ) {
+ double elapsed;
+ double x[ len ];
+ double y[ len ];
+ double t;
+ int i;
+
+ struct stdlib_stats_ztest_two_sample_float64_results results = {
+ .rejected = false,
+ .alpha = 0.0,
+ .alternative = STDLIB_STATS_ZTEST_TWO_SIDED,
+ .pValue = 0.0,
+ .statistic = 0.0,
+ .ci = { 0.0, 0.0 },
+ .nullValue = 0.0,
+ .xmean = 0.0,
+ .ymean = 0.0
+ };
+
+ for ( i = 0; i < len; i++ ) {
+ x[ i ] = random_uniform( -5.0, 5.0 );
+ y[ i ] = random_uniform( -5.0, 5.0 );
+ }
+ t = tic();
+ for ( i = 0; i < iterations; i++ ) {
+ // cppcheck-suppress uninitvar
+ stdlib_strided_dztest2( len, len, STDLIB_STATS_ZTEST_TWO_SIDED, 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, &results );
+ if ( results.statistic != results.statistic ) {
+ printf( "should not return NaN\n" );
+ break;
+ }
+ }
+ elapsed = tic() - t;
+ if ( results.statistic != results.statistic ) {
+ printf( "should not return NaN\n" );
+ }
+ return elapsed;
+}
+
+/**
+* Runs a benchmark.
+*
+* @param iterations number of iterations
+* @param len array length
+* @return elapsed time in seconds
+*/
+static double benchmark2( int iterations, int len ) {
+ double elapsed;
+ double x[ len ];
+ double y[ len ];
+ double t;
+ int i;
+
+ struct stdlib_stats_ztest_two_sample_float64_results results = {
+ .rejected = false,
+ .alpha = 0.0,
+ .alternative = STDLIB_STATS_ZTEST_TWO_SIDED,
+ .pValue = 0.0,
+ .statistic = 0.0,
+ .ci = { 0.0, 0.0 },
+ .nullValue = 0.0,
+ .xmean = 0.0,
+ .ymean = 0.0
+ };
+
+ for ( i = 0; i < len; i++ ) {
+ x[ i ] = random_uniform( -5.0, 5.0 );
+ y[ i ] = random_uniform( -5.0, 5.0 );
+ }
+ t = tic();
+ for ( i = 0; i < iterations; i++ ) {
+ // cppcheck-suppress uninitvar
+ stdlib_strided_dztest2_ndarray( len, len, STDLIB_STATS_ZTEST_TWO_SIDED, 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, &results );
+ if ( results.statistic != results.statistic ) {
+ printf( "should not return NaN\n" );
+ break;
+ }
+ }
+ elapsed = tic() - t;
+ if ( results.statistic != results.statistic ) {
+ printf( "should not return NaN\n" );
+ }
+ return elapsed;
+}
+
+/**
+* Main execution sequence.
+*/
+int main( void ) {
+ double elapsed;
+ int count;
+ int iter;
+ int len;
+ int i;
+ int j;
+
+ // Use the current time to seed the random number generator:
+ srand( time( NULL ) );
+
+ print_version();
+ count = 0;
+ for ( i = MIN; i <= MAX; i++ ) {
+ len = pow( 10, i );
+ iter = ITERATIONS / pow( 10, i-1 );
+ for ( j = 0; j < REPEATS; j++ ) {
+ count += 1;
+ printf( "# c::%s:len=%d\n", NAME, len );
+ elapsed = benchmark1( iter, len );
+ print_results( iter, elapsed );
+ printf( "ok %d benchmark finished\n", count );
+ }
+ }
+ for ( i = MIN; i <= MAX; i++ ) {
+ len = pow( 10, i );
+ iter = ITERATIONS / pow( 10, i-1 );
+ for ( j = 0; j < REPEATS; j++ ) {
+ count += 1;
+ printf( "# c::%s:ndarray:len=%d\n", NAME, len );
+ elapsed = benchmark2( iter, len );
+ print_results( iter, elapsed );
+ printf( "ok %d benchmark finished\n", count );
+ }
+ }
+ print_summary( count, count );
+}
diff --git a/lib/node_modules/@stdlib/stats/strided/dztest2/binding.gyp b/lib/node_modules/@stdlib/stats/strided/dztest2/binding.gyp
new file mode 100644
index 000000000000..68a1ca11d160
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/dztest2/binding.gyp
@@ -0,0 +1,170 @@
+# @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.
+
+# A `.gyp` file for building a Node.js native add-on.
+#
+# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md
+# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md
+{
+ # List of files to include in this file:
+ 'includes': [
+ './include.gypi',
+ ],
+
+ # Define variables to be used throughout the configuration for all targets:
+ 'variables': {
+ # Target name should match the add-on export name:
+ 'addon_target_name%': 'addon',
+
+ # Set variables based on the host OS:
+ 'conditions': [
+ [
+ 'OS=="win"',
+ {
+ # Define the object file suffix:
+ 'obj': 'obj',
+ },
+ {
+ # Define the object file suffix:
+ 'obj': 'o',
+ }
+ ], # end condition (OS=="win")
+ ], # end conditions
+ }, # end variables
+
+ # Define compile targets:
+ 'targets': [
+
+ # Target to generate an add-on:
+ {
+ # The target name should match the add-on export name:
+ 'target_name': '<(addon_target_name)',
+
+ # Define dependencies:
+ 'dependencies': [],
+
+ # Define directories which contain relevant include headers:
+ 'include_dirs': [
+ # Local include directory:
+ '<@(include_dirs)',
+ ],
+
+ # List of source files:
+ 'sources': [
+ '<@(src_files)',
+ ],
+
+ # Settings which should be applied when a target's object files are used as linker input:
+ 'link_settings': {
+ # Define libraries:
+ 'libraries': [
+ '<@(libraries)',
+ ],
+
+ # Define library directories:
+ 'library_dirs': [
+ '<@(library_dirs)',
+ ],
+ },
+
+ # C/C++ compiler flags:
+ 'cflags': [
+ # Enable commonly used warning options:
+ '-Wall',
+
+ # Aggressive optimization:
+ '-O3',
+ ],
+
+ # C specific compiler flags:
+ 'cflags_c': [
+ # Specify the C standard to which a program is expected to conform:
+ '-std=c99',
+ ],
+
+ # C++ specific compiler flags:
+ 'cflags_cpp': [
+ # Specify the C++ standard to which a program is expected to conform:
+ '-std=c++11',
+ ],
+
+ # Linker flags:
+ 'ldflags': [],
+
+ # Apply conditions based on the host OS:
+ 'conditions': [
+ [
+ 'OS=="mac"',
+ {
+ # Linker flags:
+ 'ldflags': [
+ '-undefined dynamic_lookup',
+ '-Wl,-no-pie',
+ '-Wl,-search_paths_first',
+ ],
+ },
+ ], # end condition (OS=="mac")
+ [
+ 'OS!="win"',
+ {
+ # C/C++ flags:
+ 'cflags': [
+ # Generate platform-independent code:
+ '-fPIC',
+ ],
+ },
+ ], # end condition (OS!="win")
+ ], # end conditions
+ }, # end target <(addon_target_name)
+
+ # Target to copy a generated add-on to a standard location:
+ {
+ 'target_name': 'copy_addon',
+
+ # Declare that the output of this target is not linked:
+ 'type': 'none',
+
+ # Define dependencies:
+ 'dependencies': [
+ # Require that the add-on be generated before building this target:
+ '<(addon_target_name)',
+ ],
+
+ # Define a list of actions:
+ 'actions': [
+ {
+ 'action_name': 'copy_addon',
+ 'message': 'Copying addon...',
+
+ # Explicitly list the inputs in the command-line invocation below:
+ 'inputs': [],
+
+ # Declare the expected outputs:
+ 'outputs': [
+ '<(addon_output_dir)/<(addon_target_name).node',
+ ],
+
+ # Define the command-line invocation:
+ 'action': [
+ 'cp',
+ '<(PRODUCT_DIR)/<(addon_target_name).node',
+ '<(addon_output_dir)/<(addon_target_name).node',
+ ],
+ },
+ ], # end actions
+ }, # end target copy_addon
+ ], # end targets
+}
diff --git a/lib/node_modules/@stdlib/stats/strided/dztest2/examples/c/Makefile b/lib/node_modules/@stdlib/stats/strided/dztest2/examples/c/Makefile
new file mode 100644
index 000000000000..25ced822f96a
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/dztest2/examples/c/Makefile
@@ -0,0 +1,146 @@
+#/
+# @license Apache-2.0
+#
+# Copyright (c) 2025 The Stdlib Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#/
+
+# VARIABLES #
+
+ifndef VERBOSE
+ QUIET := @
+else
+ QUIET :=
+endif
+
+# Determine the OS ([1][1], [2][2]).
+#
+# [1]: https://en.wikipedia.org/wiki/Uname#Examples
+# [2]: http://stackoverflow.com/a/27776822/2225624
+OS ?= $(shell uname)
+ifneq (, $(findstring MINGW,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring MSYS,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring CYGWIN,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring Windows_NT,$(OS)))
+ OS := WINNT
+endif
+endif
+endif
+endif
+
+# Define the program used for compiling C source files:
+ifdef C_COMPILER
+ CC := $(C_COMPILER)
+else
+ CC := gcc
+endif
+
+# Define the command-line options when compiling C files:
+CFLAGS ?= \
+ -std=c99 \
+ -O3 \
+ -Wall \
+ -pedantic
+
+# Determine whether to generate position independent code ([1][1], [2][2]).
+#
+# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options
+# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option
+ifeq ($(OS), WINNT)
+ fPIC ?=
+else
+ fPIC ?= -fPIC
+endif
+
+# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`):
+INCLUDE ?=
+
+# List of source files:
+SOURCE_FILES ?=
+
+# List of libraries (e.g., `-lopenblas -lpthread`):
+LIBRARIES ?=
+
+# List of library paths (e.g., `-L /foo/bar -L /beep/boop`):
+LIBPATH ?=
+
+# List of C targets:
+c_targets := example.out
+
+
+# RULES #
+
+#/
+# Compiles source files.
+#
+# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`)
+# @param {string} [CFLAGS] - C compiler options
+# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`)
+# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`)
+# @param {string} [SOURCE_FILES] - list of source files
+# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`)
+# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`)
+#
+# @example
+# make
+#
+# @example
+# make all
+#/
+all: $(c_targets)
+
+.PHONY: all
+
+#/
+# Compiles C source files.
+#
+# @private
+# @param {string} CC - C compiler (e.g., `gcc`)
+# @param {string} CFLAGS - C compiler options
+# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`)
+# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`)
+# @param {string} SOURCE_FILES - list of source files
+# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`)
+# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`)
+#/
+$(c_targets): %.out: %.c
+ $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES)
+
+#/
+# Runs compiled examples.
+#
+# @example
+# make run
+#/
+run: $(c_targets)
+ $(QUIET) ./$<
+
+.PHONY: run
+
+#/
+# Removes generated files.
+#
+# @example
+# make clean
+#/
+clean:
+ $(QUIET) -rm -f *.o *.out
+
+.PHONY: clean
diff --git a/lib/node_modules/@stdlib/stats/strided/dztest2/examples/c/example.c b/lib/node_modules/@stdlib/stats/strided/dztest2/examples/c/example.c
new file mode 100644
index 000000000000..003d039e7a96
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/dztest2/examples/c/example.c
@@ -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.
+*/
+
+#include "stdlib/stats/strided/dztest2.h"
+#include "stdlib/stats/base/ztest/two-sample/results/float64.h"
+#include "stdlib/stats/base/ztest/alternatives.h"
+#include
+#include
+
+int main( void ) {
+ // Create a strided arrays:
+ const double x[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 };
+ const double y[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 };
+
+ // Specify the number of elements:
+ const int NX = 4;
+ const int NY = 4;
+
+ // Specify the stride lengths:
+ const int strideX = 2;
+ const int strideY = 2;
+
+ // Initialize a results object:
+ struct stdlib_stats_ztest_two_sample_float64_results results = {
+ .rejected = false,
+ .alpha = 0.0,
+ .alternative = STDLIB_STATS_ZTEST_TWO_SIDED,
+ .pValue = 0.0,
+ .statistic = 0.0,
+ .ci = { 0.0, 0.0 },
+ .nullValue = 0.0,
+ .xmean = 0.0,
+ .ymean = 0.0
+ };
+
+ // Compute a Z-test:
+ stdlib_strided_dztest2( NX, NY, STDLIB_STATS_ZTEST_TWO_SIDED, 0.05, 5.0, 3.0, x, strideX, 3.0, y, strideY, &results );
+
+ // Print the result:
+ printf( "Statistic: %lf\n", results.statistic );
+ printf( "Null hypothesis was %s\n", ( results.rejected ) ? "rejected" : "not rejected" );
+}
diff --git a/lib/node_modules/@stdlib/stats/strided/dztest2/examples/index.js b/lib/node_modules/@stdlib/stats/strided/dztest2/examples/index.js
new file mode 100644
index 000000000000..0a87ce821511
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/dztest2/examples/index.js
@@ -0,0 +1,36 @@
+/**
+* @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 Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+var normal = require( '@stdlib/random/array/normal' );
+var dztest2 = require( './../lib' );
+
+var x = normal( 1000, 4.0, 2.0, {
+ 'dtype': 'float64'
+});
+var y = normal( 800, 3.0, 2.0, {
+ 'dtype': 'float64'
+});
+
+var results = new Results();
+var out = dztest2( x.length, y.length, 'two-sided', 0.05, 1.0, 2.0, x, 1, 2.0, y, 1, results );
+// returns {...}
+
+console.log( out.toString() );
diff --git a/lib/node_modules/@stdlib/stats/strided/dztest2/include.gypi b/lib/node_modules/@stdlib/stats/strided/dztest2/include.gypi
new file mode 100644
index 000000000000..ecfaf82a3279
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/dztest2/include.gypi
@@ -0,0 +1,53 @@
+# @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.
+
+# A GYP include file for building a Node.js native add-on.
+#
+# Main documentation:
+#
+# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md
+# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md
+{
+ # Define variables to be used throughout the configuration for all targets:
+ 'variables': {
+ # Source directory:
+ 'src_dir': './src',
+
+ # Include directories:
+ 'include_dirs': [
+ ' 1.0
+ ) {
+ WORKSPACE[ 0 ] = NaN;
+ WORKSPACE[ 1 ] = NaN;
+ out.rejected = false;
+ out.alternative = alt;
+ out.alpha = NaN;
+ out.pValue = NaN;
+ out.statistic = NaN;
+ out.ci = WORKSPACE;
+ out.nullValue = NaN;
+ out.xmean = NaN;
+ out.ymean = NaN;
+ return out;
+ }
+ // Compute the standard error of the mean:
+ xvar = sigmax * sigmax;
+ yvar = sigmay * sigmay;
+ stderr = sqrt( ( xvar / NX ) + ( yvar / NY ) );
+
+ // Compute the arithmetic means of the input arrays:
+ xmean = dmean( NX, x, strideX, offsetX );
+ ymean = dmean( NY, y, strideY, offsetY );
+
+ // Compute the test statistic (i.e., the z-score, which is the standardized difference between the sample means of x and y, adjusted by the hypothesized difference, in units of the standard error):
+ stat = ( xmean - ymean - diff ) / stderr;
+
+ // Compute the p-value and confidence interval...
+ if ( alt === 'less' ) {
+ pValue = normalCDF( stat );
+ q = normalQuantile( 1.0 - alpha );
+ WORKSPACE[ 0 ] = NINF;
+ WORKSPACE[ 1 ] = diff + ( ( stat + q ) * stderr );
+ } else if ( alt === 'greater' ) {
+ pValue = 1.0 - normalCDF( stat );
+ q = normalQuantile( 1.0 - alpha );
+ WORKSPACE[ 0 ] = diff + ( ( stat - q ) * stderr );
+ WORKSPACE[ 1 ] = PINF;
+ } else { // alt == 'two-sided'
+ pValue = 2.0 * normalCDF( -abs( stat ) );
+ q = normalQuantile( 1.0 - ( alpha / 2.0 ) );
+ WORKSPACE[ 0 ] = diff + ( ( stat - q ) * stderr );
+ WORKSPACE[ 1 ] = diff + ( ( stat + q ) * stderr );
+ }
+ // Return test results:
+ out.rejected = ( pValue <= alpha );
+ out.alpha = alpha;
+ out.pValue = pValue;
+ out.statistic = stat;
+ out.ci = WORKSPACE;
+ out.alternative = alt;
+ out.nullValue = diff;
+ out.xmean = xmean;
+ out.ymean = ymean;
+ return out;
+}
+
+
+// EXPORTS //
+
+module.exports = dztest2;
diff --git a/lib/node_modules/@stdlib/stats/strided/dztest2/lib/ndarray.native.js b/lib/node_modules/@stdlib/stats/strided/dztest2/lib/ndarray.native.js
new file mode 100644
index 000000000000..6817ea75daf5
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/dztest2/lib/ndarray.native.js
@@ -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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var resolveEnum = require( '@stdlib/stats/base/ztest/alternative-resolve-enum' );
+var addon = require( './../src/addon.node' );
+
+
+// MAIN //
+
+/**
+* Computes a two-sample Z-test for double-precision floating-point strided arrays using alternative indexing semantics.
+*
+* @param {PositiveInteger} NX - number of indexed elements in `x`
+* @param {PositiveInteger} NY - number of indexed elements in `y`
+* @param {(integer|string)} alternative - alternative hypothesis
+* @param {number} alpha - significance level
+* @param {number} diff - difference in means under the null hypothesis
+* @param {PositiveNumber} sigmax - known standard deviation of `x`
+* @param {Float64Array} x - first input array
+* @param {integer} strideX - stride length for `x`
+* @param {NonNegativeInteger} offsetX - starting index for `x`
+* @param {PositiveNumber} sigmay - known standard deviation of `y`
+* @param {Float64Array} y - second input array
+* @param {integer} strideY - stride length for `y`
+* @param {NonNegativeInteger} offsetY - starting index for `y`
+* @param {Object} out - output results object
+* @returns {Object} results object
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+* var Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+*
+* var x = new Float64Array( [ 4.0, 4.0, 6.0, 6.0, 5.0 ] );
+* var y = new Float64Array( [ 3.0, 3.0, 5.0, 7.0, 7.0 ] );
+*
+* var results = new Results();
+* var out = dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 2.0, y, 1, 0, results );
+* // returns {...}
+*
+* var bool = ( out === results );
+* // returns true
+*/
+function dztest2( NX, NY, alternative, alpha, diff, sigmax, x, strideX, offsetX, sigmay, y, strideY, offsetY, out ) { // eslint-disable-line max-len, max-params
+ addon.ndarray( NX, NY, resolveEnum( alternative ), alpha, diff, sigmax, x, strideX, offsetX, sigmay, y, strideY, offsetY, out.toDataView() ); // eslint-disable-line max-len
+ return out;
+}
+
+
+// EXPORTS //
+
+module.exports = dztest2;
diff --git a/lib/node_modules/@stdlib/stats/strided/dztest2/manifest.json b/lib/node_modules/@stdlib/stats/strided/dztest2/manifest.json
new file mode 100644
index 000000000000..85f7b7c8b9bc
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/dztest2/manifest.json
@@ -0,0 +1,141 @@
+{
+ "options": {
+ "task": "build",
+ "wasm": false
+ },
+ "fields": [
+ {
+ "field": "src",
+ "resolve": true,
+ "relative": true
+ },
+ {
+ "field": "include",
+ "resolve": true,
+ "relative": true
+ },
+ {
+ "field": "libraries",
+ "resolve": false,
+ "relative": false
+ },
+ {
+ "field": "libpath",
+ "resolve": true,
+ "relative": false
+ }
+ ],
+ "confs": [
+ {
+ "task": "build",
+ "wasm": false,
+ "src": [
+ "./src/main.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/napi/export",
+ "@stdlib/napi/argv",
+ "@stdlib/napi/argv-int64",
+ "@stdlib/napi/argv-int32",
+ "@stdlib/napi/argv-double",
+ "@stdlib/napi/argv-dataview-cast",
+ "@stdlib/napi/argv-strided-float64array",
+ "@stdlib/blas/base/shared",
+ "@stdlib/strided/base/stride2offset",
+ "@stdlib/math/base/assert/is-nan",
+ "@stdlib/math/base/special/sqrt",
+ "@stdlib/math/base/special/abs",
+ "@stdlib/stats/strided/dmean",
+ "@stdlib/stats/base/dists/normal/cdf",
+ "@stdlib/stats/base/dists/normal/quantile",
+ "@stdlib/stats/base/ztest/alternatives",
+ "@stdlib/stats/base/ztest/two-sample/results/float64",
+ "@stdlib/constants/float64/pinf",
+ "@stdlib/constants/float64/ninf"
+ ]
+ },
+ {
+ "task": "benchmark",
+ "wasm": false,
+ "src": [
+ "./src/main.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/strided/base/stride2offset",
+ "@stdlib/math/base/assert/is-nan",
+ "@stdlib/math/base/special/sqrt",
+ "@stdlib/math/base/special/abs",
+ "@stdlib/stats/strided/dmean",
+ "@stdlib/stats/base/dists/normal/cdf",
+ "@stdlib/stats/base/dists/normal/quantile",
+ "@stdlib/stats/base/ztest/alternatives",
+ "@stdlib/stats/base/ztest/two-sample/results/float64",
+ "@stdlib/constants/float64/pinf",
+ "@stdlib/constants/float64/ninf"
+ ]
+ },
+ {
+ "task": "examples",
+ "wasm": false,
+ "src": [
+ "./src/main.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/strided/base/stride2offset",
+ "@stdlib/math/base/assert/is-nan",
+ "@stdlib/math/base/special/sqrt",
+ "@stdlib/math/base/special/abs",
+ "@stdlib/stats/strided/dmean",
+ "@stdlib/stats/base/dists/normal/cdf",
+ "@stdlib/stats/base/dists/normal/quantile",
+ "@stdlib/stats/base/ztest/alternatives",
+ "@stdlib/stats/base/ztest/two-sample/results/float64",
+ "@stdlib/constants/float64/pinf",
+ "@stdlib/constants/float64/ninf"
+ ]
+ },
+ {
+ "task": "",
+ "wasm": true,
+ "src": [
+ "./src/main.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/strided/base/stride2offset",
+ "@stdlib/math/base/assert/is-nan",
+ "@stdlib/math/base/special/sqrt",
+ "@stdlib/math/base/special/abs",
+ "@stdlib/stats/strided/dmean",
+ "@stdlib/stats/base/dists/normal/cdf",
+ "@stdlib/stats/base/dists/normal/quantile",
+ "@stdlib/stats/base/ztest/alternatives",
+ "@stdlib/stats/base/ztest/two-sample/results/float64",
+ "@stdlib/constants/float64/pinf",
+ "@stdlib/constants/float64/ninf"
+ ]
+ }
+ ]
+}
diff --git a/lib/node_modules/@stdlib/stats/strided/dztest2/package.json b/lib/node_modules/@stdlib/stats/strided/dztest2/package.json
new file mode 100644
index 000000000000..84bb88348b8f
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/dztest2/package.json
@@ -0,0 +1,76 @@
+{
+ "name": "@stdlib/stats/strided/dztest2",
+ "version": "0.0.0",
+ "description": "Compute a two-sample Z-test for double-precision floating-point strided arrays.",
+ "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",
+ "browser": "./lib/main.js",
+ "gypfile": true,
+ "directories": {
+ "benchmark": "./benchmark",
+ "doc": "./docs",
+ "example": "./examples",
+ "include": "./include",
+ "lib": "./lib",
+ "src": "./src",
+ "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",
+ "strided",
+ "strided array",
+ "typed",
+ "array",
+ "float64",
+ "double",
+ "float64array",
+ "ztest",
+ "z-test",
+ "hypothesis",
+ "testing",
+ "normality"
+ ],
+ "__stdlib__": {}
+}
diff --git a/lib/node_modules/@stdlib/stats/strided/dztest2/src/Makefile b/lib/node_modules/@stdlib/stats/strided/dztest2/src/Makefile
new file mode 100644
index 000000000000..7733b6180cb4
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/dztest2/src/Makefile
@@ -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.
+#/
+
+# VARIABLES #
+
+ifndef VERBOSE
+ QUIET := @
+else
+ QUIET :=
+endif
+
+# Determine the OS ([1][1], [2][2]).
+#
+# [1]: https://en.wikipedia.org/wiki/Uname#Examples
+# [2]: http://stackoverflow.com/a/27776822/2225624
+OS ?= $(shell uname)
+ifneq (, $(findstring MINGW,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring MSYS,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring CYGWIN,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring Windows_NT,$(OS)))
+ OS := WINNT
+endif
+endif
+endif
+endif
+
+
+# RULES #
+
+#/
+# Removes generated files for building an add-on.
+#
+# @example
+# make clean-addon
+#/
+clean-addon:
+ $(QUIET) -rm -f *.o *.node
+
+.PHONY: clean-addon
+
+#/
+# Removes generated files.
+#
+# @example
+# make clean
+#/
+clean: clean-addon
+
+.PHONY: clean
diff --git a/lib/node_modules/@stdlib/stats/strided/dztest2/src/addon.c b/lib/node_modules/@stdlib/stats/strided/dztest2/src/addon.c
new file mode 100644
index 000000000000..4c6824d0de1a
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/dztest2/src/addon.c
@@ -0,0 +1,83 @@
+/**
+* @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.
+*/
+
+#include "stdlib/stats/strided/dztest2.h"
+#include "stdlib/stats/base/ztest/two-sample/results/float64.h"
+#include "stdlib/blas/base/shared.h"
+#include "stdlib/napi/export.h"
+#include "stdlib/napi/argv.h"
+#include "stdlib/napi/argv_int64.h"
+#include "stdlib/napi/argv_int32.h"
+#include "stdlib/napi/argv_strided_float64array.h"
+#include "stdlib/napi/argv_dataview_cast.h"
+#include "stdlib/napi/argv_double.h"
+#include
+
+/**
+* Receives JavaScript callback invocation data.
+*
+* @param env environment under which the function is invoked
+* @param info callback data
+* @return Node-API value
+*/
+static napi_value addon( napi_env env, napi_callback_info info ) {
+ STDLIB_NAPI_ARGV( env, info, argv, argc, 12 );
+ STDLIB_NAPI_ARGV_INT64( env, NX, argv, 0 );
+ STDLIB_NAPI_ARGV_INT64( env, NY, argv, 1 );
+ STDLIB_NAPI_ARGV_INT32( env, alternative, argv, 2 );
+ STDLIB_NAPI_ARGV_DOUBLE( env, alpha, argv, 3 );
+ STDLIB_NAPI_ARGV_DOUBLE( env, diff, argv, 4 );
+ STDLIB_NAPI_ARGV_DOUBLE( env, sigmax, argv, 5 );
+ STDLIB_NAPI_ARGV_DOUBLE( env, sigmay, argv, 8 );
+ STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 7 );
+ STDLIB_NAPI_ARGV_INT64( env, strideY, argv, 10 );
+ STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, NX, strideX, argv, 6 );
+ STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, Y, NY, strideY, argv, 9 );
+ STDLIB_NAPI_ARGV_DATAVIEW_CAST( env, results, struct stdlib_stats_ztest_two_sample_float64_results, argv, 11 );
+ API_SUFFIX(stdlib_strided_dztest2)( NX, NY, alternative, alpha, diff, sigmax, X, strideX, sigmay, Y, strideY, results );
+ return NULL;
+}
+
+/**
+* Receives JavaScript callback invocation data.
+*
+* @param env environment under which the function is invoked
+* @param info callback data
+* @return Node-API value
+*/
+static napi_value addon_method( napi_env env, napi_callback_info info ) {
+ STDLIB_NAPI_ARGV( env, info, argv, argc, 14 );
+ STDLIB_NAPI_ARGV_INT64( env, NX, argv, 0 );
+ STDLIB_NAPI_ARGV_INT64( env, NY, argv, 1 );
+ STDLIB_NAPI_ARGV_INT32( env, alternative, argv, 2 );
+ STDLIB_NAPI_ARGV_DOUBLE( env, alpha, argv, 3 );
+ STDLIB_NAPI_ARGV_DOUBLE( env, diff, argv, 4 );
+ STDLIB_NAPI_ARGV_DOUBLE( env, sigmax, argv, 5 );
+ STDLIB_NAPI_ARGV_DOUBLE( env, sigmay, argv, 9 );
+ STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 7 );
+ STDLIB_NAPI_ARGV_INT64( env, strideY, argv, 11 );
+ STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, NX, strideX, argv, 6 );
+ STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, Y, NY, strideY, argv, 10 );
+ STDLIB_NAPI_ARGV_INT64( env, offsetX, argv, 8 );
+ STDLIB_NAPI_ARGV_INT64( env, offsetY, argv, 12 );
+ STDLIB_NAPI_ARGV_DATAVIEW_CAST( env, results, struct stdlib_stats_ztest_two_sample_float64_results, argv, 13 );
+ API_SUFFIX(stdlib_strided_dztest2_ndarray)( NX, NY, alternative, alpha, diff, sigmax, X, strideX, offsetX, sigmay, Y, strideY, offsetY, results );
+ return NULL;
+}
+
+STDLIB_NAPI_MODULE_EXPORT_FCN_WITH_METHOD( addon, "ndarray", addon_method )
diff --git a/lib/node_modules/@stdlib/stats/strided/dztest2/src/main.c b/lib/node_modules/@stdlib/stats/strided/dztest2/src/main.c
new file mode 100644
index 000000000000..ca0e9d263db7
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/dztest2/src/main.c
@@ -0,0 +1,152 @@
+/**
+* @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.
+*/
+
+#include "stdlib/stats/strided/dztest2.h"
+#include "stdlib/stats/base/ztest/alternatives.h"
+#include "stdlib/stats/base/ztest/two-sample/results/float64.h"
+#include "stdlib/blas/base/shared.h"
+#include "stdlib/strided/base/stride2offset.h"
+#include "stdlib/stats/strided/dmean.h"
+#include "stdlib/math/base/assert/is_nan.h"
+#include "stdlib/math/base/special/sqrt.h"
+#include "stdlib/math/base/special/abs.h"
+#include "stdlib/stats/base/dists/normal/cdf.h"
+#include "stdlib/stats/base/dists/normal/quantile.h"
+#include "stdlib/constants/float64/pinf.h"
+#include "stdlib/constants/float64/ninf.h"
+#include
+
+/**
+* Computes a two-sample Z-test for double-precision floating-point strided arrays.
+*
+* @param NX number of indexed elements
+* @param NY number of indexed elements
+* @param alternative alternative hypothesis
+* @param alpha significance level
+* @param diff mean under the null hypothesis
+* @param sigmax known standard deviation
+* @param X first input array
+* @param strideX stride length
+* @param sigmay known standard deviation
+* @param Y second input array
+* @param strideY stride length
+* @param results output results object
+*/
+void API_SUFFIX(stdlib_strided_dztest2)( const CBLAS_INT NX, const CBLAS_INT NY, const enum STDLIB_STATS_ZTEST_ALTERNATIVE alternative, const double alpha, const double diff, const double sigmax, const double *X, const CBLAS_INT strideX, const double sigmay, const double *Y, const CBLAS_INT strideY, struct stdlib_stats_ztest_two_sample_float64_results *results ) {
+ const CBLAS_INT ox = stdlib_strided_stride2offset( NX, strideX );
+ const CBLAS_INT oy = stdlib_strided_stride2offset( NY, strideY );
+ API_SUFFIX(stdlib_strided_dztest2_ndarray)( NX, NY, alternative, alpha, diff, sigmax, X, strideX, ox, sigmay, Y, strideY, oy, results );
+}
+
+/**
+* Computes a two-sample Z-test for double-precision floating-point strided arrays using alternative indexing semantics.
+*
+* @param NX number of indexed elements in `x`
+* @param NY number of indexed elements in `y`
+* @param alternative alternative hypothesis
+* @param alpha significance level
+* @param diff mean under the null hypothesis
+* @param sigmax known standard deviation of `x`
+* @param X first input array
+* @param strideX stride length for `x`
+* @param offsetX starting index for `x`
+* @param sigmay known standard deviation of `x`
+* @param Y second input array
+* @param strideY stride length for `y`
+* @param offsetY starting index for `y`
+* @param results output results object
+*/
+void API_SUFFIX(stdlib_strided_dztest2_ndarray)( const CBLAS_INT NX, const CBLAS_INT NY, const enum STDLIB_STATS_ZTEST_ALTERNATIVE alternative, const double alpha, const double diff, const double sigmax, const double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, const double sigmay, const double *Y, const CBLAS_INT strideY, const CBLAS_INT offsetY, struct stdlib_stats_ztest_two_sample_float64_results *results ) {
+ double pValue;
+ double stderr;
+ double xmean;
+ double ymean;
+ double xvar;
+ double yvar;
+ double stat;
+ double *ci;
+ double q;
+
+ if (
+ NX <= 0 ||
+ NY <= 0 ||
+ stdlib_base_is_nan( alpha ) ||
+ stdlib_base_is_nan( diff ) ||
+ stdlib_base_is_nan( sigmax ) ||
+ stdlib_base_is_nan( sigmay ) ||
+ sigmax <= 0.0 ||
+ sigmay <= 0.0 ||
+ alpha < 0.0 ||
+ alpha > 1.0
+ ) {
+ results->rejected = false;
+ results->alternative = alternative;
+
+ // Set all applicable fields to NaN...
+ results->alpha = 0.0/0.0;
+ results->pValue = 0.0/0.0;
+ results->statistic = 0.0/0.0;
+ results->ci[ 0 ] = 0.0/0.0;
+ results->ci[ 1 ] = 0.0/0.0;
+ results->nullValue = 0.0/0.0;
+ results->xmean = 0.0/0.0;
+ results->ymean = 0.0/0.0;
+ return;
+ }
+ // Resolve the array for storing the confidence interval:
+ ci = results->ci;
+
+ // Compute the standard error of the mean:
+ xvar = sigmax * sigmay;
+ yvar = sigmay * sigmay;
+ stderr = stdlib_base_sqrt( ( xvar / (double)NX ) + ( yvar / (double)NY ) );
+
+ // Compute the arithmetic means of the input arrays:
+ xmean = stdlib_strided_dmean_ndarray( NX, X, strideX, offsetX );
+ ymean = stdlib_strided_dmean_ndarray( NY, Y, strideY, offsetY );
+
+ // Compute the test statistic (i.e., the z-score, which is the standardized difference between the sample means of x and y, adjusted by the hypothesized difference, in units of the standard error):
+ stat = ( xmean - ymean - diff ) / stderr;
+
+ // Compute the p-value and confidence interval...
+ if ( alternative == STDLIB_STATS_ZTEST_LESS ) {
+ pValue = stdlib_base_dists_normal_cdf( stat, 0.0, 1.0 );
+ q = stdlib_base_dists_normal_quantile( 1.0-alpha, 0.0, 1.0 );
+ ci[ 0 ] = STDLIB_CONSTANT_FLOAT64_NINF;
+ ci[ 1 ] = diff + ( (stat+q)*stderr );
+ } else if ( alternative == STDLIB_STATS_ZTEST_GREATER ) {
+ pValue = 1.0 - stdlib_base_dists_normal_cdf( stat, 0.0, 1.0 );
+ q = stdlib_base_dists_normal_quantile( 1.0-alpha, 0.0, 1.0 );
+ ci[ 0 ] = diff + ( (stat-q)*stderr );
+ ci[ 1 ] = STDLIB_CONSTANT_FLOAT64_PINF;
+ } else { // alternative == STDLIB_STATS_ZTEST_TWO_SIDED
+ pValue = 2.0 * stdlib_base_dists_normal_cdf( -stdlib_base_abs( stat ), 0.0, 1.0 );
+ q = stdlib_base_dists_normal_quantile( 1.0-(alpha/2.0), 0.0, 1.0 );
+ ci[ 0 ] = diff + ( (stat-q)*stderr );
+ ci[ 1 ] = diff + ( (stat+q)*stderr );
+ }
+ // Store test results:
+ results->rejected = ( pValue <= alpha );
+ results->alternative = alternative;
+ results->alpha = alpha;
+ results->pValue = pValue;
+ results->statistic = stat;
+ results->nullValue = diff;
+ results->xmean = xmean;
+ results->ymean = ymean;
+}