From a609bd6416a6886edce4564adaf69920c7b9cfca Mon Sep 17 00:00:00 2001 From: cgohlke Date: Wed, 12 Oct 2011 14:09:29 -0700 Subject: [PATCH 1/3] Fix print statements missed by 2to3 --- scikits/image/morphology/tests/test_watershed.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scikits/image/morphology/tests/test_watershed.py b/scikits/image/morphology/tests/test_watershed.py index ca7c43bf..6a3b2750 100644 --- a/scikits/image/morphology/tests/test_watershed.py +++ b/scikits/image/morphology/tests/test_watershed.py @@ -388,11 +388,11 @@ class TestWatershed(unittest.TestCase): before = time.clock() out = watershed(image, markers, self.eight) elapsed = time.clock() - before - print "Fast watershed ran a megapixel image in %f seconds"%(elapsed) + print ("Fast watershed ran a megapixel image in %f seconds"%(elapsed)) before = time.clock() out = scipy.ndimage.watershed_ift(image.astype(np.uint16), markers, self.eight) elapsed = time.clock() - before - print "Scipy watershed ran a megapixel image in %f seconds"%(elapsed) + print ("Scipy watershed ran a megapixel image in %f seconds"%(elapsed)) class TestIsLocalMaximum(unittest.TestCase): From cc84603b1ac5429326bc80ec3115d9f3986e2e76 Mon Sep 17 00:00:00 2001 From: cgohlke Date: Wed, 12 Oct 2011 15:25:41 -0700 Subject: [PATCH 2/3] Remove print statements --- scikits/image/morphology/tests/test_watershed.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/scikits/image/morphology/tests/test_watershed.py b/scikits/image/morphology/tests/test_watershed.py index 6a3b2750..265a25e2 100644 --- a/scikits/image/morphology/tests/test_watershed.py +++ b/scikits/image/morphology/tests/test_watershed.py @@ -388,11 +388,9 @@ class TestWatershed(unittest.TestCase): before = time.clock() out = watershed(image, markers, self.eight) elapsed = time.clock() - before - print ("Fast watershed ran a megapixel image in %f seconds"%(elapsed)) before = time.clock() out = scipy.ndimage.watershed_ift(image.astype(np.uint16), markers, self.eight) elapsed = time.clock() - before - print ("Scipy watershed ran a megapixel image in %f seconds"%(elapsed)) class TestIsLocalMaximum(unittest.TestCase): From 8024cc9798d7f33289597bc78e8f5fb1b102a7bf Mon Sep 17 00:00:00 2001 From: cgohlke Date: Wed, 12 Oct 2011 15:29:56 -0700 Subject: [PATCH 3/3] Remove print statements --- scikits/image/transform/tests/test_project.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/scikits/image/transform/tests/test_project.py b/scikits/image/transform/tests/test_project.py index 363ff2b7..f1756f99 100644 --- a/scikits/image/transform/tests/test_project.py +++ b/scikits/image/transform/tests/test_project.py @@ -39,8 +39,6 @@ def test_fast_homography(): H[:2, 2] = [tx, ty] for mode in ('constant', 'mirror', 'wrap'): - print 'Transform mode:', mode - p0 = homography(img, H, mode=mode, order=1) p1 = fast_homography(img, H, mode=mode) p1 = np.round(p1) @@ -54,7 +52,6 @@ def test_fast_homography(): ## plt.show() d = np.mean(np.abs(p0 - p1)) - print "delta=", d assert d < 0.2