mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-29 13:49:56 +08:00
Deprecate out parameter
This commit is contained in:
@@ -6,6 +6,7 @@ Version 0.10
|
||||
* Remove {`ratio`, `sigma`} deprecation warnings of `skimage.segmentation.slic`
|
||||
* Change default mode of random_walker segmentation to 'cg_mg' > 'cg' > 'bf',
|
||||
depending on which optional dependencies are available.
|
||||
* Remove deprecated `out` parameter of `skimage.morphology.binary_*`
|
||||
|
||||
Version 0.9
|
||||
-----------
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import warnings
|
||||
import numpy as np
|
||||
from scipy import ndimage
|
||||
|
||||
@@ -15,6 +16,9 @@ def _convolve(image, selem, out, cval):
|
||||
if out is None:
|
||||
out = np.zeros_like(image, dtype=out_dtype)
|
||||
else:
|
||||
warnings.warn('Parameter `out` is deprecated and it does not equal '
|
||||
'the output image if the sum of the structuring element '
|
||||
'overflows the dtype of `out`.')
|
||||
iinfo = np.iinfo(out.dtype)
|
||||
if iinfo.max - iinfo.min < selem_sum:
|
||||
raise ValueError('Sum of structuring (=%d) element results in '
|
||||
|
||||
Reference in New Issue
Block a user