Skip to content

Commit f611339

Browse files
committed
revise comment
1 parent f174ed6 commit f611339

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

stumpy/core.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -610,18 +610,18 @@ def check_window_size(m, max_size=None, excl_zone=None, last_start_index=None):
610610
# i.e. For AN `i`, there exists at least one `j` such that |i - j| > excl_zone
611611
# In this case, we just need to consider the two subsequences that are furthest
612612
# apart from each other.
613-
# In other words: |0 - last_start_index| > excl_zone
614-
cond_1 = last_start_index <= excl_zone
613+
# In other words: |last_start_index - 0| > excl_zone
614+
cond_1 = (last_start_index - 0) > excl_zone
615615

616616
# Case 2:
617617
# Check if each single subsequence has at least one non-trivial neighbor
618618
# i. e. For ANY `i`, there exists at least one `j` such that |i - j| > excl_zone
619619
# In this case, we need to consider the subseuqence whose furthest neighbour is
620620
# the shortest compared to other subsequences.
621-
# In other words: |0 - ceil(last_start_index / 2)| > excl_zone
622-
cond_2 = math.ceil(last_start_index / 2) <= excl_zone
621+
# In other words: |ceil(last_start_index / 2) - 0| > excl_zone
622+
cond_2 = (math.ceil(last_start_index / 2) - 0) > excl_zone
623623

624-
if cond_1 or cond_2:
624+
if not cond_1 or not cond_2:
625625
msg = (
626626
f"The window size, 'm = {m}', may be too large and could lead to "
627627
+ "meaningless results. Consider reducing 'm' where necessary"

0 commit comments

Comments
 (0)