-
Notifications
You must be signed in to change notification settings - Fork 86
Open
Description
Submitted by a reader:
Think Complexity version 2.6.3
This example from chapter 3 in the book expects a mean path length of 1, but with networkx version 3.4.1, the function returns 0.666.
Book:
"And we can test it with a small ring lattice:
PastedGraphic-2.png
In this example, all 3 nodes are connected to each other, so the mean path length is 1."
Notebook:
PastedGraphic-1.png
I modified the functions to investigate and see that a path length of 0 is being returned for the distance from a node to itself. Maybe the way shortest_path_length works changed?
PastedGraphic-3.png
Metadata
Metadata
Assignees
Labels
No labels