From 0a50089207cb14860d00ba337d3092d7fb3ef104 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 10 Oct 2026 04:37:31 +0000 Subject: [PATCH 1/7] bench: add benchmarks to `stats/kde2d` Added missing `benchmark/benchmark.js` (present in 56 of 57 `@stdlib/stats` siblings, 98%) and the corresponding `directories.benchmark` entry in `package.json` (98% of siblings). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01LMYQtSzimuL2KBLtWEqocz --- .../stats/kde2d/benchmark/benchmark.js | 94 +++++++++++++++++++ .../@stdlib/stats/kde2d/package.json | 1 + 2 files changed, 95 insertions(+) create mode 100644 lib/node_modules/@stdlib/stats/kde2d/benchmark/benchmark.js diff --git a/lib/node_modules/@stdlib/stats/kde2d/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/kde2d/benchmark/benchmark.js new file mode 100644 index 000000000000..4e791776d7e2 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/kde2d/benchmark/benchmark.js @@ -0,0 +1,94 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 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 Float64Array = require( '@stdlib/array/float64' ); +var randu = require( '@stdlib/random/base/randu' ); +var isObject = require( '@stdlib/assert/is-object' ); +var format = require( '@stdlib/string/format' ); +var pkg = require( './../package.json' ).name; +var kde2d = require( './../lib' ); + + +// MAIN // + +bench( pkg, function benchmark( b ) { + var result; + var x; + var y; + var i; + + x = new Float64Array( 100 ); + y = new Float64Array( x.length ); + for ( i = 0; i < x.length; i++ ) { + x[ i ] = randu() * 10.0; + y[ i ] = ( 0.5*x[ i ] ) + randu(); + } + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + x[ 0 ] = randu() * 10.0; + result = kde2d( x, y ); + if ( typeof result !== 'object' ) { + b.fail( 'should return an object' ); + } + } + b.toc(); + if ( !isObject( result ) ) { + b.fail( 'should return an object' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( format( '%s:n=10', pkg ), function benchmark( b ) { + var result; + var opts; + var x; + var y; + var i; + + x = new Float64Array( 100 ); + y = new Float64Array( x.length ); + for ( i = 0; i < x.length; i++ ) { + x[ i ] = randu() * 10.0; + y[ i ] = ( 0.5*x[ i ] ) + randu(); + } + opts = { + 'n': 10 + }; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + x[ 0 ] = randu() * 10.0; + result = kde2d( x, y, opts ); + if ( typeof result !== 'object' ) { + b.fail( 'should return an object' ); + } + } + b.toc(); + if ( !isObject( result ) ) { + b.fail( 'should return an object' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/stats/kde2d/package.json b/lib/node_modules/@stdlib/stats/kde2d/package.json index 4322a353621b..24abba25ee9a 100644 --- a/lib/node_modules/@stdlib/stats/kde2d/package.json +++ b/lib/node_modules/@stdlib/stats/kde2d/package.json @@ -15,6 +15,7 @@ ], "main": "./lib", "directories": { + "benchmark": "./benchmark", "doc": "./docs", "example": "./examples", "lib": "./lib", From 6a8844c439d5466961a90eac4d573bf249c37723 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 10 Oct 2026 04:40:21 +0000 Subject: [PATCH 2/7] docs: add JSDoc example to `stats/anova1` Added missing `@example` to the main function JSDoc in `lib/main.js` (present in 52 of 57 `@stdlib/stats` siblings, 91%). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01LMYQtSzimuL2KBLtWEqocz --- lib/node_modules/@stdlib/stats/anova1/lib/main.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/node_modules/@stdlib/stats/anova1/lib/main.js b/lib/node_modules/@stdlib/stats/anova1/lib/main.js index 4aba1935490b..fa36f18835b5 100644 --- a/lib/node_modules/@stdlib/stats/anova1/lib/main.js +++ b/lib/node_modules/@stdlib/stats/anova1/lib/main.js @@ -52,6 +52,13 @@ var prettyPrint = require( './print.js' ); * @throws {RangeError} length of `x` must be greater than or equal to two * @throws {RangeError} `x` and `factor` must have the same length * @returns {Object} test results +* +* @example +* var x = [ 1, 3, 5, 2, 4, 6, 8, 7, 10, 11, 12, 15 ]; +* var f = [ 'control', 'treatA', 'treatB', 'treatC', 'control', 'treatA', 'treatB', 'treatC', 'control', 'treatA', 'treatB', 'treatC' ]; +* +* var out = anova1( x, f ); +* // returns {...} */ function anova1( x, factor, options ) { var meanSumSqTreat; // Mean sum of squares From 7ae2ec28657911aecca85858a9b3d608b50a06e1 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 10 Oct 2026 04:40:22 +0000 Subject: [PATCH 3/7] docs: add JSDoc example to `stats/binomial-test` Added missing `@example` to the main function JSDoc in `lib/main.js` (present in 52 of 57 `@stdlib/stats` siblings, 91%). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01LMYQtSzimuL2KBLtWEqocz --- .../@stdlib/stats/binomial-test/lib/main.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/node_modules/@stdlib/stats/binomial-test/lib/main.js b/lib/node_modules/@stdlib/stats/binomial-test/lib/main.js index a6f7c30fdd4d..82c9ee0ee02a 100644 --- a/lib/node_modules/@stdlib/stats/binomial-test/lib/main.js +++ b/lib/node_modules/@stdlib/stats/binomial-test/lib/main.js @@ -84,6 +84,17 @@ function upper( x, n, alpha ) { * @throws {TypeError} alternative option has to be a string * @throws {Error} alternative option must be `two-sided`, `less` or `greater` * @returns {Object} test results +* +* @example +* var out = binomialTest( 682, 925 ); +* // returns {...} +* +* @example +* var out = binomialTest( 682, 925, { +* 'p': 0.75, +* 'alpha': 0.05 +* }); +* // returns {...} */ function binomialTest() { var alpha; From 5854cdd087a3051365ea8102fef653ef92702838 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 10 Oct 2026 04:40:22 +0000 Subject: [PATCH 4/7] docs: add JSDoc example to `stats/ttest2` Added missing `@example` to the main function JSDoc in `lib/main.js` (present in 52 of 57 `@stdlib/stats` siblings, 91%). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01LMYQtSzimuL2KBLtWEqocz --- lib/node_modules/@stdlib/stats/ttest2/lib/main.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/node_modules/@stdlib/stats/ttest2/lib/main.js b/lib/node_modules/@stdlib/stats/ttest2/lib/main.js index 51fbca7b3c61..ee0be15f5aeb 100644 --- a/lib/node_modules/@stdlib/stats/ttest2/lib/main.js +++ b/lib/node_modules/@stdlib/stats/ttest2/lib/main.js @@ -60,6 +60,13 @@ var print = require( './print.js' ); // eslint-disable-line stdlib/no-redeclare * @throws {TypeError} variance option has to be a string * @throws {Error} variance option must be `equal` or `unequal` * @returns {Object} test result object +* +* @example +* var x = [ 0.7, -1.6, -0.2, -1.2, -0.1, 3.4, 3.7, 0.8, 0.0, 2.0 ]; +* var y = [ 1.9, 0.8, 1.1, 0.1, -0.1, 4.4, 5.5, 1.6, 4.6, 3.4 ]; +* +* var out = ttest2( x, y ); +* // returns {...} */ function ttest2( x, y, options ) { var stderr; From c20863f53f6eca31dd2914653a01307de18cd202 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 10 Oct 2026 04:40:23 +0000 Subject: [PATCH 5/7] docs: add JSDoc example to `stats/ztest2` Added missing `@example` to the main function JSDoc in `lib/main.js` (present in 52 of 57 `@stdlib/stats` siblings, 91%). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01LMYQtSzimuL2KBLtWEqocz --- lib/node_modules/@stdlib/stats/ztest2/lib/main.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/node_modules/@stdlib/stats/ztest2/lib/main.js b/lib/node_modules/@stdlib/stats/ztest2/lib/main.js index f22a533d462e..30f99ea6e530 100644 --- a/lib/node_modules/@stdlib/stats/ztest2/lib/main.js +++ b/lib/node_modules/@stdlib/stats/ztest2/lib/main.js @@ -63,6 +63,13 @@ var normCDF = cdfFactory( 0.0, 1.0 ); * @throws {TypeError} must provide valid options * @throws {Error} `alternative` option must be either `two-sided`, `less`, or `greater` * @returns {Object} test result object +* +* @example +* var x = [ 2.66, 1.5, 3.25, 0.993, 2.31, 2.41, 1.76, 2.57, 2.62, 1.23 ]; +* var y = [ 4.88, 2.93, 2.96, 4.5, -0.0603, 4.62, 3.35, 2.98 ]; +* +* var out = ztest2( x, y, 1.0, 2.0 ); +* // returns {...} */ function ztest2( x, y, sigmax, sigmay, options ) { var stderr; From 00ff00cc53ceb0ce75afef90e3e5e6d2dd0fe919 Mon Sep 17 00:00:00 2001 From: Athan Date: Sun, 11 Oct 2026 14:34:07 +0200 Subject: [PATCH 6/7] Discard changes to lib/node_modules/@stdlib/stats/kde2d/benchmark/benchmark.js --- .../stats/kde2d/benchmark/benchmark.js | 94 ------------------- 1 file changed, 94 deletions(-) delete mode 100644 lib/node_modules/@stdlib/stats/kde2d/benchmark/benchmark.js diff --git a/lib/node_modules/@stdlib/stats/kde2d/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/kde2d/benchmark/benchmark.js deleted file mode 100644 index 4e791776d7e2..000000000000 --- a/lib/node_modules/@stdlib/stats/kde2d/benchmark/benchmark.js +++ /dev/null @@ -1,94 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2026 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 Float64Array = require( '@stdlib/array/float64' ); -var randu = require( '@stdlib/random/base/randu' ); -var isObject = require( '@stdlib/assert/is-object' ); -var format = require( '@stdlib/string/format' ); -var pkg = require( './../package.json' ).name; -var kde2d = require( './../lib' ); - - -// MAIN // - -bench( pkg, function benchmark( b ) { - var result; - var x; - var y; - var i; - - x = new Float64Array( 100 ); - y = new Float64Array( x.length ); - for ( i = 0; i < x.length; i++ ) { - x[ i ] = randu() * 10.0; - y[ i ] = ( 0.5*x[ i ] ) + randu(); - } - - b.tic(); - for ( i = 0; i < b.iterations; i++ ) { - x[ 0 ] = randu() * 10.0; - result = kde2d( x, y ); - if ( typeof result !== 'object' ) { - b.fail( 'should return an object' ); - } - } - b.toc(); - if ( !isObject( result ) ) { - b.fail( 'should return an object' ); - } - b.pass( 'benchmark finished' ); - b.end(); -}); - -bench( format( '%s:n=10', pkg ), function benchmark( b ) { - var result; - var opts; - var x; - var y; - var i; - - x = new Float64Array( 100 ); - y = new Float64Array( x.length ); - for ( i = 0; i < x.length; i++ ) { - x[ i ] = randu() * 10.0; - y[ i ] = ( 0.5*x[ i ] ) + randu(); - } - opts = { - 'n': 10 - }; - - b.tic(); - for ( i = 0; i < b.iterations; i++ ) { - x[ 0 ] = randu() * 10.0; - result = kde2d( x, y, opts ); - if ( typeof result !== 'object' ) { - b.fail( 'should return an object' ); - } - } - b.toc(); - if ( !isObject( result ) ) { - b.fail( 'should return an object' ); - } - b.pass( 'benchmark finished' ); - b.end(); -}); From 3e84380c93c86c006bfd2840cecb119c21c3681a Mon Sep 17 00:00:00 2001 From: Athan Date: Sun, 11 Oct 2026 14:34:13 +0200 Subject: [PATCH 7/7] Discard changes to lib/node_modules/@stdlib/stats/kde2d/package.json --- lib/node_modules/@stdlib/stats/kde2d/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/node_modules/@stdlib/stats/kde2d/package.json b/lib/node_modules/@stdlib/stats/kde2d/package.json index 24abba25ee9a..4322a353621b 100644 --- a/lib/node_modules/@stdlib/stats/kde2d/package.json +++ b/lib/node_modules/@stdlib/stats/kde2d/package.json @@ -15,7 +15,6 @@ ], "main": "./lib", "directories": { - "benchmark": "./benchmark", "doc": "./docs", "example": "./examples", "lib": "./lib",