From 8084faf1f69c2c4ba79b6e85c7a2a06e1e7c77b8 Mon Sep 17 00:00:00 2001 From: Tony S Yu Date: Sun, 26 Aug 2012 16:33:25 -0400 Subject: [PATCH] BUG: Fix division error for Python 3 --- skimage/morphology/greyreconstruct.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skimage/morphology/greyreconstruct.py b/skimage/morphology/greyreconstruct.py index bf3caffe..9e447800 100644 --- a/skimage/morphology/greyreconstruct.py +++ b/skimage/morphology/greyreconstruct.py @@ -133,7 +133,7 @@ def reconstruction(seed, mask, method='dilation', selem=None, offset=None): if offset == None: if not all([d % 2 == 1 for d in selem.shape]): ValueError("Footprint dimensions must all be odd") - offset = np.array([d / 2 for d in selem.shape]) + offset = np.array([d // 2 for d in selem.shape]) # Cross out the center of the selem selem[[slice(d, d + 1) for d in offset]] = False