From: Anthony Scopatz Date: Tue, 3 Apr 2012 17:19:43 +0000 (-0500) Subject: Fixed bug in close_line.py X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=08c55facd2885278ba8e4d692154dbf6a059f319;p=swc-testing-nose.git Fixed bug in close_line.py W. Trevor King: I dropped everything from the original c7a23ca except for the 5-Testing/ modification. Conflicts: .gitignore 6-Documentation/close_line.py --- diff --git a/5-Testing/close_line.py b/5-Testing/close_line.py index bed15db..a6a5c5e 100644 --- a/5-Testing/close_line.py +++ b/5-Testing/close_line.py @@ -19,7 +19,7 @@ def closest_data_to_line1(data, p1, p2): dists = np.empty(len(data), dtype=float) for i, pdata in enumerate(data): x = fmin(dist_from_line1, p1[0], (pdata, p1, p2), disp=False)[0] - dists[i] = dist_from_line1(x, pdata) + dists[i] = dist_from_line1(x, pdata, p1, p2) imin = np.argmin(dists) return imin, data[imin]