BUG: shortest_path overwrite
Merge pull request #3801 from argriffing/shortest-path-overwrite

BUG: sparse.csgraph: fix up shortest_path overwriting data