From ca2eab057b04c64c154ae1e57cf92d1a742a6730 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 4 Oct 2026 20:39:29 +0000 Subject: [PATCH 1/2] fix: update error message in `random/iter/frechet` Updated the third-argument `TypeError` message to "must be a number and not NaN" to match the `!isNumber( m ) || isnan( m )` predicate. This is the message used for the same predicate in 15 of 16 such checks across `random/iter` siblings (94%) and in `random/base/frechet`. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01VEFEdGXxS5GMXpwxwp2YiX --- lib/node_modules/@stdlib/random/iter/frechet/lib/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/random/iter/frechet/lib/main.js b/lib/node_modules/@stdlib/random/iter/frechet/lib/main.js index b45e4867d26e..d7706a635185 100644 --- a/lib/node_modules/@stdlib/random/iter/frechet/lib/main.js +++ b/lib/node_modules/@stdlib/random/iter/frechet/lib/main.js @@ -87,7 +87,7 @@ function iterator( alpha, s, m, options ) { throw new TypeError( format( 'invalid argument. Second argument must be a positive number. Value: `%s`.', s ) ); } if ( !isNumber( m ) || isnan( m ) ) { - throw new TypeError( format( 'invalid argument. Third argument must be a number. Value: `%s`.', m ) ); + throw new TypeError( format( 'invalid argument. Third argument must be a number and not NaN. Value: `%s`.', m ) ); } if ( arguments.length > 3 ) { if ( !isObject( options ) ) { From a8a2d6743ea70a6eb95d1d007793463011b25585 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 4 Oct 2026 20:39:29 +0000 Subject: [PATCH 2/2] fix: update error message in `random/iter/negative-binomial` Updated the first-argument `TypeError` message from "positive integer" to "positive number" to match the `isPositiveNumber` predicate, the package's own JSDoc (`@param {PositiveNumber} r`, `@throws`), and `random/base/negative-binomial`. `isPositiveNumber` checks use "positive number" in 33 of 34 cases across `random/iter` (97%). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01VEFEdGXxS5GMXpwxwp2YiX --- .../@stdlib/random/iter/negative-binomial/lib/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/random/iter/negative-binomial/lib/main.js b/lib/node_modules/@stdlib/random/iter/negative-binomial/lib/main.js index ecfed4ab921d..86e95fa05457 100644 --- a/lib/node_modules/@stdlib/random/iter/negative-binomial/lib/main.js +++ b/lib/node_modules/@stdlib/random/iter/negative-binomial/lib/main.js @@ -78,7 +78,7 @@ function iterator( r, p, options ) { var FLG; var i; if ( !isPositiveNumber( r ) ) { - throw new TypeError( format( 'invalid argument. First argument must be a positive integer. Value: `%s`.', r ) ); + throw new TypeError( format( 'invalid argument. First argument must be a positive number. Value: `%s`.', r ) ); } if ( !isProbability( p ) ) { throw new TypeError( format( 'invalid argument. Second argument must be a probability. Value: `%s`.', p ) );