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..435b5cb4b84a
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/dztest2/README.md
@@ -0,0 +1,422 @@
+
+
+
+
+# dztest2
+
+> Compute a two-sample Z-test for two 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 two 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 two 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 two 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 two 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/docs/repl.txt b/lib/node_modules/@stdlib/stats/strided/dztest2/docs/repl.txt
new file mode 100644
index 000000000000..df5eba1e51ff
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/dztest2/docs/repl.txt
@@ -0,0 +1,145 @@
+
+{{alias}}( NX, NY, alt, alpha, d, sdx, x, sx, sdy, y, sy, out )
+ Computes a two-sample Z-test for two double-precision floating-point
+ strided arrays.
+
+ The `N` and stride parameters determine which elements in the strided
+ arrays are accessed at runtime.
+
+ Indexing is relative to the first index. To introduce an offset, use a typed
+ array view.
+
+ Parameters
+ ----------
+ NX: integer
+ Number of indexed elements in `x`.
+
+ NY: integer
+ Number of indexed elements in `y`.
+
+ alternative: string
+ Alternative hypothesis. Must be one of the following:
+
+ - two-sided: `x` has the same mean as `y`.
+ - greater: `x` has a larger mean than `y`.
+ - less: `x` has a smaller mean than `y`.
+
+ alpha: number
+ Significance level.
+
+ d: number
+ Difference in means under the null hypothesis.
+
+ sdx: number
+ Known standard deviation of `x`.
+
+ x: Float64Array
+ First input array.
+
+ strideX: integer
+ Stride length for `x`.
+
+ sdy: number
+ Known standard deviation of `y`.
+
+ y: Float64Array
+ Second input array.
+
+ strideY: integer
+ Stride length for `y`.
+
+ out: Object
+ Output results object.
+
+ Returns
+ -------
+ out: Object
+ Results object.
+
+ Examples
+ --------
+ > var x = new {{alias:@stdlib/array/float64}}( [ 4.0, 4.0, 6.0, 6.0, 5.0 ] );
+ > var y = new {{alias:@stdlib/array/float64}}( [ 3.0, 3.0, 5.0, 7.0, 7.0 ] );
+ > var NX = x.length;
+ > var NY = y.length;
+ > var alt = 'two-sided';
+ > var out = new {{alias:@stdlib/stats/base/ztest/two-sample/results/float64}}();
+ > var res = {{alias}}( NX, NY, alt, 0.05, 0.0, 1.0, x, 1, 2.0, y, 1, out );
+ > res.toString()
+
+
+{{alias}}.ndarray( NX, NY, alt, alpha, d, sdx, x, sx, ox, sdy, y, sy, oy, out )
+ Computes a two-sample Z-test for two double-precision floating-point
+ strided arrays using alternative indexing semantics.
+
+ While typed array views mandate a view offset based on the underlying
+ buffer, offset parameters support indexing semantics based on starting
+ indices.
+
+ Parameters
+ ----------
+ NX: integer
+ Number of indexed elements in `x`.
+
+ NY: integer
+ Number of indexed elements in `y`.
+
+ alternative: string
+ Alternative hypothesis. Must be one of the following:
+
+ - two-sided: `x` has the same mean as `y`.
+ - greater: `x` has a larger mean than `y`.
+ - less: `x` has a smaller mean than `y`.
+
+ alpha: number
+ Significance level.
+
+ d: number
+ Difference in means under the null hypothesis.
+
+ sdx: number
+ Known standard deviation of `x`.
+
+ x: Float64Array
+ First input array.
+
+ strideX: integer
+ Stride length for `x`.
+
+ offsetX: integer
+ Starting index for `x`.
+
+ sdy: number
+ Known standard deviation of `y`.
+
+ y: Float64Array
+ Second input array.
+
+ strideY: integer
+ Stride length for `y`.
+
+ offsetY: integer
+ Starting index for `y`.
+
+ out: Object
+ Output results object.
+
+ Returns
+ -------
+ out: Object
+ Results object.
+
+ Examples
+ --------
+ > var x = new {{alias:@stdlib/array/float64}}( [ 4.0, 4.0, 6.0, 6.0, 5.0 ] );
+ > var y = new {{alias:@stdlib/array/float64}}( [ 3.0, 3.0, 5.0, 7.0, 7.0 ] );
+ > var NX = x.length;
+ > var NY = y.length;
+ > var alt = 'two-sided';
+ > var out = new {{alias:@stdlib/stats/base/ztest/two-sample/results/float64}}();
+ > var res = {{alias}}.ndarray( NX, NY, alt, 0.05, 0.0, 1.0, x, 1, 0, 2.0, x, 1, 0, out );
+ > res.toString()
+
+ See Also
+ --------
+
diff --git a/lib/node_modules/@stdlib/stats/strided/dztest2/docs/types/index.d.ts b/lib/node_modules/@stdlib/stats/strided/dztest2/docs/types/index.d.ts
new file mode 100644
index 000000000000..237a0214147e
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/dztest2/docs/types/index.d.ts
@@ -0,0 +1,243 @@
+/*
+* @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
+
+/**
+* Alternative hypothesis.
+*/
+type Alternative = 'two-sided' | 'greater' | 'less';
+
+/**
+* Interface describing options when serializing a results object to a string.
+*/
+interface Options {
+ /**
+ * Number of digits to display after decimal points. Default: 4.
+ */
+ digits?: number;
+
+ /**
+ * Boolean indicating whether to show the test decision. Default: true.
+ */
+ decision?: boolean;
+}
+
+/**
+* Serializes a results object as a string.
+*
+* @returns string representation
+*/
+type toString = ( options?: Options ) => string;
+
+/**
+* Serializes a results object as a JSON object.
+*
+* @returns JSON representation
+*/
+type toJSON = () => BaseResults;
+
+/**
+* Interface describing a "base" results object.
+*/
+interface BaseResults {
+ /**
+ * Boolean indicating whether the null hypothesis was rejected.
+ */
+ rejected: boolean;
+
+ /**
+ * Alternative hypothesis.
+ */
+ alternative: Alternative;
+
+ /**
+ * Significance level.
+ */
+ alpha: number;
+
+ /**
+ * p-value.
+ */
+ pValue: number;
+
+ /**
+ * Test statistic.
+ */
+ statistic: number;
+
+ /**
+ * Confidence interval.
+ */
+ ci: Float64Array;
+
+ /**
+ * Value of the mean under the null hypothesis
+ */
+ nullValue: number;
+
+ /**
+ * Sample mean of `x`.
+ */
+ xmean: number;
+
+ /**
+ * Sample mean of `y`.
+ */
+ ymean: number;
+}
+
+/**
+* Interface describing a results object.
+*/
+interface Results extends BaseResults {
+ /**
+ * Serializes results as formatted test output.
+ */
+ toString: toString;
+
+ /**
+ * Serializes results as JSON.
+ */
+ toJSON: toJSON;
+}
+
+/**
+* Interface describing `dztest2`.
+*/
+interface Routine {
+ /**
+ * Computes a two-sample Z-test for two double-precision floating-point strided arrays.
+ *
+ * @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 - difference in means under the null hypothesis
+ * @param sigmax - known standard deviation of `x`
+ * @param x - first input array
+ * @param strideX - stride length for `x`
+ * @param sigmay - known standard deviation of `y`
+ * @param y - second input array
+ * @param strideY - stride length for `y`
+ * @param out - output results object
+ * @returns 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, 2.0, y, 1, results );
+ * // returns {...}
+ *
+ * var bool = ( out === results );
+ * // returns true
+ */
+ ( NX: number, NY: number, alternative: Alternative, alpha: number, diff: number, sigmax: number, x: Float64Array, strideX: number, sigmay: number, y: Float64Array, strideY: number, out: T ): Results;
+
+ /**
+ * Computes a two-sample Z-test for two 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 - difference in means 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 `y`
+ * @param y - second input array
+ * @param strideY - stride length for `y`
+ * @param offsetY - starting index for `y`
+ * @param out - output results object
+ * @returns 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.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
+ */
+ ndarray( NX: number, NY: number, alternative: Alternative, alpha: number, diff: number, sigmax: number, x: Float64Array, strideX: number, offsetX: number, sigmay: number, y: Float64Array, strideY: number, offsetY: number, out: T ): Results;
+}
+
+/**
+* Computes a two-sample Z-test for two double-precision floating-point strided arrays.
+*
+* @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 - difference in means under the null hypothesis
+* @param sigmax - known standard deviation of `x`
+* @param x - first input array
+* @param strideX - stride length for `x`
+* @param sigmay - known standard deviation of `y`
+* @param y - second input array
+* @param strideY - stride length for `y`
+* @param out - output results object
+* @returns 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, 2.0, y, 1, results );
+* // returns {...}
+*
+* var bool = ( out === results );
+* // returns true
+*
+* @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.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
+*/
+declare var dztest2: Routine;
+
+
+// EXPORTS //
+
+export = dztest2;
diff --git a/lib/node_modules/@stdlib/stats/strided/dztest2/docs/types/test.ts b/lib/node_modules/@stdlib/stats/strided/dztest2/docs/types/test.ts
new file mode 100644
index 000000000000..a3854d63b64a
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/dztest2/docs/types/test.ts
@@ -0,0 +1,475 @@
+/*
+* @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 Float64Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+import dztest2 = require( './index' );
+
+
+// TESTS //
+
+// The function returns a results object...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectType Results
+ dztest2( x.length, y.length, 'greater', 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectType Results
+ dztest2( x.length, y.length, 'less', 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectType Results
+}
+
+// The compiler throws an error if the function is provided a first argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ dztest2( '10', y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( true, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( false, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( null, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( undefined, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( [], y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( {}, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( ( x: number ): number => x, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a second argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ dztest2( x.length, '10', 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, true, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, false, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, null, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, undefined, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, [], 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, {}, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, ( x: number ): number => x, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a third argument which is not a valid string...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ dztest2( x.length, y.length, '10', 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, true, 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, false, 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, null, 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, undefined, 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, [], 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, {}, 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, ( x: number ): number => x, 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a fourth argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ dztest2( x.length, y.length, 'two-sided', '10', 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', true, 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', false, 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', null, 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', undefined, 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', [], 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', {}, 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', ( x: number ): number => x, 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a fifth argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ dztest2( x.length, y.length, 'two-sided', 0.05, '10', 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, true, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, false, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, null, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, undefined, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, [], 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, {}, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, ( x: number ): number => x, 1.0, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a sixth argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, '10', x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, true, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, false, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, null, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, undefined, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, [], x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, {}, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, ( x: number ): number => x, x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a seventh argument which is not an array-like object...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 10, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, '10', 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, true, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, false, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, null, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, undefined, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, {}, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, ( x: number ): number => x, 1, 1.0, y, 1, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an eighth argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, '10', 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, true, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, false, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, null, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, undefined, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, [], 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, {}, 1.0, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, ( x: number ): number => x, 1.0, y, 1, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a ninth argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, '10', y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, true, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, false, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, null, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, undefined, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, [], y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, {}, y, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, ( x: number ): number => x, y, 1, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a tenth argument which is not an array-like object...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, 10, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, '10', 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, true, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, false, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, null, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, undefined, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, {}, 1, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, ( x: number ): number => x, 1, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an eleventh argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, '10', new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, true, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, false, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, null, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, undefined, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, [], new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, {}, new Float64Results() ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, ( x: number ): number => x, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a twelfth argument which is not a results object...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, '10' ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, true ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, false ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, null ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, undefined ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, [] ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, {} ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, ( x: number ): number => x ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an unsupported number of arguments...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ dztest2(); // $ExpectError
+ dztest2( x.length ); // $ExpectError
+ dztest2( x.length, y.length ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided' ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05 ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0 ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0 ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1 ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0 ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, 1 ); // $ExpectError
+ dztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 1.0, y, 1, new Float64Results(), {} ); // $ExpectError
+}
+
+// Attached to main export is an `ndarray` method which returns a results object...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectType Results
+ dztest2.ndarray( x.length, y.length, 'greater', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectType Results
+ dztest2.ndarray( x.length, y.length, 'less', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectType Results
+}
+
+// The compiler throws an error if the `ndarray` method is provided a first argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ dztest2.ndarray( '10', y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( true, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( false, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( null, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( undefined, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( [], y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( {}, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( ( x: number ): number => x, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a second argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ dztest2.ndarray( x.length, '10', 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, true, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, false, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, null, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, undefined, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, [], 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, {}, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, ( x: number ): number => x, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a third argument which is not a valid string...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ dztest2.ndarray( x.length, y.length, '10', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 5, 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, true, 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, false, 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, null, 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, undefined, 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, [], 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, {}, 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, ( x: number ): number => x, 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a fourth argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ dztest2.ndarray( x.length, y.length, 'two-sided', '10', 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', true, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', false, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', null, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', undefined, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', [], 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', {}, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', ( x: number ): number => x, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a fifth argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, '10', 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, true, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, false, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, null, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, undefined, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, [], 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, {}, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, ( x: number ): number => x, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a sixth argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, '10', x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, true, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, false, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, null, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, undefined, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, [], x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, {}, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, ( x: number ): number => x, x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a seventh argument which is not an array-like object...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 10, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, '10', 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, true, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, false, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, null, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, undefined, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, {}, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, ( x: number ): number => x, 1, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided an eighth argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, '10', 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, true, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, false, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, null, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, undefined, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, [], 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, {}, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, ( x: number ): number => x, 0, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a ninth argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, '10', 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, true, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, false, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, null, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, undefined, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, [], 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, {}, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, ( x: number ): number => x, 1.0, y, 1, 0, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a tenth argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, '10', y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, true, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, false, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, null, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, undefined, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, [], y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, {}, y, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, ( x: number ): number => x, y, 1, 0, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided an eleventh argument which is not an array-like object...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, 10, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, '10', 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, true, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, false, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, null, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, undefined, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, {}, 1, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, ( x: number ): number => x, 1, 0, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a twelfth argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, '10', 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, true, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, false, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, null, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, undefined, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, [], 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, {}, 0, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, ( x: number ): number => x, 0, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a thirteenth argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, '10', new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, true, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, false, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, null, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, undefined, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, [], new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, {}, new Float64Results() ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, ( x: number ): number => x, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a fourteenth argument which is not a results object...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, '10' ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, true ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, false ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, null ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, undefined ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, [] ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, {} ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, ( x: number ): number => x ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided an unsupported number of arguments...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ dztest2.ndarray(); // $ExpectError
+ dztest2.ndarray( x.length ); // $ExpectError
+ dztest2.ndarray( x.length, y.length ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05 ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0 ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0 ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1 ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0 ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0 ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1 ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0 ); // $ExpectError
+ dztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, new Float64Results(), {} ); // $ExpectError
+}
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..4f92418cd822
--- /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 two 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..4b351b1121db
--- /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 two 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..fb8cd284993f
--- /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 two double-precision floating-point strided arrays.
+*
+* @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 difference in means under the null hypothesis
+* @param sigmax known standard deviation of `X`
+* @param X first input array
+* @param strideX stride length of `X`
+* @param sigmay known standard deviation of `Y`
+* @param Y second input array
+* @param strideY stride length of `Y`
+* @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 two 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 difference in means 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 `Y`
+* @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;
+}
diff --git a/lib/node_modules/@stdlib/stats/strided/dztest2/test/test.dztest2.js b/lib/node_modules/@stdlib/stats/strided/dztest2/test/test.dztest2.js
new file mode 100644
index 000000000000..2690f8c22a9b
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/dztest2/test/test.dztest2.js
@@ -0,0 +1,342 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var Float64Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+var isfinite = require( '@stdlib/math/base/assert/is-finite' );
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var dfill = require( '@stdlib/blas/ext/base/dfill' ).ndarray;
+var normalFactory = require( '@stdlib/random/array/normal' ).factory;
+var PINF = require( '@stdlib/constants/float64/pinf' );
+var NINF = require( '@stdlib/constants/float64/ninf' );
+var dztest2 = require( './../lib/dztest2.js' );
+
+
+// VARIABLES //
+
+var normal = normalFactory({
+ 'seed': 12345
+});
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof dztest2, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function performs a two-sample Z-test over strided arrays (alternative=two-sided)', function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+
+ results = new Float64Results();
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ out = dztest2( x.length, y.length, 'two-sided', 0.1, 0.0, 1.0, x, 1, 1.0, y, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ out = dztest2( x.length, y.length, 'two-sided', 0.1, 100.0, 1.0, x, 1, 1.0, y, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 4.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( 10000, 2.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ out = dztest2( x.length, y.length, 'two-sided', 0.1, 2.0, 1.0, x, 1, 1.0, y, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function performs a two-sample Z-test over strided arrays (alternative=greater)', function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+
+ results = new Float64Results();
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( 10000, 2.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ out = dztest2( x.length, y.length, 'greater', 0.1, 0.0, 1.0, x, 1, 1.0, y, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'greater', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( out.ci[ 1 ], PINF, 'returns expected value' );
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ out = dztest2( x.length, y.length, 'greater', 0.1, -1.0, 1.0, x, 1, 1.0, y, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'greater', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( out.ci[ 1 ], PINF, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function performs a two-sample Z-test over strided arrays (alternative=less)', function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+
+ results = new Float64Results();
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 2.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ out = dztest2( x.length, y.length, 'less', 0.1, 0.0, 1.0, x, 1, 1.0, y, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'less', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( out.ci[ 0 ], NINF, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ out = dztest2( x.length, y.length, 'less', 0.1, 1.0, 1.0, x, 1, 1.0, y, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'less', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( out.ci[ 0 ], NINF, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if provided an `NX` or `NY` parameter less than or equal to `0`, the function returns `NaN` results', function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+
+ results = new Float64Results();
+ x = normal( 10, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( 10, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ out = dztest2( 0, y.length, 'two-sided', 0.1, 0.0, 1.0, x, 1, 1.0, y, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), true, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), true, 'returns expected value' );
+
+ out = dztest2( -1, y.length, 'two-sided', 0.1, 0.0, 1.0, x, 1, 1.0, y, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), true, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), true, 'returns expected value' );
+
+ out = dztest2( x.length, 0, 'two-sided', 0.1, 0.0, 1.0, x, 1, 1.0, y, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), true, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), true, 'returns expected value' );
+
+ out = dztest2( x.length, -1, 'two-sided', 0.1, 0.0, 1.0, x, 1, 1.0, y, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), true, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports a stride parameter', function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+ var N;
+
+ N = 10000;
+ results = new Float64Results();
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( N*2, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( N*2, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ dfill( N, NaN, x, 2, 1 );
+ dfill( N, NaN, y, 2, 1 );
+
+ out = dztest2( N, N, 'two-sided', 0.1, 0.0, 1.0, x, 2, 1.0, y, 2, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( N*2, 4.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( N*2, 2.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ dfill( N, NaN, x, 2, 1 );
+ dfill( N, NaN, y, 2, 1 );
+
+ out = dztest2( N, N, 'two-sided', 0.1, 10.0, 1.0, x, 2, 1.0, y, 2, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports a negative stride parameter', function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+ var N;
+
+ N = 10000;
+ results = new Float64Results();
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( N*2, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( N*2, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ dfill( N, NaN, x, 2, 1 );
+ dfill( N, NaN, y, 2, 1 );
+
+ out = dztest2( N, N, 'two-sided', 0.1, 0.0, 1.0, x, -2, 1.0, y, -2, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( N*2, 100.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( N*2, 100.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ dfill( N, NaN, x, 2, 1 );
+ dfill( N, NaN, y, 2, 1 );
+
+ out = dztest2( N, N, 'two-sided', 0.1, 0.0, 1.0, x, -2, 1.0, y, -2, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/stats/strided/dztest2/test/test.dztest2.native.js b/lib/node_modules/@stdlib/stats/strided/dztest2/test/test.dztest2.native.js
new file mode 100644
index 000000000000..d01a849fa506
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/dztest2/test/test.dztest2.native.js
@@ -0,0 +1,347 @@
+/**
+* @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 tape = require( 'tape' );
+var Float64Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+var isfinite = require( '@stdlib/math/base/assert/is-finite' );
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var dfill = require( '@stdlib/blas/ext/base/dfill' ).ndarray;
+var normalFactory = require( '@stdlib/random/array/normal' ).factory;
+var PINF = require( '@stdlib/constants/float64/pinf' );
+var NINF = require( '@stdlib/constants/float64/ninf' );
+var tryRequire = require( '@stdlib/utils/try-require' );
+
+
+// VARIABLES //
+
+var dztest2 = tryRequire( resolve( __dirname, './../lib/dztest2.native.js' ) );
+var opts = {
+ 'skip': ( dztest2 instanceof Error )
+};
+var normal = normalFactory({
+ 'seed': 12345
+});
+
+
+// TESTS //
+
+tape( 'main export is a function', opts, function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof dztest2, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function performs a two-sample Z-test over strided arrays (alternative=two-sided)', opts, function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+
+ results = new Float64Results();
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ out = dztest2( x.length, y.length, 'two-sided', 0.1, 0.0, 1.0, x, 1, 1.0, y, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ out = dztest2( x.length, y.length, 'two-sided', 0.1, 100.0, 1.0, x, 1, 1.0, y, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 4.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( 10000, 2.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ out = dztest2( x.length, y.length, 'two-sided', 0.1, 2.0, 1.0, x, 1, 1.0, y, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function performs a two-sample Z-test over strided arrays (alternative=greater)', opts, function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+
+ results = new Float64Results();
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( 10000, 2.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ out = dztest2( x.length, y.length, 'greater', 0.1, 0.0, 1.0, x, 1, 1.0, y, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'greater', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( out.ci[ 1 ], PINF, 'returns expected value' );
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ out = dztest2( x.length, y.length, 'greater', 0.1, -1.0, 1.0, x, 1, 1.0, y, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'greater', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( out.ci[ 1 ], PINF, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function performs a two-sample Z-test over strided arrays (alternative=less)', opts, function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+
+ results = new Float64Results();
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 2.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ out = dztest2( x.length, y.length, 'less', 0.1, 0.0, 1.0, x, 1, 1.0, y, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'less', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( out.ci[ 0 ], NINF, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ out = dztest2( x.length, y.length, 'less', 0.1, 1.0, 1.0, x, 1, 1.0, y, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'less', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( out.ci[ 0 ], NINF, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if provided an `NX` or `NY` parameter less than or equal to `0`, the function returns `NaN` results', opts, function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+
+ results = new Float64Results();
+ x = normal( 10, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( 10, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ out = dztest2( 0, y.length, 'two-sided', 0.1, 0.0, 1.0, x, 1, 1.0, y, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), true, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), true, 'returns expected value' );
+
+ out = dztest2( -1, y.length, 'two-sided', 0.1, 0.0, 1.0, x, 1, 1.0, y, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), true, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), true, 'returns expected value' );
+
+ out = dztest2( x.length, 0, 'two-sided', 0.1, 0.0, 1.0, x, 1, 1.0, y, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), true, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), true, 'returns expected value' );
+
+ out = dztest2( x.length, -1, 'two-sided', 0.1, 0.0, 1.0, x, 1, 1.0, y, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), true, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports a stride parameter', opts, function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+ var N;
+
+ N = 10000;
+ results = new Float64Results();
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( N*2, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( N*2, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ dfill( N, NaN, x, 2, 1 );
+ dfill( N, NaN, y, 2, 1 );
+
+ out = dztest2( N, N, 'two-sided', 0.1, 0.0, 1.0, x, 2, 1.0, y, 2, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( N*2, 4.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( N*2, 2.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ dfill( N, NaN, x, 2, 1 );
+ dfill( N, NaN, y, 2, 1 );
+
+ out = dztest2( N, N, 'two-sided', 0.1, 10.0, 1.0, x, 2, 1.0, y, 2, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports a negative stride parameter', opts, function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+ var N;
+
+ N = 10000;
+ results = new Float64Results();
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( N*2, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( N*2, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ dfill( N, NaN, x, 2, 1 );
+ dfill( N, NaN, y, 2, 1 );
+
+ out = dztest2( N, N, 'two-sided', 0.1, 0.0, 1.0, x, -2, 1.0, y, -2, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( N*2, 100.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( N*2, 100.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ dfill( N, NaN, x, 2, 1 );
+ dfill( N, NaN, y, 2, 1 );
+
+ out = dztest2( N, N, 'two-sided', 0.1, 0.0, 1.0, x, -2, 1.0, y, -2, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/stats/strided/dztest2/test/test.js b/lib/node_modules/@stdlib/stats/strided/dztest2/test/test.js
new file mode 100644
index 000000000000..2cd06b151acd
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/dztest2/test/test.js
@@ -0,0 +1,82 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var proxyquire = require( 'proxyquire' );
+var IS_BROWSER = require( '@stdlib/assert/is-browser' );
+var dztest2 = require( './../lib' );
+
+
+// VARIABLES //
+
+var opts = {
+ 'skip': IS_BROWSER
+};
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof dztest2, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'attached to the main export is a method providing an ndarray interface', function test( t ) {
+ t.strictEqual( typeof dztest2.ndarray, 'function', 'method is a function' );
+ t.end();
+});
+
+tape( 'if a native implementation is available, the main export is the native implementation', opts, function test( t ) {
+ var dztest2 = proxyquire( './../lib', {
+ '@stdlib/utils/try-require': tryRequire
+ });
+
+ t.strictEqual( dztest2, mock, 'returns expected value' );
+ t.end();
+
+ function tryRequire() {
+ return mock;
+ }
+
+ function mock() {
+ // Mock...
+ }
+});
+
+tape( 'if a native implementation is not available, the main export is a JavaScript implementation', opts, function test( t ) {
+ var dztest2;
+ var main;
+
+ main = require( './../lib/dztest2.js' );
+
+ dztest2 = proxyquire( './../lib', {
+ '@stdlib/utils/try-require': tryRequire
+ });
+
+ t.strictEqual( dztest2, main, 'returns expected value' );
+ t.end();
+
+ function tryRequire() {
+ return new Error( 'Cannot find module' );
+ }
+});
diff --git a/lib/node_modules/@stdlib/stats/strided/dztest2/test/test.ndarray.js b/lib/node_modules/@stdlib/stats/strided/dztest2/test/test.ndarray.js
new file mode 100644
index 000000000000..bf1019632d6b
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/dztest2/test/test.ndarray.js
@@ -0,0 +1,395 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var Float64Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+var isfinite = require( '@stdlib/math/base/assert/is-finite' );
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var dfill = require( '@stdlib/blas/ext/base/dfill' ).ndarray;
+var normalFactory = require( '@stdlib/random/array/normal' ).factory;
+var PINF = require( '@stdlib/constants/float64/pinf' );
+var NINF = require( '@stdlib/constants/float64/ninf' );
+var dztest2 = require( './../lib/ndarray.js' );
+
+
+// VARIABLES //
+
+var normal = normalFactory({
+ 'seed': 12345
+});
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof dztest2, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function performs a two-sample Z-test over strided arrays (alternative=two-sided)', function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+
+ results = new Float64Results();
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ out = dztest2( x.length, y.length, 'two-sided', 0.1, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ out = dztest2( x.length, y.length, 'two-sided', 0.1, 10.0, 1.0, x, 1, 0, 1.0, y, 1, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 4.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( 10000, 2.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ out = dztest2( x.length, y.length, 'two-sided', 0.1, 2.0, 1.0, x, 1, 0, 1.0, y, 1, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function performs a two-sample Z-test over strided arrays (alternative=greater)', function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+
+ results = new Float64Results();
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( 10000, 2.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ out = dztest2( x.length, y.length, 'greater', 0.1, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'greater', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( out.ci[ 1 ], PINF, 'returns expected value' );
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ out = dztest2( x.length, y.length, 'greater', 0.1, -1.0, 1.0, x, 1, 0, 1.0, y, 1, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'greater', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( out.ci[ 1 ], PINF, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function performs a two-sample Z-test over strided arrays (alternative=less)', function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+
+ results = new Float64Results();
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 2.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ out = dztest2( x.length, y.length, 'less', 0.1, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'less', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( out.ci[ 0 ], NINF, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ out = dztest2( x.length, y.length, 'less', 0.1, 1.0, 1.0, x, 1, 0, 1.0, y, 1, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'less', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( out.ci[ 0 ], NINF, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if provided an `NX` or `NY` parameter less than or equal to `0`, the function returns `NaN` results', function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+
+ results = new Float64Results();
+ x = normal( 10, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( 10, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ out = dztest2( 0, y.length, 'two-sided', 0.1, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), true, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), true, 'returns expected value' );
+
+ out = dztest2( -1, y.length, 'two-sided', 0.1, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), true, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), true, 'returns expected value' );
+
+ out = dztest2( x.length, 0, 'two-sided', 0.1, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), true, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), true, 'returns expected value' );
+
+ out = dztest2( x.length, -1, 'two-sided', 0.1, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), true, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports a stride parameter', function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+ var N;
+
+ N = 10000;
+ results = new Float64Results();
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( N*2, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( N*2, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ dfill( N, NaN, x, 2, 1 );
+ dfill( N, NaN, y, 2, 1 );
+
+ out = dztest2( N, N, 'two-sided', 0.1, 0.0, 1.0, x, 2, 0, 1.0, y, 2, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( N*2, 4.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( N*2, 2.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ dfill( N, NaN, x, 2, 1 );
+ dfill( N, NaN, y, 2, 1 );
+
+ out = dztest2( N, N, 'two-sided', 0.1, 10.0, 1.0, x, 2, 0, 1.0, y, 2, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports a negative stride parameter', function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+ var N;
+
+ N = 10000;
+ results = new Float64Results();
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( N*2, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( N*2, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ dfill( N, NaN, x, 2, 1 );
+ dfill( N, NaN, y, 2, 1 );
+
+ out = dztest2( N, N, 'two-sided', 0.1, 0.0, 1.0, x, -2, (N-1)*2, 1.0, y, -2, (N-1)*2, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( N*2, 4.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( N*2, 2.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ dfill( N, NaN, x, 2, 1 );
+ dfill( N, NaN, y, 2, 1 );
+
+ out = dztest2( N, N, 'two-sided', 0.1, 10.0, 1.0, x, -2, (N-1)*2, 1.0, y, -2, (N-1)*2, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports an offset parameter', function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+ var N;
+
+ N = 10000;
+ results = new Float64Results();
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( N*2, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( N*2, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ dfill( N, NaN, x, 2, 0 );
+ dfill( N, NaN, y, 2, 0 );
+
+ out = dztest2( N, N, 'two-sided', 0.1, 0.0, 1.0, x, 2, 1, 1.0, y, 2, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( N*2, 4.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( N*2, 2.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ dfill( N, NaN, x, 2, 0 );
+ dfill( N, NaN, y, 2, 0 );
+
+ out = dztest2( N, N, 'two-sided', 0.1, 2.0, 1.0, x, 2, 1, 1.0, y, 2, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/stats/strided/dztest2/test/test.ndarray.native.js b/lib/node_modules/@stdlib/stats/strided/dztest2/test/test.ndarray.native.js
new file mode 100644
index 000000000000..eaffa724c489
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/dztest2/test/test.ndarray.native.js
@@ -0,0 +1,400 @@
+/**
+* @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 tape = require( 'tape' );
+var Float64Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+var isfinite = require( '@stdlib/math/base/assert/is-finite' );
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var dfill = require( '@stdlib/blas/ext/base/dfill' ).ndarray;
+var normalFactory = require( '@stdlib/random/array/normal' ).factory;
+var PINF = require( '@stdlib/constants/float64/pinf' );
+var NINF = require( '@stdlib/constants/float64/ninf' );
+var tryRequire = require( '@stdlib/utils/try-require' );
+
+
+// VARIABLES //
+
+var dztest2 = tryRequire( resolve( __dirname, './../lib/ndarray.native.js' ) );
+var opts = {
+ 'skip': ( dztest2 instanceof Error )
+};
+var normal = normalFactory({
+ 'seed': 12345
+});
+
+
+// TESTS //
+
+tape( 'main export is a function', opts, function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof dztest2, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function performs a two-sample Z-test over strided arrays (alternative=two-sided)', opts, function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+
+ results = new Float64Results();
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ out = dztest2( x.length, y.length, 'two-sided', 0.1, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ out = dztest2( x.length, y.length, 'two-sided', 0.1, 10.0, 1.0, x, 1, 0, 1.0, y, 1, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 4.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( 10000, 2.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ out = dztest2( x.length, y.length, 'two-sided', 0.1, 2.0, 1.0, x, 1, 0, 1.0, y, 1, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function performs a two-sample Z-test over strided arrays (alternative=greater)', opts, function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+
+ results = new Float64Results();
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( 10000, 2.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ out = dztest2( x.length, y.length, 'greater', 0.1, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'greater', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( out.ci[ 1 ], PINF, 'returns expected value' );
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ out = dztest2( x.length, y.length, 'greater', 0.1, -1.0, 1.0, x, 1, 0, 1.0, y, 1, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'greater', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( out.ci[ 1 ], PINF, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function performs a two-sample Z-test over strided arrays (alternative=less)', opts, function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+
+ results = new Float64Results();
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 2.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ out = dztest2( x.length, y.length, 'less', 0.1, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'less', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( out.ci[ 0 ], NINF, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ out = dztest2( x.length, y.length, 'less', 0.1, 1.0, 1.0, x, 1, 0, 1.0, y, 1, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'less', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( out.ci[ 0 ], NINF, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if provided an `NX` or `NY` parameter less than or equal to `0`, the function returns `NaN` results', opts, function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+
+ results = new Float64Results();
+ x = normal( 10, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( 10, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ out = dztest2( 0, y.length, 'two-sided', 0.1, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), true, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), true, 'returns expected value' );
+
+ out = dztest2( -1, y.length, 'two-sided', 0.1, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), true, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), true, 'returns expected value' );
+
+ out = dztest2( x.length, 0, 'two-sided', 0.1, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), true, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), true, 'returns expected value' );
+
+ out = dztest2( x.length, -1, 'two-sided', 0.1, 0.0, 1.0, x, 1, 0, 1.0, y, 1, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), true, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports a stride parameter', opts, function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+ var N;
+
+ N = 10000;
+ results = new Float64Results();
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( N*2, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( N*2, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ dfill( N, NaN, x, 2, 1 );
+ dfill( N, NaN, y, 2, 1 );
+
+ out = dztest2( N, N, 'two-sided', 0.1, 0.0, 1.0, x, 2, 0, 1.0, y, 2, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( N*2, 4.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( N*2, 2.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ dfill( N, NaN, x, 2, 1 );
+ dfill( N, NaN, y, 2, 1 );
+
+ out = dztest2( N, N, 'two-sided', 0.1, 10.0, 1.0, x, 2, 0, 1.0, y, 2, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports a negative stride parameter', opts, function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+ var N;
+
+ N = 10000;
+ results = new Float64Results();
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( N*2, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( N*2, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ dfill( N, NaN, x, 2, 1 );
+ dfill( N, NaN, y, 2, 1 );
+
+ out = dztest2( N, N, 'two-sided', 0.1, 0.0, 1.0, x, -2, (N-1)*2, 1.0, y, -2, (N-1)*2, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( N*2, 4.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( N*2, 2.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ dfill( N, NaN, x, 2, 1 );
+ dfill( N, NaN, y, 2, 1 );
+
+ out = dztest2( N, N, 'two-sided', 0.1, 10.0, 1.0, x, -2, (N-1)*2, 1.0, y, -2, (N-1)*2, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports an offset parameter', opts, function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+ var N;
+
+ N = 10000;
+ results = new Float64Results();
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( N*2, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( N*2, 0.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ dfill( N, NaN, x, 2, 0 );
+ dfill( N, NaN, y, 2, 0 );
+
+ out = dztest2( N, N, 'two-sided', 0.1, 0.0, 1.0, x, 2, 1, 1.0, y, 2, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( N*2, 4.0, 1.0, {
+ 'dtype': 'float64'
+ });
+ y = normal( N*2, 2.0, 1.0, {
+ 'dtype': 'float64'
+ });
+
+ dfill( N, NaN, x, 2, 0 );
+ dfill( N, NaN, y, 2, 0 );
+
+ out = dztest2( N, N, 'two-sided', 0.1, 2.0, 1.0, x, 2, 1, 1.0, y, 2, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ t.end();
+});