From 2dfeab83df44057cfd9115afe41c46d1879c4f52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Boulogne?= Date: Sat, 6 Jul 2013 13:49:01 +0200 Subject: [PATCH] PEP8 + import --- skimage/transform/tests/test_hough_transform.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/skimage/transform/tests/test_hough_transform.py b/skimage/transform/tests/test_hough_transform.py index 344dbea0..ae0ae81b 100644 --- a/skimage/transform/tests/test_hough_transform.py +++ b/skimage/transform/tests/test_hough_transform.py @@ -1,5 +1,7 @@ import numpy as np -from numpy.testing import * +from numpy.testing import (assert_almost_equal, + assert_equal, + ) import skimage.transform as tf from skimage.draw import line, circle_perimeter, ellipse_perimeter @@ -167,16 +169,17 @@ def test_hough_ellipse_non_zero_angle(): b = 9 x0 = 10 y0 = 10 - angle = np.pi/1.35 + angle = np.pi / 1.35 rr, cc = ellipse_perimeter(x0, x0, b, a, orientation=angle) img[rr, cc] = 1 result = tf.hough_ellipse(img, threshold=15, accuracy=3) - print(result) - assert_almost_equal(result[0][0]/100., x0/100., decimal=1) - assert_almost_equal(result[0][1]/100., y0/100., decimal=1) - assert_almost_equal(result[0][2]/100., b/100., decimal=1) - assert_almost_equal(result[0][3]/100., a/100., decimal=1) + assert_almost_equal(result[0][0] / 100., x0 / 100., decimal=1) + assert_almost_equal(result[0][1] / 100., y0 / 100., decimal=1) + assert_almost_equal(result[0][2] / 100., b / 100., decimal=1) + assert_almost_equal(result[0][3] / 100., a / 100., decimal=1) assert_almost_equal(result[0][4], angle, decimal=1) + if __name__ == "__main__": + from numpy.testing import run_module_suite run_module_suite()