From ecf10a7a48ed0205a61da10a91153345266dcd1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Mon, 7 Oct 2013 23:33:12 +0200 Subject: [PATCH] Reduce number of specializations --- skimage/morphology/binary.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/skimage/morphology/binary.py b/skimage/morphology/binary.py index 70fcd6b4..7262c573 100644 --- a/skimage/morphology/binary.py +++ b/skimage/morphology/binary.py @@ -10,10 +10,8 @@ def _convolve(image, selem, out, cval): selem_sum = np.sum(selem) if selem_sum < 2 ** 8: out_dtype = np.uint8 - elif selem_sum < 2 ** 16: - out_dtype = np.uint16 else: - out_dtype = np.uint32 + out_dtype = np.intp if out is None: out = np.zeros_like(image, dtype=out_dtype)