Now uses SciPy's method to compute shortest paths.