Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: Link methods in functions to base Graph methods/properties #7125

Merged
merged 2 commits into from Nov 22, 2023

Conversation

MridulS
Copy link
Member

@MridulS MridulS commented Nov 20, 2023

This links the functions.py docstrings to the base Graph class, should resolve #7124

Copy link
Contributor

@rossbar rossbar left a comment

Choose a reason for hiding this comment

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

LGTM thanks @MridulS !

"""Returns an iterator over the graph nodes."""
"""Returns a NodeView over the graph nodes.

This function wraps the :func:`networkx.Graph.nodes` property.
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps we want to use the ~ to suppress the full object; I'm thinking that might help with ambiguity about the graph type (which the function preserves). Another option might be :func:`G.nodes <networkx.Graph.nodes>` to illustrate that it's the property of the instance G. YMMV though - there's no clear winner and I think it's fine as is!

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I think that makes sense, it may not be the "right" doc in the case of Multi/DiGraph but it should do the job.

@dschult dschult merged commit f93f0e2 into networkx:main Nov 22, 2023
38 checks passed
@jarrodmillman jarrodmillman added this to the 3.3 milestone Nov 22, 2023
cvanelteren pushed a commit to cvanelteren/networkx that referenced this pull request Apr 22, 2024
…orkx#7125)

* DOC: Link methods in functions to base Graph methods/properties

* make it pretty
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.

neighbors function returns iterator, not list
4 participants