Skip to content

Commit

Permalink
Min-clip values at 0 in _mass_absolute
Browse files Browse the repository at this point in the history
  • Loading branch information
plodocus committed Dec 2, 2020
1 parent 5fb85a9 commit 593098f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion stumpy/core.py
Expand Up @@ -861,7 +861,9 @@ def _mass_absolute(Q_squared, T_squared, QT):
`See Mueen's Absolute Algorithm for Similarity Search \
<https://www.cs.unm.edu/~mueen/MASS_absolute.m>`__
"""
return np.sqrt(Q_squared + T_squared - 2 * QT)
D = Q_squared + T_squared - 2 * QT
D[D < 0] = 0.0
return np.sqrt(D)


def mass_absolute(Q, T):
Expand Down

0 comments on commit 593098f

Please sign in to comment.