Removed trailing whitespaces

This commit is contained in:
Jeremy Metz
2014-02-01 20:30:39 +00:00
parent 920c3efb83
commit 0136fd5915
2 changed files with 6 additions and 9 deletions
+3 -3
View File
@@ -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
+3 -6
View File
@@ -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(