raise RuntimeError("scipy >= 0.11 must be installed (or > 0.13 "
"if dist_limit < np.inf")
if not all(s["type"] == "surf" for s in src):
raise RuntimeError("Currently all source spaces must be of surface "
"type")
After Change
min_idxs = list()
logger.info("Calculating source space distances (limit=%s mm)..."
% (1000 * dist_limit))
max_n = max(s["nuse"] for s in src)
if max_n > _DIST_WARN_LIMIT:
warn("Computing distances for %d source space points (in one "
"hemisphere) will be very slow, consider using add_dist=False"
% (max_n,))