From 0136fd5915d3d659a8c9f60e35a7bb6aa8b51c57 Mon Sep 17 00:00:00 2001 From: Jeremy Metz Date: Sat, 1 Feb 2014 20:30:39 +0000 Subject: [PATCH] Removed trailing whitespaces --- skimage/morphology/convex_hull.py | 6 +++--- skimage/morphology/tests/test_convex_hull.py | 9 +++------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/skimage/morphology/convex_hull.py b/skimage/morphology/convex_hull.py index 6fc08097..4d54498d 100644 --- a/skimage/morphology/convex_hull.py +++ b/skimage/morphology/convex_hull.py @@ -54,10 +54,10 @@ def convex_hull_image(image): raise ImportError('Could not import scipy.spatial, only available in ' 'scipy >= 0.9.') - # Subtract offset + # Subtract offset offset = coords.mean(axis=0) coords -= offset - + # Find the convex hull chull = Delaunay(coords).convex_hull v = coords[np.unique(chull)] @@ -67,7 +67,7 @@ def convex_hull_image(image): angles = np.arctan2(v_centred[:, 0], v_centred[:, 1]) v = v[np.argsort(angles)] - # Add back offset + # Add back offset v += offset # For each pixel coordinate, check whether that pixel diff --git a/skimage/morphology/tests/test_convex_hull.py b/skimage/morphology/tests/test_convex_hull.py index d319662e..ad7f57a7 100644 --- a/skimage/morphology/tests/test_convex_hull.py +++ b/skimage/morphology/tests/test_convex_hull.py @@ -45,15 +45,12 @@ def test_qhull_offset_example(): 147, 148, 149, 150, 151, 152, 153, 154, 146, 147, 148, 149, 150, 151, 152, 153, 154, 147, 148, 149, 150, 151, 152, 153, 148, 149, 150, 151, 152, 149, 150, 151, 150])) - image = np.zeros((1392, 1040), dtype=bool) - image[ nonzeros ] = True - - expected = image.copy() - + image[ nonzeros ] = True + expected = image.copy() assert_array_equal(convex_hull_image(image), expected) - + @skipif(not scipy_spatial) def test_pathological_qhull_example(): image = np.array(