Skip to content

Commit

Permalink
Refine value to handle imprecision
Browse files Browse the repository at this point in the history
  • Loading branch information
NimaSarajpoor committed Aug 2, 2022
1 parent e1c9785 commit 1d0a22c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions stumpy/stump.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ def _compute_diagonal(
if T_B_subseq_isconstant[i + k] and T_A_subseq_isconstant[i]:
pearson = 1.0

if pearson > config.STUMPY_PERFECT_CORRELATION:
pearson = 1.0

if pearson > ρ[thread_idx, i, 0]:
ρ[thread_idx, i, 0] = pearson
I[thread_idx, i, 0] = i + k
Expand Down

0 comments on commit 1d0a22c

Please sign in to comment.