From 950cddf1b69934f9af8fd9706b9f888158a4b477 Mon Sep 17 00:00:00 2001 From: NimaSarajpoor Date: Mon, 5 Jan 2026 21:48:30 -0500 Subject: [PATCH 1/2] minor change --- sdp/pocketfft_r2c_c2r_sdp.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdp/pocketfft_r2c_c2r_sdp.py b/sdp/pocketfft_r2c_c2r_sdp.py index 8fcc0ea..1f14342 100644 --- a/sdp/pocketfft_r2c_c2r_sdp.py +++ b/sdp/pocketfft_r2c_c2r_sdp.py @@ -10,13 +10,13 @@ def setup(Q, T): def sliding_dot_product(Q, T): n = len(T) m = len(Q) - shape = next_fast_len(n, real=True) + next_fast_n = next_fast_len(n, real=True) - tmp = np.empty((2, shape)) + tmp = np.empty((2, next_fast_n)) tmp[0, :m] = Q[::-1] tmp[0, m:] = 0.0 tmp[1, :n] = T tmp[1, n:] = 0.0 fft_2d = r2c(True, tmp, axis=-1) - return c2r(False, np.multiply(fft_2d[0], fft_2d[1]), n=shape)[m - 1 : n] + return c2r(False, np.multiply(fft_2d[0], fft_2d[1]), n=next_fast_n)[m - 1 : n] From 6e1da6b82c1c8da8ebda17f267504d2a3e8ded01 Mon Sep 17 00:00:00 2001 From: NimaSarajpoor Date: Mon, 5 Jan 2026 21:53:42 -0500 Subject: [PATCH 2/2] revise variable name --- sdp/numpy_fft_sdp.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdp/numpy_fft_sdp.py b/sdp/numpy_fft_sdp.py index c87af9f..974eee8 100644 --- a/sdp/numpy_fft_sdp.py +++ b/sdp/numpy_fft_sdp.py @@ -9,13 +9,13 @@ def setup(Q, T): def sliding_dot_product(Q, T, order="F"): n = len(T) m = len(Q) - shape = next_fast_len(n, real=True) + next_fast_n = next_fast_len(n, real=True) - tmp = np.empty((2, shape), order=order) + tmp = np.empty((2, next_fast_n), order=order) tmp[0, :m] = Q[::-1] tmp[0, m:] = 0.0 tmp[1, :n] = T tmp[1, n:] = 0.0 fft_2d = np.fft.rfft(tmp, axis=-1) - return np.fft.irfft(np.multiply(fft_2d[0], fft_2d[1]), n=shape)[m - 1 : n] + return np.fft.irfft(np.multiply(fft_2d[0], fft_2d[1]), n=next_fast_n)[m - 1 : n]