File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -195,12 +195,14 @@ def test_check_max_window_size():
195195def test_check_window_size_excl_zone ():
196196 # To ensure warning is raised if there is at least one subsequence
197197 # that has no non-trivial neighbor
198- T = np .random .rand (100 )
199- m = 70
200-
201- # For `m==70`, the `excl_zone` is ceil(m / 4) = 18. For `len(T)==100`,
202- # the subsequence that starts at index 15 has no non-trivial neighbor.
203- # The expectation is that `core.check_window_size` raises warning.
198+ T = np .random .rand (10 )
199+ m = 7
200+
201+ # For `len(T) == 10` and `m == 7`, the `excl_zone` is ceil(m / 4) = 2.
202+ # In this case, there are `10 - 7 + 1 = 4` subsequences of length 7,
203+ # starting at indices 0, 1, 2, and 3. For a subsequence that starts at
204+ # index 1, there are no non-trivial neighbors. So, a warning should be
205+ # raised.
204206 with pytest .warns (UserWarning ):
205207 core .check_window_size (m , max_size = len (T ), n = len (T ))
206208
You can’t perform that action at this time.
0 commit comments