From ffcade8a251e14aa104d95056601918bde660249 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Scho=CC=88nberger?= Date: Mon, 30 Apr 2012 09:04:35 +0200 Subject: [PATCH] removed unnecessary cast step --- skimage/filter/thresholding.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/skimage/filter/thresholding.py b/skimage/filter/thresholding.py index e34a7751..2cb2d8e0 100644 --- a/skimage/filter/thresholding.py +++ b/skimage/filter/thresholding.py @@ -84,9 +84,7 @@ def threshold_adaptive(image, block_size, method='gaussian', offset=0, scipy.ndimage.median_filter(image, block_size, output=thresh_image, mode=mode) - thresh_image = image > (thresh_image - offset) - - return thresh_image.astype('bool') + return image > (thresh_image - offset) def threshold_otsu(image, nbins=256): """Return threshold value based on Otsu's method.