From 05fbc3fbfcc00157841c18b15b171d6477bfb5da Mon Sep 17 00:00:00 2001 From: Juan Nunez-Iglesias Date: Mon, 16 Sep 2013 22:42:48 +1000 Subject: [PATCH] Bug fix: typo: wrote spacing instead of sigma --- skimage/segmentation/slic_superpixels.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skimage/segmentation/slic_superpixels.py b/skimage/segmentation/slic_superpixels.py index 3cb67874..422dff98 100644 --- a/skimage/segmentation/slic_superpixels.py +++ b/skimage/segmentation/slic_superpixels.py @@ -119,7 +119,7 @@ def slic(image, n_segments=100, compactness=10., max_iter=10, sigma=None, spacing = np.array(spacing, np.double) if not isinstance(sigma, coll.Iterable): sigma = np.array([sigma, sigma, sigma], np.double) - elif isinstance(spacing, (list, tuple)): + elif isinstance(sigma, (list, tuple)): sigma = np.array(sigma, np.double) if (sigma > 0).any(): sigma /= spacing.astype(np.double)