From 9510c03ce525c031a4514bbb266207d226ca9a79 Mon Sep 17 00:00:00 2001 From: Juan Nunez-Iglesias Date: Wed, 9 Apr 2014 17:55:35 +1000 Subject: [PATCH] Remove deprecated `ratio` keyword in SLIC --- skimage/segmentation/slic_superpixels.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/skimage/segmentation/slic_superpixels.py b/skimage/segmentation/slic_superpixels.py index 11373381..baac79ae 100644 --- a/skimage/segmentation/slic_superpixels.py +++ b/skimage/segmentation/slic_superpixels.py @@ -11,7 +11,7 @@ from skimage.color import rgb2lab def slic(image, n_segments=100, compactness=10., max_iter=10, sigma=None, - spacing=None, multichannel=True, convert2lab=True, ratio=None, + spacing=None, multichannel=True, convert2lab=True, enforce_connectivity=False, min_size_factor=0.5, max_size_factor=3, slic_zero=False): """Segments image using k-means clustering in Color-(x,y,z) space. @@ -48,8 +48,6 @@ def slic(image, n_segments=100, compactness=10., max_iter=10, sigma=None, Whether the input should be converted to Lab colorspace prior to segmentation. For this purpose, the input is assumed to be RGB. Highly recommended. - ratio : float, optional - Synonym for `compactness`. This keyword is deprecated. enforce_connectivity: bool, optional (default False) Whether the generated segments are connected or not min_size_factor: float, optional @@ -112,11 +110,6 @@ def slic(image, n_segments=100, compactness=10., max_iter=10, sigma=None, warnings.warn('Default value of keyword `sigma` changed from ``1`` ' 'to ``0``.') sigma = 0 - if ratio is not None: - warnings.warn('Keyword `ratio` is deprecated. Use `compactness` ' - 'instead.') - compactness = ratio - if enforce_connectivity is None: warnings.warn('Deprecation: enforce_connectivity will default to' ' True in future versions.')