FirstCourseNetworkScience icon indicating copy to clipboard operation
FirstCourseNetworkScience copied to clipboard

fix some issues in Chapter 6 Tutorial.ipynb

Open MahmoudHamdy00 opened this issue 2 years ago • 1 comments

fix issues like

  • 'Graph' object has no attribute 'add_cycle'
  • 'Graph' object has no attribute 'node'

MahmoudHamdy00 avatar May 11 '22 21:05 MahmoudHamdy00

Is this due to a change in NetworkX? In that case, would the change break backward compatibility? @clayadavis what do you think?

filmenczer avatar May 11 '22 22:05 filmenczer

This is a good change and I'll merge the PR. I do see one other instance of G.add_cycle in Tutorial 2 that should probably be fixed too.

This is because of a change in NetworkX removing some old syntax. The concern isn't with backwards compatibility because both syntaxes worked for a while, my concern is whether or not we used the old syntax in the book.

clayadavis avatar Nov 16 '22 21:11 clayadavis

I did not find any use of .add_cycle in the book.

filmenczer avatar Nov 16 '22 23:11 filmenczer