Skip to content

Commit 27072de

Browse files
committed
remove unncessary warning
1 parent ed8e0fd commit 27072de

File tree

1 file changed

+5
-20
lines changed

1 file changed

+5
-20
lines changed

stumpy/sdp.py

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import warnings
2-
31
import numpy as np
42
from numba import njit
53
from scipy.fft import next_fast_len
@@ -308,14 +306,8 @@ def __call__(self, Q, T, n_threads=1, planning_flag="FFTW_ESTIMATE"):
308306
return real_arr[m - 1 : n]
309307

310308

311-
if FFTW_IS_AVAILABLE: # pragma: no cover
312-
_pyfftw_sliding_dot_product = _PYFFTW_SLIDING_DOT_PRODUCT()
313-
else: # pragma: no cover
314-
msg = (
315-
"Couldn't import pyFFTW. Set _pyfftw_sliding_dot_product " + "function to None"
316-
)
317-
warnings.warn(msg)
318-
_pyfftw_sliding_dot_product = None
309+
if FFTW_IS_AVAILABLE:
310+
_pyfftw_sliding_dot_product = _PYFFTW_SLIDING_DOT_PRODUCT(max_n=2**20)
319311

320312

321313
def _sliding_dot_product(
@@ -347,20 +339,14 @@ def _sliding_dot_product(
347339
and LB_T<=len(T)<UB_T
348340
349341
default_sdp : function
350-
A function to compute sliding_dot_product when
351-
the provided `sdp_func` in boundaries is None
352-
or `(len(Q), len(T))` does not fit into the
353-
provided boundaries.
342+
A function to compute sliding_dot_product
343+
when `(len(Q), len(T))` does not fit into
344+
the provided boundaries.
354345
355346
Returns
356347
-------
357348
output : numpy.ndarray
358349
Sliding dot product between `Q` and `T`.
359-
360-
Notes
361-
-----
362-
The function `_pyfftw_sliding_dot_product` will be set to None
363-
if pyFFTW cannot be imported
364350
"""
365351
m = len(Q)
366352
n = len(T)
@@ -369,7 +355,6 @@ def _sliding_dot_product(
369355
if (
370356
Q_boundaries[0] <= m < Q_boundaries[1]
371357
and T_boundaries[0] <= n < T_boundaries[1]
372-
and sdp_func is not None
373358
):
374359
return sdp_func(Q, T)
375360

0 commit comments

Comments
 (0)