Deprecate default mode 'bf' in random_walker

This commit is contained in:
Juan Nunez-Iglesias
2013-10-08 13:23:50 +11:00
parent fb86bac350
commit bfaf89e2f3
@@ -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 '