1- import warnings
2-
31import numpy as np
42from numba import njit
53from 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
321313def _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