From 08c55facd2885278ba8e4d692154dbf6a059f319 Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Tue, 3 Apr 2012 12:19:43 -0500 Subject: [PATCH] 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 --- 5-Testing/close_line.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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] -- 2.26.2