diff --git a/stumpy/aampdist.py b/stumpy/aampdist.py index 9a99d4f3f..e5c3f9e78 100644 --- a/stumpy/aampdist.py +++ b/stumpy/aampdist.py @@ -72,7 +72,7 @@ def _aampdist_vect( if k is None: percentage = np.clip(percentage, 0.0, 1.0) - k = min(math.ceil(percentage * (2 * Q.shape[0])), 2 * j - 1) + k = math.ceil(percentage * (2 * Q.shape[0])) k = min(int(k), P_ABBA.shape[0] - 1) diff --git a/stumpy/mpdist.py b/stumpy/mpdist.py index 489caa9f3..6b0d0e3d9 100644 --- a/stumpy/mpdist.py +++ b/stumpy/mpdist.py @@ -101,7 +101,7 @@ def _mpdist_vect( if k is None: percentage = np.clip(percentage, 0.0, 1.0) - k = min(math.ceil(percentage * (2 * Q.shape[0])), 2 * j - 1) + k = math.ceil(percentage * (2 * Q.shape[0])) k = min(int(k), P_ABBA.shape[0] - 1)