From 58eaa386e6d8473afa8ed89e8f30ab4b6ddba268 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 5 Jul 2026 12:28:37 +0000 Subject: [PATCH 1/6] style: use `const` in TypeScript tests for `blas/ext/base/gfirst-index-equal` Align the TypeScript test file with the sibling `blas/ext/base/gfill-nan/docs/types/test.ts` added in the same batch and satisfy the `prefer-const` ESLint rule. --- .../gfirst-index-equal/docs/types/test.ts | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/ext/base/gfirst-index-equal/docs/types/test.ts b/lib/node_modules/@stdlib/blas/ext/base/gfirst-index-equal/docs/types/test.ts index 8da76e28001e..cb544495117f 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/gfirst-index-equal/docs/types/test.ts +++ b/lib/node_modules/@stdlib/blas/ext/base/gfirst-index-equal/docs/types/test.ts @@ -24,8 +24,8 @@ import gfirstIndexEqual = require( './index' ); // The function returns a number... { - var x = [ 1.0, 2.0, 3.0 ]; - var y = [ 1.0, 2.0, 3.0 ]; + const x = [ 1.0, 2.0, 3.0 ]; + const y = [ 1.0, 2.0, 3.0 ]; gfirstIndexEqual( x.length, x, 1, y, 1 ); // $ExpectType number gfirstIndexEqual( x.length, new AccessorArray( x ), 1, new AccessorArray( y ), 1 ); // $ExpectType number @@ -33,8 +33,8 @@ import gfirstIndexEqual = require( './index' ); // The compiler throws an error if the function is provided a first argument which is not a number... { - var x = [ 1.0, 2.0, 3.0 ]; - var y = [ 1.0, 2.0, 3.0 ]; + const x = [ 1.0, 2.0, 3.0 ]; + const y = [ 1.0, 2.0, 3.0 ]; gfirstIndexEqual( '1', x, 1, y, 1 ); // $ExpectError gfirstIndexEqual( true, x, 1, y, 1 ); // $ExpectError @@ -48,7 +48,7 @@ import gfirstIndexEqual = require( './index' ); // The compiler throws an error if the function is provided a second argument which is not a collection... { - var y = [ 1.0, 2.0, 3.0 ]; + const y = [ 1.0, 2.0, 3.0 ]; gfirstIndexEqual( 3, 10, 1, y, 1 ); // $ExpectError gfirstIndexEqual( 3, true, 1, y, 1 ); // $ExpectError @@ -60,8 +60,8 @@ import gfirstIndexEqual = require( './index' ); // The compiler throws an error if the function is provided a third argument which is not a number... { - var x = [ 1.0, 2.0, 3.0 ]; - var y = [ 1.0, 2.0, 3.0 ]; + const x = [ 1.0, 2.0, 3.0 ]; + const y = [ 1.0, 2.0, 3.0 ]; gfirstIndexEqual( x.length, x, '1', y, 1 ); // $ExpectError gfirstIndexEqual( x.length, x, true, y, 1 ); // $ExpectError @@ -75,7 +75,7 @@ import gfirstIndexEqual = require( './index' ); // The compiler throws an error if the function is provided a fourth argument which is not a collection... { - var x = [ 1.0, 2.0, 3.0 ]; + const x = [ 1.0, 2.0, 3.0 ]; gfirstIndexEqual( x.length, x, 1, 10, 1 ); // $ExpectError gfirstIndexEqual( x.length, x, 1, true, 1 ); // $ExpectError @@ -87,8 +87,8 @@ import gfirstIndexEqual = require( './index' ); // The compiler throws an error if the function is provided a fifth argument which is not a number... { - var x = [ 1.0, 2.0, 3.0 ]; - var y = [ 1.0, 2.0, 3.0 ]; + const x = [ 1.0, 2.0, 3.0 ]; + const y = [ 1.0, 2.0, 3.0 ]; gfirstIndexEqual( x.length, x, 1, y, '1' ); // $ExpectError gfirstIndexEqual( x.length, x, 1, y, true ); // $ExpectError @@ -102,8 +102,8 @@ import gfirstIndexEqual = require( './index' ); // The compiler throws an error if the function is provided an unsupported number of arguments... { - var x = [ 1.0, 2.0, 3.0 ]; - var y = [ 1.0, 2.0, 3.0 ]; + const x = [ 1.0, 2.0, 3.0 ]; + const y = [ 1.0, 2.0, 3.0 ]; gfirstIndexEqual(); // $ExpectError gfirstIndexEqual( 3 ); // $ExpectError @@ -115,8 +115,8 @@ import gfirstIndexEqual = require( './index' ); // Attached to main export is an `ndarray` method which returns a number... { - var x = [ 1.0, 2.0, 3.0 ]; - var y = [ 1.0, 2.0, 3.0 ]; + const x = [ 1.0, 2.0, 3.0 ]; + const y = [ 1.0, 2.0, 3.0 ]; gfirstIndexEqual.ndarray( x.length, x, 1, 0, y, 1, 0 ); // $ExpectType number gfirstIndexEqual.ndarray( x.length, new AccessorArray( x ), 1, 0, new AccessorArray( y ), 1, 0 ); // $ExpectType number @@ -124,8 +124,8 @@ import gfirstIndexEqual = require( './index' ); // The compiler throws an error if the `ndarray` method is provided a first argument which is not a number... { - var x = [ 1.0, 2.0, 3.0 ]; - var y = [ 1.0, 2.0, 3.0 ]; + const x = [ 1.0, 2.0, 3.0 ]; + const y = [ 1.0, 2.0, 3.0 ]; gfirstIndexEqual.ndarray( '1', x, 1, 0, y, 1, 0 ); // $ExpectError gfirstIndexEqual.ndarray( true, x, 1, 0, y, 1, 0 ); // $ExpectError @@ -139,7 +139,7 @@ import gfirstIndexEqual = require( './index' ); // The compiler throws an error if the `ndarray` method is provided a second argument which is not a collection... { - var y = [ 1.0, 2.0, 3.0 ]; + const y = [ 1.0, 2.0, 3.0 ]; gfirstIndexEqual.ndarray( 3, 10, 1, 0, y, 1, 0 ); // $ExpectError gfirstIndexEqual.ndarray( 3, true, 1, 0, y, 1, 0 ); // $ExpectError @@ -151,8 +151,8 @@ import gfirstIndexEqual = require( './index' ); // The compiler throws an error if the `ndarray` method is provided a third argument which is not a number... { - var x = [ 1.0, 2.0, 3.0 ]; - var y = [ 1.0, 2.0, 3.0 ]; + const x = [ 1.0, 2.0, 3.0 ]; + const y = [ 1.0, 2.0, 3.0 ]; gfirstIndexEqual.ndarray( x.length, x, '1', 0, y, 1, 0 ); // $ExpectError gfirstIndexEqual.ndarray( x.length, x, true, 0, y, 1, 0 ); // $ExpectError @@ -166,8 +166,8 @@ import gfirstIndexEqual = require( './index' ); // The compiler throws an error if the `ndarray` method is provided a fourth argument which is not a number... { - var x = [ 1.0, 2.0, 3.0 ]; - var y = [ 1.0, 2.0, 3.0 ]; + const x = [ 1.0, 2.0, 3.0 ]; + const y = [ 1.0, 2.0, 3.0 ]; gfirstIndexEqual.ndarray( x.length, x, 1, '1', y, 1, 0 ); // $ExpectError gfirstIndexEqual.ndarray( x.length, x, 1, true, y, 1, 0 ); // $ExpectError @@ -181,7 +181,7 @@ import gfirstIndexEqual = require( './index' ); // The compiler throws an error if the `ndarray` method is provided a fifth argument which is not a collection... { - var x = [ 1.0, 2.0, 3.0 ]; + const x = [ 1.0, 2.0, 3.0 ]; gfirstIndexEqual.ndarray( x.length, x, 1, 0, 10, 1, 0 ); // $ExpectError gfirstIndexEqual.ndarray( x.length, x, 1, 0, true, 1, 0 ); // $ExpectError @@ -193,8 +193,8 @@ import gfirstIndexEqual = require( './index' ); // The compiler throws an error if the `ndarray` method is provided a sixth argument which is not a number... { - var x = [ 1.0, 2.0, 3.0 ]; - var y = [ 1.0, 2.0, 3.0 ]; + const x = [ 1.0, 2.0, 3.0 ]; + const y = [ 1.0, 2.0, 3.0 ]; gfirstIndexEqual.ndarray( x.length, x, 1, 0, y, '1', 0 ); // $ExpectError gfirstIndexEqual.ndarray( x.length, x, 1, 0, y, true, 0 ); // $ExpectError @@ -208,8 +208,8 @@ import gfirstIndexEqual = require( './index' ); // The compiler throws an error if the `ndarray` method is provided a seventh argument which is not a number... { - var x = [ 1.0, 2.0, 3.0 ]; - var y = [ 1.0, 2.0, 3.0 ]; + const x = [ 1.0, 2.0, 3.0 ]; + const y = [ 1.0, 2.0, 3.0 ]; gfirstIndexEqual.ndarray( x.length, x, 1, 0, y, 1, '1' ); // $ExpectError gfirstIndexEqual.ndarray( x.length, x, 1, 0, y, 1, true ); // $ExpectError @@ -223,8 +223,8 @@ import gfirstIndexEqual = require( './index' ); // The compiler throws an error if the `ndarray` method is provided an unsupported number of arguments... { - var x = [ 1.0, 2.0, 3.0 ]; - var y = [ 1.0, 2.0, 3.0 ]; + const x = [ 1.0, 2.0, 3.0 ]; + const y = [ 1.0, 2.0, 3.0 ]; gfirstIndexEqual.ndarray(); // $ExpectError gfirstIndexEqual.ndarray( 3 ); // $ExpectError From c1cac958b1f3ca57dfe7efa5f60e530f2dcc4e32 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 5 Jul 2026 12:28:43 +0000 Subject: [PATCH 2/6] docs: fix duplicate `var y` in `stats/base/dists/log-logistic/cdf` example Drop the redundant `var` in the module-level `@example` so the second `y` is a reassignment rather than a redeclaration, matching the sibling `logistic/cdf` example convention. --- .../@stdlib/stats/base/dists/log-logistic/cdf/lib/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/lib/index.js b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/lib/index.js index 29c170b3cf73..56483b34ad38 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/lib/index.js +++ b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/lib/index.js @@ -30,7 +30,7 @@ * // returns ~0.667 * * var myCDF = cdf.factory( 1.0, 1.0 ); -* var y = myCDF( 2.0 ); +* y = myCDF( 2.0 ); * // returns ~0.667 */ From 8a4d08d69c502d56d65cf1ffaeaa239ce1088885 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 5 Jul 2026 12:28:54 +0000 Subject: [PATCH 3/6] docs: fix duplicate `var y` in `stats/base/dists/log-logistic/quantile` example Drop the redundant `var` in the module-level `@example` so the second `y` is a reassignment rather than a redeclaration, matching the sibling `logistic/quantile` example convention. --- .../@stdlib/stats/base/dists/log-logistic/quantile/lib/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/log-logistic/quantile/lib/index.js b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/quantile/lib/index.js index 975f1dc888f2..440c490c445d 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/log-logistic/quantile/lib/index.js +++ b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/quantile/lib/index.js @@ -30,7 +30,7 @@ * // returns 1.0 * * var myQuantile = quantile.factory( 1.0, 1.0 ); -* var y = myQuantile( 0.5 ); +* y = myQuantile( 0.5 ); * // returns 1.0 */ From 18fc7f07a16f03241fcea98f3e02210ed6e06fc1 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 5 Jul 2026 12:28:54 +0000 Subject: [PATCH 4/6] style: align docs in `stats/base/dists/anglit/stdev` with siblings Fix native.js `@returns` type to `PositiveNumber` (matches main.js and sibling anglit/variance/lib/native.js) and drop a stray blank line before the related-packages section in the README (every other README in this batch uses a single blank line here). --- .../@stdlib/stats/base/dists/anglit/stdev/README.md | 1 - .../@stdlib/stats/base/dists/anglit/stdev/lib/native.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/anglit/stdev/README.md b/lib/node_modules/@stdlib/stats/base/dists/anglit/stdev/README.md index 24f885e5a1ce..dbf19dcfe160 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/anglit/stdev/README.md +++ b/lib/node_modules/@stdlib/stats/base/dists/anglit/stdev/README.md @@ -217,7 +217,6 @@ int main( void ) { - diff --git a/lib/node_modules/@stdlib/stats/base/dists/anglit/stdev/lib/native.js b/lib/node_modules/@stdlib/stats/base/dists/anglit/stdev/lib/native.js index 98adc416cd61..c15eb90a22cf 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/anglit/stdev/lib/native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/anglit/stdev/lib/native.js @@ -31,7 +31,7 @@ var addon = require( './../src/addon.node' ); * @private * @param {number} mu - location parameter * @param {PositiveNumber} sigma - scale parameter -* @returns {number} standard deviation +* @returns {PositiveNumber} standard deviation * * @example * var y = stdev( 0.0, 1.0 ); From d7a09b5e0d2c95316aba392b9f7248bb6d39a48e Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 5 Jul 2026 12:28:55 +0000 Subject: [PATCH 5/6] style: align docs and C style in `stats/base/dists/lognormal/logcdf` Rewrite native.js JSDoc to describe `mu`/`sigma` as `location parameter`/`scale parameter` to match main.js (wording had been copy-pasted from `normal/cdf` template). Add interior spaces to the `( lx < mu )` ternary in src/main.c to match the file's own conditional-spacing convention. --- .../stats/base/dists/lognormal/logcdf/lib/native.js | 8 ++++---- .../@stdlib/stats/base/dists/lognormal/logcdf/src/main.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/lognormal/logcdf/lib/native.js b/lib/node_modules/@stdlib/stats/base/dists/lognormal/logcdf/lib/native.js index 6974225173e1..268746e09995 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/lognormal/logcdf/lib/native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/lognormal/logcdf/lib/native.js @@ -26,12 +26,12 @@ var addon = require( './../src/addon.node' ); // MAIN // /** -* Evaluates the natural logarithm of the cumulative distribution function (CDF) for a lognormal distribution with mean `mu` and standard deviation `sigma` at a value `x`. +* Evaluates the natural logarithm of the cumulative distribution function (CDF) for a lognormal distribution with location parameter `mu` and scale parameter `sigma` at a value `x`. * * @private * @param {number} x - input value -* @param {number} mu - mean -* @param {NonNegativeNumber} sigma - standard deviation +* @param {number} mu - location parameter +* @param {NonNegativeNumber} sigma - scale parameter * @returns {number} evaluated logCDF * * @example @@ -55,7 +55,7 @@ var addon = require( './../src/addon.node' ); * // returns NaN * * @example -* // Negative standard deviation: +* // Negative scale parameter: * var y = logcdf( 2.0, 0.0, -1.0 ); * // returns NaN */ diff --git a/lib/node_modules/@stdlib/stats/base/dists/lognormal/logcdf/src/main.c b/lib/node_modules/@stdlib/stats/base/dists/lognormal/logcdf/src/main.c index 7871d86e12e1..bcfa408892fc 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/lognormal/logcdf/src/main.c +++ b/lib/node_modules/@stdlib/stats/base/dists/lognormal/logcdf/src/main.c @@ -56,7 +56,7 @@ double stdlib_base_dists_lognormal_logcdf( const double x, const double mu, cons } lx = stdlib_base_ln( x ); if ( sigma == 0.0 ) { - return (lx < mu) ? STDLIB_CONSTANT_FLOAT64_NINF : 0.0; + return ( lx < mu ) ? STDLIB_CONSTANT_FLOAT64_NINF : 0.0; } z = ( lx - mu ) / sigma; From bb79f4b71377da45089f6e2068c06f5fe0aa692e Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 5 Jul 2026 12:28:55 +0000 Subject: [PATCH 6/6] docs: close unbalanced parenthesis in `stats/base/dists/f/pdf` test description The tape title for large `d1`/`d2` values opened `(tested against the Boost C++ library` but omitted the closing paren, unlike the two adjacent tape titles. --- .../@stdlib/stats/base/dists/f/pdf/test/test.native.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/f/pdf/test/test.native.js b/lib/node_modules/@stdlib/stats/base/dists/f/pdf/test/test.native.js index f7b72cf0276d..7809a3a9c48e 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/f/pdf/test/test.native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/f/pdf/test/test.native.js @@ -236,7 +236,7 @@ tape( 'the function evaluates the pdf for `x` given large parameter `d2` (tested t.end(); }); -tape( 'the function evaluates the pdf for `x` given large `d1` and `d2` (tested against the Boost C++ library', opts, function test( t ) { +tape( 'the function evaluates the pdf for `x` given large `d1` and `d2` (tested against the Boost C++ library)', opts, function test( t ) { var expected; var d1; var d2;