Added deprecation warning

This commit is contained in:
Guillem Palou Visa
2014-01-17 16:52:44 +01:00
parent f461d76004
commit 15c2989158
2 changed files with 8 additions and 2 deletions
+2 -1
View File
@@ -1,7 +1,8 @@
Version 0.11
------------
* Remove deprecated `reverse_map` parameter of `skimage.transform.warp`
* Change depecrated `enforce_connectivity=False`on skimage.segmentation.slic
and set it to True as default
Version 0.10
------------
+6 -1
View File
@@ -48,7 +48,7 @@ def slic(image, n_segments=100, compactness=10., max_iter=10, sigma=None,
recommended.
ratio : float, optional
Synonym for `compactness`. This keyword is deprecated.
enforce_connectivity: bool, optional
enforce_connectivity: bool, optional (default False)
Whether the generated segments are connected or not
min_size_factor: float, optional
Proportion of the minimum segment size to be removed with respect
@@ -112,6 +112,11 @@ def slic(image, n_segments=100, compactness=10., max_iter=10, sigma=None,
'instead.')
compactness = ratio
if enforce_connectivity is None:
warnings.warn('Deprecation: enforce_connectivity will default to'
' True in future versions.')
enforce_connectivity = False
image = img_as_float(image)
is_2d = False
if image.ndim == 2: