mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-28 20:56:46 +08:00
Deprecate default mode 'bf' in random_walker
This commit is contained in:
@@ -187,7 +187,7 @@ def _build_laplacian(data, mask=None, beta=50, depth=1., multichannel=False):
|
||||
#----------- Random walker algorithm --------------------------------
|
||||
|
||||
|
||||
def random_walker(data, labels, beta=130, mode='bf', tol=1.e-3, copy=True,
|
||||
def random_walker(data, labels, beta=130, mode=None, tol=1.e-3, copy=True,
|
||||
multichannel=False, return_full_prob=False, depth=1.):
|
||||
"""Random walker algorithm for segmentation from markers.
|
||||
|
||||
@@ -339,6 +339,12 @@ def random_walker(data, labels, beta=130, mode='bf', tol=1.e-3, copy=True,
|
||||
|
||||
"""
|
||||
|
||||
if mode is None:
|
||||
mode = 'bf'
|
||||
warnings.warn("Default mode will change in the next release from 'bf' "
|
||||
"to 'cg_mg' if pyamg is installed, else to 'cg' if "
|
||||
"SciPy was built with UMFPACK, or to 'bf' otherwise.")
|
||||
|
||||
if UmfpackContext is None and mode == 'cg':
|
||||
warnings.warn('SciPy was built without UMFPACK. Consider rebuilding '
|
||||
'SciPy with UMFPACK, this will greatly speed up the '
|
||||
|
||||
Reference in New Issue
Block a user