From 1236e97ff3626a1796b540bc4e00984b089f356e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Boulogne?= Date: Wed, 2 Oct 2013 15:38:18 +0200 Subject: [PATCH] MAINT: np.pi -> M_PI --- skimage/transform/_hough_transform.pyx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/skimage/transform/_hough_transform.pyx b/skimage/transform/_hough_transform.pyx index 47185d79..7f2b153c 100644 --- a/skimage/transform/_hough_transform.pyx +++ b/skimage/transform/_hough_transform.pyx @@ -209,12 +209,12 @@ def hough_ellipse(cnp.ndarray img, int threshold=4, double accuracy=1, b = sqrt(bin_edges[hist.argmax()]) # to keep ellipse_perimeter() convention if angle != 0: - angle = np.pi - angle + angle = M_PI - angle # When angle is not in [-pi:pi] # it would mean in ellipse_perimeter() # that a < b. But we keep a > b. - if angle > np.pi: - angle = angle - np.pi / 2. + if angle > M_PI: + angle = angle - M_PI / 2. a, b = b, a results.append((hist_max, # Accumulator y0,