Skip to content

Commit d6fda46

Browse files
committed
remove instance of class from stumpy module
1 parent 68d767c commit d6fda46

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

stumpy/sdp.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -327,10 +327,6 @@ def __call__(self, Q, T, n_threads=1, planning_flag="FFTW_ESTIMATE"):
327327
return irfft_obj.output_array[m - 1 : n] # valid portion
328328

329329

330-
if PYFFTW_IS_AVAILABLE: # pragma: no cover
331-
_pyfftw_sliding_dot_product = _PYFFTW_SLIDING_DOT_PRODUCT(max_n=2**20)
332-
333-
334330
def _sliding_dot_product(Q, T):
335331
"""
336332
Compute the sliding dot product between `Q` and `T`

tests/test_sdp.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,13 @@
7070

7171
def get_sdp_function_names():
7272
out = []
73-
for func_name, func in inspect.getmembers(sdp, inspect.isfunction):
73+
for func_name, _ in inspect.getmembers(sdp, inspect.isfunction):
7474
if func_name.endswith("sliding_dot_product"):
7575
out.append(func_name)
7676

7777
if sdp.PYFFTW_IS_AVAILABLE: # pragma: no cover
78+
callable_obj = sdp._PYFFTW_SLIDING_DOT_PRODUCT(max_n=2**20)
79+
setattr(sdp, "_pyfftw_sliding_dot_product", callable_obj)
7880
out.append("_pyfftw_sliding_dot_product")
7981

8082
return out

0 commit comments

Comments
 (0)