mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-12 12:30:16 +08:00
Fix numpy 1.8 bug
This commit is contained in:
@@ -29,7 +29,7 @@ def binary_erosion(image, selem, out=None):
|
||||
|
||||
"""
|
||||
|
||||
conv = ndimage.convolve(image > 0, selem, output=out,
|
||||
conv = ndimage.convolve((image > 0).view(np.uint8), selem, output=out,
|
||||
mode='constant', cval=1)
|
||||
if conv is not None:
|
||||
out = conv
|
||||
@@ -64,7 +64,7 @@ def binary_dilation(image, selem, out=None):
|
||||
|
||||
"""
|
||||
|
||||
conv = ndimage.convolve(image > 0, selem, output=out,
|
||||
conv = ndimage.convolve((image > 0).view(np.uint8), selem, output=out,
|
||||
mode='constant', cval=0)
|
||||
if conv is not None:
|
||||
out = conv
|
||||
|
||||
Reference in New Issue
Block a user