File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -265,3 +265,25 @@ def test_pyfftw_sdp_update_arrays():
265265 # Check that the same FFTW objects are reused
266266 assert sliding_dot_product .rfft_objects [key1 ] is rfft_obj_before
267267 assert sliding_dot_product .irfft_objects [key1 ] is irfft_obj_before
268+
269+ return
270+
271+
272+ def test_sdp_empty_boundaries ():
273+ # This is to test sdp._sliding_dot_product
274+ # when the `boundaries` parameter is set to
275+ # an empty list
276+ pmin = 3
277+ pmax = 13
278+ for q in range (pmin , pmax + 1 ):
279+ n_Q = 2 ** q
280+ for p in range (q , pmax + 1 ):
281+ n_T = 2 ** p
282+ Q = np .random .rand (n_Q )
283+ T = np .random .rand (n_T )
284+
285+ ref = naive_sliding_dot_product (Q , T )
286+ comp = sdp ._sliding_dot_product (Q , T , boundaries = [])
287+ npt .assert_allclose (comp , ref )
288+
289+ return
You can’t perform that action at this time.
0 commit comments