BUG: Fix division error for Python 3

This commit is contained in:
Tony S Yu
2012-08-26 16:33:25 -04:00
parent 24ef77ed3e
commit 8084faf1f6
+1 -1
View File
@@ -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