You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: