mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-16 11:21:25 +08:00
BUG: Fix division error for Python 3
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user