Skip to content

DOC: Clarify node and edge removal behavior in tutorial - #8321

Merged
dschult merged 2 commits into
networkx:mainfrom
Aka2210:docs-fix-removal-examples
Oct 16, 2025
Merged

dschult merged 2 commits into
networkx:mainfrom
Aka2210:docs-fix-removal-examples

Conversation

@Aka2210

@Aka2210 Aka2210 commented Oct 12, 2025

Copy link
Copy Markdown
Contributor

This PR updates the “Removing elements from a graph” section to explicitly show how node and edge removals affect the graph structure.

It clarifies that removing a node also removes its incident edges, and replaces the ambiguous list(G) calls with explicit list(G.nodes) and list(G.edges) outputs to display both node and edge states clearly.

Update the “Removing elements from a graph” section to explicitly show
both nodes and edges after removal operations.

@rossbar rossbar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to me, thanks @Aka2210 !

@Peiffap Peiffap left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@dschult
dschult merged commit 9c89eb0 into networkx:main Oct 16, 2025
@dschult dschult added this to the 3.6 milestone Oct 16, 2025
@Aka2210
Aka2210 deleted the docs-fix-removal-examples branch October 22, 2025 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants