From 22f95cda5509488b566e32d575b44bc63830b02b Mon Sep 17 00:00:00 2001 From: John Garrett Date: Thu, 19 Dec 2024 23:18:06 -0800 Subject: [PATCH] Remove lint --- czt.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/czt.py b/czt.py index 8ae2134..7b84bc6 100644 --- a/czt.py +++ b/czt.py @@ -123,16 +123,16 @@ def iczt(X, N=None, W=None, A=1.0, simple=True, t_method="scipy", f_method="nump k = np.arange(n) Wk22 = W ** (-(k ** 2) / 2) x = Wk22 * X - + # See https://github.com/garrettj403/CZT/issues/17 - u = (-1) ** k * W ** (k * (k - n + 0.5) + (n / 2 - 0.5) * n) # /p is removed from here (1) + u = (-1) ** k * W ** (k * (k - n + 0.5) + (n / 2 - 0.5) * n) # /p is removed from here (1) p = np.r_[1, W ** k[1:] - 1] - lp = np.abs(p) # lp stand for ln(p) + lp = np.abs(p) # lp stands for ln(p) lp = np.cumsum(np.log(lp)) + np.angle(np.cumprod(p/lp))*1j # above seperate the magnitude and angle of the entries in p # it cumsum magnitude in log domain to replace the unstable cumprod of the magnitude # and cumprod only the normalized angle to ensure the angle is also stable when X is long - u /= np.exp(lp+lp[::-1]) # /p from (1) is moved to here as +lp in exp() + u /= np.exp(lp+lp[::-1]) # /p from (1) is moved to here as +lp in exp() z = np.zeros(n, dtype=complex) uhat = np.r_[0, u[-1:0:-1]]