From f9060c62c6824dd387e90a7ed7b5e341d9258078 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 6 Jul 2026 12:31:19 +0000 Subject: [PATCH 1/5] fix: correct ndarray signature and accessor test bounds in `blas/ext/base/gindex-of-same-value` Follow-up to 0cf99ac9: - `docs/repl.txt`: second signature block describes the ndarray method but was missing the `.ndarray` suffix on the header line. - `test/test.ndarray.js`: three assertions in the accessor variant passed `N = x.length` with nonzero `offsetX`, walking reads past the end of the 6-element accessor array; mirror the correct `x.length-1`/`x.length-2` bounds already used in the non-accessor block directly above. --- .../blas/ext/base/gindex-of-same-value/docs/repl.txt | 2 +- .../blas/ext/base/gindex-of-same-value/test/test.ndarray.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/ext/base/gindex-of-same-value/docs/repl.txt b/lib/node_modules/@stdlib/blas/ext/base/gindex-of-same-value/docs/repl.txt index eceff816e385..5de6c917b347 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/gindex-of-same-value/docs/repl.txt +++ b/lib/node_modules/@stdlib/blas/ext/base/gindex-of-same-value/docs/repl.txt @@ -49,7 +49,7 @@ 2 -{{alias}}( N, searchElement, x, strideX, offsetX ) +{{alias}}.ndarray( N, searchElement, x, strideX, offsetX ) Returns the index of the first element in a strided array which has the same value as a provided search element using alternative indexing semantics. diff --git a/lib/node_modules/@stdlib/blas/ext/base/gindex-of-same-value/test/test.ndarray.js b/lib/node_modules/@stdlib/blas/ext/base/gindex-of-same-value/test/test.ndarray.js index 0787ed4e632a..a8c3b2017a83 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/gindex-of-same-value/test/test.ndarray.js +++ b/lib/node_modules/@stdlib/blas/ext/base/gindex-of-same-value/test/test.ndarray.js @@ -83,13 +83,13 @@ tape( 'the function returns the first index of an element which has the same val actual = gindexOfSameValue( x.length, 1.0, x, 1, 0 ); t.strictEqual( actual, 0, 'returns expected value' ); - actual = gindexOfSameValue( x.length, 2.0, x, 1, 1 ); + actual = gindexOfSameValue( x.length-1, 2.0, x, 1, 1 ); t.strictEqual( actual, 1, 'returns expected value' ); - actual = gindexOfSameValue( x.length, 3.0, x, 1, 2 ); + actual = gindexOfSameValue( x.length-2, 3.0, x, 1, 2 ); t.strictEqual( actual, 2, 'returns expected value' ); - actual = gindexOfSameValue( x.length, 4.0, x, 1, 2 ); + actual = gindexOfSameValue( x.length-2, 4.0, x, 1, 2 ); t.strictEqual( actual, -1, 'returns expected value' ); // Negative stride... From 96db5e83f09f3e39b0d7e378afb7b688db5f199d Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 6 Jul 2026 12:31:31 +0000 Subject: [PATCH 2/5] fix: correct REPL `trans` example in `blas/base/ndarray/cgemv` Follow-up to 6812e0b4. The REPL example wrapped the raw string `'no-transpose'` in `from-scalar` with no dtype. The ndarray callee expects `trans` as an int8-encoded enum resolved via `@stdlib/blas/base/transpose-operation-resolve-enum`, as done in the same package's main.js JSDoc, README, examples, benchmarks, and tests. Route the string through `resolveEnum` and set `dtype: 'int8'` so the block matches the rest of the package. --- lib/node_modules/@stdlib/blas/base/ndarray/cgemv/docs/repl.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/blas/base/ndarray/cgemv/docs/repl.txt b/lib/node_modules/@stdlib/blas/base/ndarray/cgemv/docs/repl.txt index 44f44c2eba7a..29c83c5975ff 100644 --- a/lib/node_modules/@stdlib/blas/base/ndarray/cgemv/docs/repl.txt +++ b/lib/node_modules/@stdlib/blas/base/ndarray/cgemv/docs/repl.txt @@ -43,7 +43,7 @@ > var cb = new {{alias:@stdlib/complex/float32/ctor}}( 1.0, 0.0 ); > var beta = {{alias:@stdlib/ndarray/from-scalar}}( cb, opts ); - > var trans = {{alias:@stdlib/ndarray/from-scalar}}( 'no-transpose' ); + > var trans = {{alias:@stdlib/ndarray/from-scalar}}( {{alias:@stdlib/blas/base/transpose-operation-resolve-enum}}( 'no-transpose' ), { 'dtype': 'int8' } ); > {{alias}}( [ A, x, y, trans, alpha, beta ] ); > y From a99cc9e1b53301a01925f37e2ebfda0359970067 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 6 Jul 2026 12:31:58 +0000 Subject: [PATCH 3/5] docs: fix accumulator example in `stats/incr/nanpcorr2` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow-up to 6570c4fe. The `@example` block in main.js and the identical examples in docs/types/index.d.ts and docs/repl.txt only supplied one valid `(x, y)` pair followed by four NaN-poisoned calls, so the correlation never accumulated a second data point and the result stayed at 0.0 for every follow-up call — failing to demonstrate that NaN inputs are ignored. Interleave a second valid pair `accumulator( 1.0, 90.0 )` (mirroring the README) so subsequent NaN calls correctly show `~1.0`. --- .../@stdlib/stats/incr/nanpcorr2/docs/repl.txt | 10 ++++++---- .../stats/incr/nanpcorr2/docs/types/index.d.ts | 11 +++++++---- .../@stdlib/stats/incr/nanpcorr2/lib/main.js | 11 +++++++---- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/incr/nanpcorr2/docs/repl.txt b/lib/node_modules/@stdlib/stats/incr/nanpcorr2/docs/repl.txt index 1dd56b1b2ca6..0acb28ddd56b 100644 --- a/lib/node_modules/@stdlib/stats/incr/nanpcorr2/docs/repl.txt +++ b/lib/node_modules/@stdlib/stats/incr/nanpcorr2/docs/repl.txt @@ -27,14 +27,16 @@ null > r2 = accumulator( 2.0, 1.0 ) 0.0 + > r2 = accumulator( 1.0, 90.0 ) + 1.0 > r2 = accumulator( -5.0, NaN ) - ~0.0 + ~1.0 > r2 = accumulator( NaN, NaN ) - ~0.0 + ~1.0 > r2 = accumulator( NaN, -8.0 ) - ~0.0 + ~1.0 > r2 = accumulator() - ~0.0 + ~1.0 See Also -------- diff --git a/lib/node_modules/@stdlib/stats/incr/nanpcorr2/docs/types/index.d.ts b/lib/node_modules/@stdlib/stats/incr/nanpcorr2/docs/types/index.d.ts index d27212e531e6..584c166acbeb 100644 --- a/lib/node_modules/@stdlib/stats/incr/nanpcorr2/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/stats/incr/nanpcorr2/docs/types/index.d.ts @@ -55,17 +55,20 @@ declare function incrnanpcorr2( meanx: number, meany: number ): accumulator; * r2 = accumulator( 2.0, 1.0 ); * // returns 0.0 * +* r2 = accumulator( 1.0, 90.0 ); +* // returns 1.0 +* * r2 = accumulator( -5.0, NaN ); -* // returns ~0.0 +* // returns ~1.0 * * r2 = accumulator( NaN, NaN ); -* // returns ~0.0 +* // returns ~1.0 * * r2 = accumulator( NaN, 8.0 ); -* // returns ~0.0 +* // returns ~1.0 * * r2 = accumulator(); -* // returns ~0.0 +* // returns ~1.0 */ declare function incrnanpcorr2(): accumulator; diff --git a/lib/node_modules/@stdlib/stats/incr/nanpcorr2/lib/main.js b/lib/node_modules/@stdlib/stats/incr/nanpcorr2/lib/main.js index 9202be611535..3864dbebbdfa 100644 --- a/lib/node_modules/@stdlib/stats/incr/nanpcorr2/lib/main.js +++ b/lib/node_modules/@stdlib/stats/incr/nanpcorr2/lib/main.js @@ -44,17 +44,20 @@ var incrpcorr2 = require( '@stdlib/stats/incr/pcorr2' ); * r2 = accumulator( 2.0, 1.0 ); * // returns 0.0 * +* r2 = accumulator( 1.0, 90.0 ); +* // returns 1.0 +* * r2 = accumulator( -5.0, NaN ); -* // returns ~0.0 +* // returns ~1.0 * * r2 = accumulator( NaN, NaN ); -* // returns ~0.0 +* // returns ~1.0 * * r2 = accumulator( NaN, 8.0 ); -* // returns ~0.0 +* // returns ~1.0 * * r2 = accumulator(); -* // returns ~0.0 +* // returns ~1.0 * * @example * var accumulator = incrnanpcorr2( 2.0, -3.0 ); From 08c509dc53dd4c3e31512134044fc10b8bc72d45 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 6 Jul 2026 12:36:20 +0000 Subject: [PATCH 4/5] style: fix max-len warnings in `blas/ext/base/gindex-of-same-value` test Hoist the `toAccessorArray( [ 1.0, 2.0, 3.0 ] )` literal into a local variable in the accessor-variant `N <= 0` test so the two assertion lines fit within the 80-character limit. Pre-existing warnings surfaced on this PR because the `Lint Changed Files` action re-lints the whole file. --- .../ext/base/gindex-of-same-value/test/test.ndarray.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/ext/base/gindex-of-same-value/test/test.ndarray.js b/lib/node_modules/@stdlib/blas/ext/base/gindex-of-same-value/test/test.ndarray.js index a8c3b2017a83..67d6f0bc86c5 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/gindex-of-same-value/test/test.ndarray.js +++ b/lib/node_modules/@stdlib/blas/ext/base/gindex-of-same-value/test/test.ndarray.js @@ -122,11 +122,14 @@ tape( 'the function returns `-1` if provided `N` parameter is less than or equal tape( 'the function returns `-1` if provided `N` parameter is less than or equal to zero (accessors)', function test( t ) { var actual; + var x; + + x = toAccessorArray( [ 1.0, 2.0, 3.0 ] ); - actual = gindexOfSameValue( 0, 2.0, toAccessorArray( [ 1.0, 2.0, 3.0 ] ), 1, 0 ); + actual = gindexOfSameValue( 0, 2.0, x, 1, 0 ); t.strictEqual( actual, -1, 'returns expected value' ); - actual = gindexOfSameValue( -1, 2.0, toAccessorArray( [ 1.0, 2.0, 3.0 ] ), 1, 0 ); + actual = gindexOfSameValue( -1, 2.0, x, 1, 0 ); t.strictEqual( actual, -1, 'returns expected value' ); t.end(); From 67255a83c384a1a94950fa1e7405f73dea69f004 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 6 Jul 2026 12:39:51 +0000 Subject: [PATCH 5/5] Revert "fix: correct REPL `trans` example in `blas/base/ndarray/cgemv`" This reverts commit 96db5e83f09f3e39b0d7e378afb7b688db5f199d. --- lib/node_modules/@stdlib/blas/base/ndarray/cgemv/docs/repl.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/blas/base/ndarray/cgemv/docs/repl.txt b/lib/node_modules/@stdlib/blas/base/ndarray/cgemv/docs/repl.txt index 29c83c5975ff..44f44c2eba7a 100644 --- a/lib/node_modules/@stdlib/blas/base/ndarray/cgemv/docs/repl.txt +++ b/lib/node_modules/@stdlib/blas/base/ndarray/cgemv/docs/repl.txt @@ -43,7 +43,7 @@ > var cb = new {{alias:@stdlib/complex/float32/ctor}}( 1.0, 0.0 ); > var beta = {{alias:@stdlib/ndarray/from-scalar}}( cb, opts ); - > var trans = {{alias:@stdlib/ndarray/from-scalar}}( {{alias:@stdlib/blas/base/transpose-operation-resolve-enum}}( 'no-transpose' ), { 'dtype': 'int8' } ); + > var trans = {{alias:@stdlib/ndarray/from-scalar}}( 'no-transpose' ); > {{alias}}( [ A, x, y, trans, alpha, beta ] ); > y