From 9ea085fd6fe53e99071f7f7f01ae0734d805d33e Mon Sep 17 00:00:00 2001 From: Olivia Date: Sun, 30 Aug 2015 23:05:15 +0100 Subject: [PATCH 01/11] Added new functionality to remove small holes from images. This is currently working with **kwargs except for inplace which I cannot get working. It works with arrays of type int but returns an array of type bool. Possibly in future add labelling for arrays of type int. A UserWarning is produced when using arrays of type int which seems to work normally but the test created for this does not pick up the warning. Any assistance on these issues would be helpful. I started this at EuroScipy 2015 and this fixes issue #1642 --- skimage/morphology/__init__.py | 5 +- skimage/morphology/misc.py | 81 ++++++++++++++++++++++ skimage/morphology/tests/test_misc.py | 97 ++++++++++++++++++++++++++- 3 files changed, 180 insertions(+), 3 deletions(-) diff --git a/skimage/morphology/__init__.py b/skimage/morphology/__init__.py index 9bf311c4..159a4ac2 100644 --- a/skimage/morphology/__init__.py +++ b/skimage/morphology/__init__.py @@ -8,7 +8,7 @@ from .watershed import watershed from ._skeletonize import skeletonize, medial_axis from .convex_hull import convex_hull_image, convex_hull_object from .greyreconstruct import reconstruction -from .misc import remove_small_objects +from .misc import remove_small_objects, remove_small_holes from ..measure._label import label from .._shared.utils import deprecated as _deprecated @@ -40,4 +40,5 @@ __all__ = ['binary_erosion', 'convex_hull_image', 'convex_hull_object', 'reconstruction', - 'remove_small_objects'] + 'remove_small_objects', + 'remove_small_holes'] diff --git a/skimage/morphology/misc.py b/skimage/morphology/misc.py index e743a398..e868ffcb 100644 --- a/skimage/morphology/misc.py +++ b/skimage/morphology/misc.py @@ -124,3 +124,84 @@ def remove_small_objects(ar, min_size=64, connectivity=1, in_place=False): out[too_small_mask] = 0 return out + +def remove_small_holes(ar, min_size=64, connectivity=1, in_place=False): + """Remove connected components smaller than the specified size within a + larger connected object. + + Parameters + ---------- + ar : ndarray (arbitrary shape, int or bool type) + The array containing the connected components of interest. If the array + type is int, it is assumed that it contains already-labeled objects. The + labels are not kept in the output image (this function always outputs + a bool image. It is suggested that labeling is completed after using + this function. + min_size : int, optional (default: 64) + The smallest allowable connected component size. + connectivity : int, {1, 2, ..., ar.ndim}, optional (default: 1) + The connectivity defining the neighborhood of a pixel. + in_place : bool, optional (default: False) + If `True`, remove the connected components in the input array itself. + Otherwise, make a copy. + + Raises + ------ + TypeError + If the input array is of an invalid type, such as float or string. + ValueError + If the input array contains negative values. + + Returns + ------- + out : ndarray, same shape and type as input `ar` + The input array with small holes within connected components removed. + + Examples + -------- + >>> from skimage import morphology + >>> a = np.array([[1, 1, 1, 1, 1, 0], + ... [1, 1, 1, 0, 1, 0], + ... [1, 0, 0, 1, 1, 0], + ... [1, 1, 1, 1, 1, 0]], bool) + >>> b = morphology.remove_small_holes(a, 2) + >>> b + array([[True, True, True, True, True, False], + [True, True, True, True, True, False], + [True, False, False, True, True, False], + [True, True, True, True, True, False]], dtype=bool) + >>> c = morphology.remove_small_holes(a, 2, connectivity=2) + >>> c + array([[True, True, True, True, True, False], + [True, True, True, False, True, False], + [True, False, False, True, True, False], + [True, True, True, True, True, False]], dtype=bool) + >>> d = morphology.remove_small_holes(a, 2, in_place=True) + >>> d is a + True + """ + # Should use `issubdtype` for bool below, but there's a bug in numpy 1.7 + if not (ar.dtype == bool or np.issubdtype(ar.dtype, np.integer)): + raise TypeError("Only bool or integer image types are supported. " + "Got %s." % ar.dtype) + + if in_place: + out = ar + else: + out = ar.copy() + + #Creates warning if image is an integer image + if out.dtype != bool: + print("I'm about to warn") + warnings.warn("Any labeled images will be returned as a boolean array. " + "Did you mean to use a boolean array?", UserWarning) + + #Creating the inverse of ar + out = np.logical_not(out) + + #removing small objects from the inverse of ar + out = remove_small_objects(out, min_size, connectivity, in_place) + + out = np.logical_not(out) + + return out \ No newline at end of file diff --git a/skimage/morphology/tests/test_misc.py b/skimage/morphology/tests/test_misc.py index 8789b22a..93e7b27a 100644 --- a/skimage/morphology/tests/test_misc.py +++ b/skimage/morphology/tests/test_misc.py @@ -1,7 +1,7 @@ import numpy as np from numpy.testing import (assert_array_equal, assert_equal, assert_raises, assert_warns) -from skimage.morphology import remove_small_objects +from skimage.morphology import remove_small_objects, remove_small_holes test_image = np.array([[0, 0, 0, 1, 0], [1, 1, 1, 0, 0], @@ -72,6 +72,101 @@ def test_negative_input(): negative_int = np.random.randint(-4, -1, size=(5, 5)) assert_raises(ValueError, remove_small_objects, negative_int) +test_holes_image = np.array([[0,0,0,0,0,0,1,0,0,0], + [0,1,1,1,1,1,0,0,0,0], + [0,1,0,0,1,1,0,0,0,0], + [0,1,1,1,0,1,0,0,0,0], + [0,1,1,1,1,1,0,0,0,0], + [0,0,0,0,0,0,0,1,1,1], + [0,0,0,0,0,0,0,1,0,1], + [0,0,0,0,0,0,0,1,1,1]], bool) +def test_one_connectivity_holes(): + expected = np.array([[0,0,0,0,0,0,1,0,0,0], + [0,1,1,1,1,1,0,0,0,0], + [0,1,1,1,1,1,0,0,0,0], + [0,1,1,1,1,1,0,0,0,0], + [0,1,1,1,1,1,0,0,0,0], + [0,0,0,0,0,0,0,1,1,1], + [0,0,0,0,0,0,0,1,1,1], + [0,0,0,0,0,0,0,1,1,1]], bool) + observed = remove_small_holes(test_holes_image, min_size=3) + assert_array_equal(observed, expected) + + +def test_two_connectivity_holes(): + expected = np.array([[0,0,0,0,0,0,1,0,0,0], + [0,1,1,1,1,1,0,0,0,0], + [0,1,0,0,1,1,0,0,0,0], + [0,1,1,1,0,1,0,0,0,0], + [0,1,1,1,1,1,0,0,0,0], + [0,0,0,0,0,0,0,1,1,1], + [0,0,0,0,0,0,0,1,1,1], + [0,0,0,0,0,0,0,1,1,1]], bool) + observed = remove_small_holes(test_holes_image, min_size=3, connectivity=2) + assert_array_equal(observed, expected) + +def test_in_place_holes(): + observed = remove_small_holes(test_holes_image, min_size=3, in_place=True) + assert_equal(observed is test_holes_image, True, + "remove_small_holes in_place argument failed.") + +def test_labeled_image_holes(): + labeled_holes_image = np.array([[0,0,0,0,0,0,1,0,0,0], + [0,1,1,1,1,1,0,0,0,0], + [0,1,0,0,1,1,0,0,0,0], + [0,1,1,1,0,1,0,0,0,0], + [0,1,1,1,1,1,0,0,0,0], + [0,0,0,0,0,0,0,2,2,2], + [0,0,0,0,0,0,0,2,0,2], + [0,0,0,0,0,0,0,2,2,2]], dtype=int) + expected = np.array([[0,0,0,0,0,0,1,0,0,0], + [0,1,1,1,1,1,0,0,0,0], + [0,1,1,1,1,1,0,0,0,0], + [0,1,1,1,1,1,0,0,0,0], + [0,1,1,1,1,1,0,0,0,0], + [0,0,0,0,0,0,0,1,1,1], + [0,0,0,0,0,0,0,1,1,1], + [0,0,0,0,0,0,0,1,1,1]], dtype=bool) + observed = remove_small_holes(labeled_holes_image, min_size=3) + assert_array_equal(observed, expected) + + +def test_uint_image_holes(): + labeled_holes_image = np.array([[0,0,0,0,0,0,1,0,0,0], + [0,1,1,1,1,1,0,0,0,0], + [0,1,0,0,1,1,0,0,0,0], + [0,1,1,1,0,1,0,0,0,0], + [0,1,1,1,1,1,0,0,0,0], + [0,0,0,0,0,0,0,2,2,2], + [0,0,0,0,0,0,0,2,0,2], + [0,0,0,0,0,0,0,2,2,2]], dtype=np.uint8) + expected = np.array([[0,0,0,0,0,0,1,0,0,0], + [0,1,1,1,1,1,0,0,0,0], + [0,1,1,1,1,1,0,0,0,0], + [0,1,1,1,1,1,0,0,0,0], + [0,1,1,1,1,1,0,0,0,0], + [0,0,0,0,0,0,0,1,1,1], + [0,0,0,0,0,0,0,1,1,1], + [0,0,0,0,0,0,0,1,1,1]], dtype=bool) + observed = remove_small_holes(labeled_holes_image, min_size=3) + assert_array_equal(observed, expected) + + +def test_label_warning_holes(): + labeled_holes_image = np.array([[0,0,0,0,0,0,1,0,0,0], + [0,1,1,1,1,1,0,0,0,0], + [0,1,0,0,1,1,0,0,0,0], + [0,1,1,1,0,1,0,0,0,0], + [0,1,1,1,1,1,0,0,0,0], + [0,0,0,0,0,0,0,2,2,2], + [0,0,0,0,0,0,0,2,0,2], + [0,0,0,0,0,0,0,2,2,2]], dtype=int) + assert_warns(UserWarning, remove_small_holes, labeled_holes_image, min_size=3) + +def test_float_input_holes(): + float_test = np.random.rand(5, 5) + assert_raises(TypeError, remove_small_holes, float_test) + if __name__ == "__main__": np.testing.run_module_suite() From 9bfbcfcef39619a1a27ab5335b2fea56cec39a8b Mon Sep 17 00:00:00 2001 From: Olivia Date: Sun, 30 Aug 2015 23:15:04 +0100 Subject: [PATCH 02/11] Removed extraneous print statement --- skimage/morphology/misc.py | 1 - 1 file changed, 1 deletion(-) diff --git a/skimage/morphology/misc.py b/skimage/morphology/misc.py index e868ffcb..4b3e259a 100644 --- a/skimage/morphology/misc.py +++ b/skimage/morphology/misc.py @@ -192,7 +192,6 @@ def remove_small_holes(ar, min_size=64, connectivity=1, in_place=False): #Creates warning if image is an integer image if out.dtype != bool: - print("I'm about to warn") warnings.warn("Any labeled images will be returned as a boolean array. " "Did you mean to use a boolean array?", UserWarning) From a5ba186f8015e23b303b6939562c29834ac960fd Mon Sep 17 00:00:00 2001 From: Olivia Date: Mon, 31 Aug 2015 19:11:43 +0100 Subject: [PATCH 03/11] Added new _supported_types function and new line at end --- skimage/morphology/misc.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/skimage/morphology/misc.py b/skimage/morphology/misc.py index 4b3e259a..e1517e9c 100644 --- a/skimage/morphology/misc.py +++ b/skimage/morphology/misc.py @@ -37,7 +37,12 @@ def default_selem(func): return func(image, selem=selem, *args, **kwargs) return func_out - + +def _supported_types(ar): + # Should use `issubdtype` for bool below, but there's a bug in numpy 1.7 + if not (ar.dtype == bool or np.issubdtype(ar.dtype, np.integer)): + raise TypeError("Only bool or integer image types are supported. " + "Got %s." % ar.dtype) def remove_small_objects(ar, min_size=64, connectivity=1, in_place=False): """Remove connected components smaller than the specified size. @@ -88,10 +93,8 @@ def remove_small_objects(ar, min_size=64, connectivity=1, in_place=False): >>> d is a True """ - # Should use `issubdtype` for bool below, but there's a bug in numpy 1.7 - if not (ar.dtype == bool or np.issubdtype(ar.dtype, np.integer)): - raise TypeError("Only bool or integer image types are supported. " - "Got %s." % ar.dtype) + # Raising type error if not int or bool + _supported_types(ar) if in_place: out = ar @@ -180,10 +183,7 @@ def remove_small_holes(ar, min_size=64, connectivity=1, in_place=False): >>> d is a True """ - # Should use `issubdtype` for bool below, but there's a bug in numpy 1.7 - if not (ar.dtype == bool or np.issubdtype(ar.dtype, np.integer)): - raise TypeError("Only bool or integer image types are supported. " - "Got %s." % ar.dtype) + _supported_types(ar) if in_place: out = ar @@ -191,7 +191,7 @@ def remove_small_holes(ar, min_size=64, connectivity=1, in_place=False): out = ar.copy() #Creates warning if image is an integer image - if out.dtype != bool: + if ar.dtype != bool: warnings.warn("Any labeled images will be returned as a boolean array. " "Did you mean to use a boolean array?", UserWarning) @@ -203,4 +203,5 @@ def remove_small_holes(ar, min_size=64, connectivity=1, in_place=False): out = np.logical_not(out) - return out \ No newline at end of file + return out + \ No newline at end of file From c7597d69429d214e66dbfbe73f985f9ca453d501 Mon Sep 17 00:00:00 2001 From: Olivia Date: Thu, 17 Sep 2015 13:45:01 +0100 Subject: [PATCH 04/11] Changed function name to _check_dtype_supported --- skimage/morphology/misc.py | 29 ++++++++++++++++----------- skimage/morphology/tests/test_misc.py | 2 +- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/skimage/morphology/misc.py b/skimage/morphology/misc.py index e1517e9c..da27eae9 100644 --- a/skimage/morphology/misc.py +++ b/skimage/morphology/misc.py @@ -38,7 +38,7 @@ def default_selem(func): return func_out -def _supported_types(ar): +def _check_dtype_supported(ar): # Should use `issubdtype` for bool below, but there's a bug in numpy 1.7 if not (ar.dtype == bool or np.issubdtype(ar.dtype, np.integer)): raise TypeError("Only bool or integer image types are supported. " @@ -94,7 +94,7 @@ def remove_small_objects(ar, min_size=64, connectivity=1, in_place=False): True """ # Raising type error if not int or bool - _supported_types(ar) + _check_dtype_supported(ar) if in_place: out = ar @@ -129,8 +129,7 @@ def remove_small_objects(ar, min_size=64, connectivity=1, in_place=False): return out def remove_small_holes(ar, min_size=64, connectivity=1, in_place=False): - """Remove connected components smaller than the specified size within a - larger connected object. + """Remove continguous holes smaller than the specified size. Parameters ---------- @@ -183,25 +182,31 @@ def remove_small_holes(ar, min_size=64, connectivity=1, in_place=False): >>> d is a True """ - _supported_types(ar) - - if in_place: - out = ar - else: - out = ar.copy() + _check_dtype_supported(ar) #Creates warning if image is an integer image if ar.dtype != bool: warnings.warn("Any labeled images will be returned as a boolean array. " "Did you mean to use a boolean array?", UserWarning) + if in_place: + out = ar + else: + out = ar.copy() + #Creating the inverse of ar - out = np.logical_not(out) + if in_place: + out = np.logical_not(out,out) + else: + out = np.logical_not(out) #removing small objects from the inverse of ar out = remove_small_objects(out, min_size, connectivity, in_place) - out = np.logical_not(out) + if in_place: + out = np.logical_not(out,out) + else: + out = np.logical_not(out) return out \ No newline at end of file diff --git a/skimage/morphology/tests/test_misc.py b/skimage/morphology/tests/test_misc.py index 93e7b27a..0c16f5a2 100644 --- a/skimage/morphology/tests/test_misc.py +++ b/skimage/morphology/tests/test_misc.py @@ -162,7 +162,7 @@ def test_label_warning_holes(): [0,0,0,0,0,0,0,2,2,2], [0,0,0,0,0,0,0,2,0,2], [0,0,0,0,0,0,0,2,2,2]], dtype=int) - assert_warns(UserWarning, remove_small_holes, labeled_holes_image, min_size=3) + assert_warns(UserWarning, remove_small_holes, labeled_holes_image) def test_float_input_holes(): float_test = np.random.rand(5, 5) From 3f735b64827cf0c55864ad842bad408310617818 Mon Sep 17 00:00:00 2001 From: Olivia Date: Tue, 22 Sep 2015 17:35:32 +0100 Subject: [PATCH 05/11] Changed the test file to use expected warnings. This is with help from @blink1073 --- skimage/morphology/tests/test_misc.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/skimage/morphology/tests/test_misc.py b/skimage/morphology/tests/test_misc.py index 0c16f5a2..b7222cb5 100644 --- a/skimage/morphology/tests/test_misc.py +++ b/skimage/morphology/tests/test_misc.py @@ -2,6 +2,7 @@ import numpy as np from numpy.testing import (assert_array_equal, assert_equal, assert_raises, assert_warns) from skimage.morphology import remove_small_objects, remove_small_holes +from ..._shared._warnings import expected_warnings test_image = np.array([[0, 0, 0, 1, 0], [1, 1, 1, 0, 0], @@ -60,7 +61,8 @@ def test_single_label_warning(): image = np.array([[0, 0, 0, 1, 0], [1, 1, 1, 0, 0], [1, 1, 1, 0, 0]], int) - assert_warns(UserWarning, remove_small_objects, image, min_size=6) + with expected_warnings(['use a boolean array?']): + remove_small_objects(image, min_size=6) def test_float_input(): @@ -162,7 +164,8 @@ def test_label_warning_holes(): [0,0,0,0,0,0,0,2,2,2], [0,0,0,0,0,0,0,2,0,2], [0,0,0,0,0,0,0,2,2,2]], dtype=int) - assert_warns(UserWarning, remove_small_holes, labeled_holes_image) + with expected_warnings(['use a boolean array?']): + remove_small_holes(labeled_holes_image, min_size=3) def test_float_input_holes(): float_test = np.random.rand(5, 5) From a3bb9401c2a43709aacf4d54e66aa4618af6ec2c Mon Sep 17 00:00:00 2001 From: Olivia Date: Tue, 22 Sep 2015 17:41:22 +0100 Subject: [PATCH 06/11] Moved the comments on labeled arrays to notes section --- skimage/morphology/misc.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/skimage/morphology/misc.py b/skimage/morphology/misc.py index da27eae9..84b493b0 100644 --- a/skimage/morphology/misc.py +++ b/skimage/morphology/misc.py @@ -134,13 +134,9 @@ def remove_small_holes(ar, min_size=64, connectivity=1, in_place=False): Parameters ---------- ar : ndarray (arbitrary shape, int or bool type) - The array containing the connected components of interest. If the array - type is int, it is assumed that it contains already-labeled objects. The - labels are not kept in the output image (this function always outputs - a bool image. It is suggested that labeling is completed after using - this function. + The array containing the connected components of interest. min_size : int, optional (default: 64) - The smallest allowable connected component size. + The hole component size. connectivity : int, {1, 2, ..., ar.ndim}, optional (default: 1) The connectivity defining the neighborhood of a pixel. in_place : bool, optional (default: False) @@ -181,6 +177,14 @@ def remove_small_holes(ar, min_size=64, connectivity=1, in_place=False): >>> d = morphology.remove_small_holes(a, 2, in_place=True) >>> d is a True + + Notes + ----- + + If the array type is int, it is assumed that it contains already-labeled + objects. The labels are not kept in the output image (this function always + outputs a bool image). It is suggested that labeling is completed after + using this function. """ _check_dtype_supported(ar) From 413ac4a53b1daa38567d1d3b929649c95b20d02c Mon Sep 17 00:00:00 2001 From: Olivia Wilson Date: Wed, 23 Sep 2015 21:24:11 +0100 Subject: [PATCH 07/11] Altered doctests to correct spacing --- skimage/morphology/misc.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/skimage/morphology/misc.py b/skimage/morphology/misc.py index 84b493b0..b51a7bce 100644 --- a/skimage/morphology/misc.py +++ b/skimage/morphology/misc.py @@ -164,16 +164,16 @@ def remove_small_holes(ar, min_size=64, connectivity=1, in_place=False): ... [1, 1, 1, 1, 1, 0]], bool) >>> b = morphology.remove_small_holes(a, 2) >>> b - array([[True, True, True, True, True, False], - [True, True, True, True, True, False], - [True, False, False, True, True, False], - [True, True, True, True, True, False]], dtype=bool) + array([[ True, True, True, True, True, False], + [ True, True, True, True, True, False], + [ True, False, False, True, True, False], + [ True, True, True, True, True, False]], dtype=bool) >>> c = morphology.remove_small_holes(a, 2, connectivity=2) >>> c - array([[True, True, True, True, True, False], - [True, True, True, False, True, False], - [True, False, False, True, True, False], - [True, True, True, True, True, False]], dtype=bool) + array([[ True, True, True, True, True, False], + [ True, True, True, False, True, False], + [ True, False, False, True, True, False], + [ True, True, True, True, True, False]], dtype=bool) >>> d = morphology.remove_small_holes(a, 2, in_place=True) >>> d is a True From 19fbdfb6fef1ef4da1043a059519c017a88ee6b4 Mon Sep 17 00:00:00 2001 From: Olivia Wilson Date: Thu, 24 Sep 2015 11:58:40 +0100 Subject: [PATCH 08/11] Adjusted white space for doctests --- skimage/morphology/misc.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/skimage/morphology/misc.py b/skimage/morphology/misc.py index b51a7bce..3bbe4095 100644 --- a/skimage/morphology/misc.py +++ b/skimage/morphology/misc.py @@ -170,10 +170,10 @@ def remove_small_holes(ar, min_size=64, connectivity=1, in_place=False): [ True, True, True, True, True, False]], dtype=bool) >>> c = morphology.remove_small_holes(a, 2, connectivity=2) >>> c - array([[ True, True, True, True, True, False], - [ True, True, True, False, True, False], - [ True, False, False, True, True, False], - [ True, True, True, True, True, False]], dtype=bool) + array([[ True, True, True, True, True, False], + [ True, True, True, False, True, False], + [ True, False, False, True, True, False], + [ True, True, True, True, True, False]], dtype=bool) >>> d = morphology.remove_small_holes(a, 2, in_place=True) >>> d is a True From 5c7c67db1219058ca0060ff80177aefb9cd2dc26 Mon Sep 17 00:00:00 2001 From: Olivia Date: Fri, 25 Sep 2015 14:51:06 +0100 Subject: [PATCH 09/11] Made changes to doctests --- skimage/morphology/misc.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/skimage/morphology/misc.py b/skimage/morphology/misc.py index 84b493b0..072b4d84 100644 --- a/skimage/morphology/misc.py +++ b/skimage/morphology/misc.py @@ -168,6 +168,11 @@ def remove_small_holes(ar, min_size=64, connectivity=1, in_place=False): [True, True, True, True, True, False], [True, False, False, True, True, False], [True, True, True, True, True, False]], dtype=bool) + array([[ True, True, True, True, True, False], + [ True, True, True, True, True, False], + [ True, False, False, True, True, False], + [ True, True, True, True, True, False]], dtype=bool) + >>> c = morphology.remove_small_holes(a, 2, connectivity=2) >>> c array([[True, True, True, True, True, False], From 815c5c8ee7f6b92fcaf478fe7de38661af5efaf0 Mon Sep 17 00:00:00 2001 From: Olivia Wilson Date: Wed, 7 Oct 2015 10:59:26 +0100 Subject: [PATCH 10/11] Added new line --- skimage/morphology/misc.py | 1 + 1 file changed, 1 insertion(+) diff --git a/skimage/morphology/misc.py b/skimage/morphology/misc.py index 3bbe4095..5629062c 100644 --- a/skimage/morphology/misc.py +++ b/skimage/morphology/misc.py @@ -213,4 +213,5 @@ def remove_small_holes(ar, min_size=64, connectivity=1, in_place=False): out = np.logical_not(out) return out + \ No newline at end of file From 2045c44d1f3506a0c18c5e769c29d30f32555df6 Mon Sep 17 00:00:00 2001 From: Olivia Wilson Date: Wed, 7 Oct 2015 11:30:20 +0100 Subject: [PATCH 11/11] Removed trailing whitespace --- skimage/morphology/misc.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/skimage/morphology/misc.py b/skimage/morphology/misc.py index 5f2fa27f..1a024f38 100644 --- a/skimage/morphology/misc.py +++ b/skimage/morphology/misc.py @@ -213,5 +213,3 @@ def remove_small_holes(ar, min_size=64, connectivity=1, in_place=False): out = np.logical_not(out) return out - - \ No newline at end of file