Repository navigation
Conversation
eriknw
force-pushed
the
43-networkx-to-networkx-nodes
branch
from
October 19, 2026 07:55
685493e to
2a59411
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 42-networkx-structural-ingest #646 +/- ##
=================================================================
+ Coverage 98.73% 98.78% +0.05%
=================================================================
Files 105 105
Lines 30382 30393 +11
Branches 3540 3540
=================================================================
+ Hits 29998 30025 +27
+ Misses 253 243 -10
+ Partials 131 125 -6 🚀 New features to boost your workflow:
|
eriknw
force-pushed
the
43-networkx-to-networkx-nodes
branch
from
October 20, 2026 22:28
2a59411 to
26e29bc
Compare
eriknw
force-pushed
the
43-networkx-to-networkx-nodes
branch
from
October 21, 2026 04:14
26e29bc to
0e6d3b6
Compare
eriknw
force-pushed
the
43-networkx-to-networkx-nodes
branch
from
October 21, 2026 08:38
0e6d3b6 to
0901634
Compare
eriknw
force-pushed
the
43-networkx-to-networkx-nodes
branch
from
October 28, 2026 04:29
0901634 to
869ab7d
Compare
eriknw
force-pushed
the
43-networkx-to-networkx-nodes
branch
from
October 28, 2026 13:21
869ab7d to
55f6469
Compare
to_networkx built its DiGraph from the matrix's entries alone, so an index whose row and column are both empty (a node with no edges) vanished, and the nodes came out in the order the sorted entries first named them. A 5x5 matrix with entries (0, 3), (2, 0) and (3, 3) became a graph with nodes [0, 3, 2]; from_networkx then gave back a 3x3 matrix with rows and columns permuted. viz.draw, which draws through to_networkx, left such nodes out of the picture. Add range(nrows) as nodes before the edges, so every row is a node and the nodes iterate in index order, and from_networkx(to_networkx(M)) gives back M. The user guide's line on to_networkx said it always labels the values "weight"; it now says what the nodes are and that edge_attribute names (or drops) the values.
eriknw
force-pushed
the
43-networkx-to-networkx-nodes
branch
from
October 29, 2026 02:01
55f6469 to
37b4eb4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
to_networkxbuilt its DiGraph from the entries alone, so a node with no edgesvanished, and the nodes came out in the order the sorted entries named them. A
5x5 matrix with entries (0, 3), (2, 0), (3, 3) gave nodes [0, 3, 2] and
round-tripped to a permuted 3x3. It now adds
range(nrows)first.viz.drawshows such nodes too, and the user guide's line on
to_networkxsays what thenodes are.