From 0d275d8d1fa1d5f4ae2615da80cfc4e41ff60554 Mon Sep 17 00:00:00 2001 From: RichieHakim Date: Thu, 8 Feb 2024 22:35:30 -0500 Subject: [PATCH] remove rfft option --- vqt/vqt.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/vqt/vqt.py b/vqt/vqt.py index 07ad8cb..ea6480c 100644 --- a/vqt/vqt.py +++ b/vqt/vqt.py @@ -425,14 +425,9 @@ def fftconvolve( n_original = x.shape[-1] + y.shape[-1] - 1 # n = scipy.fftpack.next_fast_len(n_original) if fast_length else n_original n = next_fast_len(n_original) if fast_length else n_original - n = n_original - - if x.is_complex() == False and y.is_complex() == False: - f = torch.fft.rfft(x, n=n, dim=-1) * torch.fft.fft(y, n=n, dim=-1) - fftconv_xy = torch.fft.irfft(f, n=n, dim=-1) - else: - f = torch.fft.fft(x, n=n, dim=-1) * torch.fft.fft(y, n=n, dim=-1) - fftconv_xy = torch.fft.ifft(f, n=n, dim=-1) + # n = n_original + f = torch.fft.fft(x, n=n, dim=-1) * torch.fft.fft(y, n=n, dim=-1) + fftconv_xy = torch.fft.ifft(f, n=n, dim=-1) return apply_padding_mode( conv_result=fftconv_xy, x_length=x.shape[-1],