From 5549ed9cef2ed48eaeb2054214892111752b5ac1 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 1 Jun 2026 12:31:02 +0000 Subject: [PATCH 1/4] fix: return workspace array when `N` is one in `fft/base/fftpack/rffti` The JSDoc and TypeScript declaration both promise to return the workspace array, but the `N === 1` short-circuit returned `undefined`, breaking the documented `out === workspace` contract. --- lib/node_modules/@stdlib/fft/base/fftpack/rffti/lib/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/fft/base/fftpack/rffti/lib/main.js b/lib/node_modules/@stdlib/fft/base/fftpack/rffti/lib/main.js index 08aafc0ffdb1..aca16a37c33f 100644 --- a/lib/node_modules/@stdlib/fft/base/fftpack/rffti/lib/main.js +++ b/lib/node_modules/@stdlib/fft/base/fftpack/rffti/lib/main.js @@ -158,7 +158,7 @@ function rffti( N, workspace, strideW, offsetW ) { // When a sub-sequence is a single data point, the FFT is the identity, so no initialization necessary... if ( N === 1 ) { - return; + return workspace; } // Resolve the starting indices for storing twiddle factors and factorization results: offsetT = offsetW + ( N*strideW ); // index offset for twiddle factors From e742015788229ea7cce788eec30c63fb07aa22ad Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 1 Jun 2026 12:31:08 +0000 Subject: [PATCH 2/4] docs: correct sentence casing in `blas/base/ndarray/igamax` --- lib/node_modules/@stdlib/blas/base/ndarray/igamax/lib/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/blas/base/ndarray/igamax/lib/index.js b/lib/node_modules/@stdlib/blas/base/ndarray/igamax/lib/index.js index 6d70648d4957..7306fc82836b 100644 --- a/lib/node_modules/@stdlib/blas/base/ndarray/igamax/lib/index.js +++ b/lib/node_modules/@stdlib/blas/base/ndarray/igamax/lib/index.js @@ -19,7 +19,7 @@ 'use strict'; /** -* BLAS level 1 routine to Find the index of the first element having the maximum absolute value for all elements in a one-dimensional ndarray. +* BLAS level 1 routine to find the index of the first element having the maximum absolute value for all elements in a one-dimensional ndarray. * * @module @stdlib/blas/base/ndarray/igamax * From 68a7c5c53e55da355d264059eae3ce895b023e8b Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 1 Jun 2026 12:31:14 +0000 Subject: [PATCH 3/4] fix: use `is-nan` and correct return type comment in `blas/base/ndarray/isamax` The benchmark guarded the integer index return value with `isnanf`, which is the float32 NaN predicate; switch to `isnan` to match the documented integer return type and the sibling `igamax` benchmark. Also drop the spurious `.0` from the TypeScript example, since the function returns an integer index. --- .../@stdlib/blas/base/ndarray/isamax/benchmark/benchmark.js | 6 +++--- .../@stdlib/blas/base/ndarray/isamax/docs/types/index.d.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/ndarray/isamax/benchmark/benchmark.js b/lib/node_modules/@stdlib/blas/base/ndarray/isamax/benchmark/benchmark.js index 5432c90ac336..d131a4bcc395 100644 --- a/lib/node_modules/@stdlib/blas/base/ndarray/isamax/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/blas/base/ndarray/isamax/benchmark/benchmark.js @@ -22,7 +22,7 @@ var bench = require( '@stdlib/bench' ); var uniform = require( '@stdlib/random/uniform' ); -var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); var pow = require( '@stdlib/math/base/special/pow' ); var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; @@ -62,12 +62,12 @@ function createBenchmark( len ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { z = isamax( [ x ] ); - if ( isnanf( z ) ) { + if ( isnan( z ) ) { b.fail( 'should not return NaN' ); } } b.toc(); - if ( isnanf( z ) ) { + if ( isnan( z ) ) { b.fail( 'should not return NaN' ); } b.pass( 'benchmark finished' ); diff --git a/lib/node_modules/@stdlib/blas/base/ndarray/isamax/docs/types/index.d.ts b/lib/node_modules/@stdlib/blas/base/ndarray/isamax/docs/types/index.d.ts index dd3df289f8f5..9aaf9e3e3066 100644 --- a/lib/node_modules/@stdlib/blas/base/ndarray/isamax/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/blas/base/ndarray/isamax/docs/types/index.d.ts @@ -40,7 +40,7 @@ import { float32ndarray } from '@stdlib/types/ndarray'; * var x = new Float32Vector( [ 1.0, -2.0, 3.0, -4.0, 5.0 ] ); * * var y = isamax( [ x ] ); -* // returns 4.0 +* // returns 4 */ declare function isamax( arrays: [ float32ndarray ] ): number; From 4c52181865b6b2fb8c4c760c1aa98cbf228fac1e Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 1 Jun 2026 12:31:20 +0000 Subject: [PATCH 4/4] docs: drop spurious `.0` from index return type examples in `blas/base/ndarray` The newly added `idamax` and `isamax` JSDoc examples in the namespace declarations documented the return value as `4.0`, but both routines return an integer index. Match the `igamax` entry, which already used `returns 4`. --- .../@stdlib/blas/base/ndarray/docs/types/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/ndarray/docs/types/index.d.ts b/lib/node_modules/@stdlib/blas/base/ndarray/docs/types/index.d.ts index f90e3cf704fd..f5232ebb360b 100644 --- a/lib/node_modules/@stdlib/blas/base/ndarray/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/blas/base/ndarray/docs/types/index.d.ts @@ -677,7 +677,7 @@ interface Namespace { * var x = new Float64Vector( [ 1.0, -2.0, 3.0, -4.0, 5.0 ] ); * * var y = ns.idamax( [ x ] ); - * // returns 4.0 + * // returns 4 */ idamax: typeof idamax; @@ -721,7 +721,7 @@ interface Namespace { * var x = new Float32Vector( [ 1.0, -2.0, 3.0, -4.0, 5.0 ] ); * * var y = ns.isamax( [ x ] ); - * // returns 4.0 + * // returns 4 */ isamax: typeof isamax;