# HG changeset patch # User Jordi GutiƩrrez Hermoso # Date 1421542451 18000 # Node ID 8e02346789b2de93418c65f02d6bbb042be30222 # Parent d9230d702fbf8bda50c3f7056275265e55d440c2 Fix off by one error in P computation diff --git a/pymedcouple b/pymedcouple --- a/pymedcouple +++ b/pymedcouple @@ -175,7 +175,7 @@ j = 0 for i in xrange(n_plus - 1, -1, -1): - while j < n_minus - 1 and h_kern(i, j) - Am > Am_eps: + while j < n_minus and h_kern(i, j) - Am > Am_eps: j += 1 P.append(j - 1)