From 0ab93bbf366d0e938625cadb775180a6496dd80a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Sat, 6 Oct 2012 21:54:12 +0200 Subject: [PATCH] Remove redundant dtype conversion --- skimage/morphology/grey.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/skimage/morphology/grey.py b/skimage/morphology/grey.py index 47ef1d2c..69050773 100644 --- a/skimage/morphology/grey.py +++ b/skimage/morphology/grey.py @@ -254,7 +254,6 @@ def white_tophat(image, selem, out=None): """ if image is out: raise NotImplementedError("Cannot perform white top hat in place.") - image = img_as_ubyte(image) out = opening(image, selem, out=out) out = image - out @@ -304,7 +303,6 @@ def black_tophat(image, selem, out=None): if image is out: raise NotImplementedError("Cannot perform white top hat in place.") - image = img_as_ubyte(image) out = closing(image, selem, out=out) out = out - image