How to find shortest path in skeletonized maze image?
It's because you are reassigning you reference to the skeletonized graph here
G = nx.path_graph(len(ps))
G = nx.karate_club_graph()
It's because you are reassigning you reference to the skeletonized graph here
G = nx.path_graph(len(ps))
G = nx.karate_club_graph()