Skip to content

Commit 70bf879

Browse files
committed
minor changes
1 parent c79ea81 commit 70bf879

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

sdp/pyfftw_sdp.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ def __call__(self, Q, T, n_threads=1, planning_flag="FFTW_MEASURE"):
5151
if self.n != T.shape[0]:
5252
self.n = T.shape[0]
5353
self.next_fast_n = pyfftw.next_fast_len(self.n)
54-
key = (self.next_fast_n, n_threads, planning_flag)
5554

5655
# Update preallocated arrays if needed
5756
if self.next_fast_n > len(self.real_arr):
@@ -64,6 +63,8 @@ def __call__(self, Q, T, n_threads=1, planning_flag="FFTW_MEASURE"):
6463
complex_arr = self.complex_arr[: 1 + (self.next_fast_n // 2)]
6564

6665
# Get or create FFTW objects
66+
key = (self.next_fast_n, n_threads, planning_flag)
67+
6768
rfft_obj = self.rfft_objects.get(key, None)
6869
if rfft_obj is None:
6970
rfft_obj = pyfftw.FFTW(
@@ -113,7 +114,7 @@ def __call__(self, Q, T, n_threads=1, planning_flag="FFTW_MEASURE"):
113114
return real_arr[m - 1 : self.n]
114115

115116

116-
_sliding_dot_product = SLIDING_DOT_PRODUCT(max_n=2**20)
117+
_sliding_dot_product = SLIDING_DOT_PRODUCT()
117118

118119

119120
def setup(Q, T, n_threads=1, planning_flag="FFTW_MEASURE"):

0 commit comments

Comments
 (0)