Skip to content

Commit 1d0a22c

Browse files
committed
Refine value to handle imprecision
1 parent e1c9785 commit 1d0a22c

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

stumpy/stump.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ def _compute_diagonal(
190190
if T_B_subseq_isconstant[i + k] and T_A_subseq_isconstant[i]:
191191
pearson = 1.0
192192

193+
if pearson > config.STUMPY_PERFECT_CORRELATION:
194+
pearson = 1.0
195+
193196
if pearson > ρ[thread_idx, i, 0]:
194197
ρ[thread_idx, i, 0] = pearson
195198
I[thread_idx, i, 0] = i + k

0 commit comments

Comments
 (0)