Skip to content

Updated docstring for generators/karate_club_graph() - #7626

Merged
MridulS merged 4 commits into
networkx:mainfrom
mbbolger:docstring-update-issue-7519
Sep 30, 2024
Merged

MridulS merged 4 commits into
networkx:mainfrom
mbbolger:docstring-update-issue-7519

Conversation

@mbbolger

@mbbolger mbbolger commented Sep 9, 2024 •

Copy link
Copy Markdown
Contributor

Added the following lines to the karate_club_graph() docstring in networkx/generators/social.py:

    The dataset is derived from the 'Club After Split From Data' column of Table 3 in the source paper.
    This was in turn derived from the 'Club After Fission' column of Table 1 in the same paper.
    Note that the nodes are 0-indexed in NetworkX, but 1-indexed in the paper
    (the 'Individual Number in Matrix C' column of Table 3 starts at 1).
    This means, for example, that G.nodes[9]["club"] returns 'Officer',
    which corresponds to row 10 of Table 3 in the paper.

Closes #7519 #7515

@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.

Thanks!

Comment thread networkx/generators/social.py Resolved
Added Peiffap suggestion (additional formatting on code snippet)

Co-authored-by: Gilles Peiffer <[email protected]>
@dschult

dschult commented Sep 14, 2024

Copy link
Copy Markdown
Member

Thanks for this!
Could you make the first two lines wrap nicely (within 88 chars for sure and maybe 80 to look nice)?

Comment thread networkx/generators/social.py Resolved
mbbolger and others added 2 commits September 23, 2024 07:44
katate_club_graph() docstring update (revision)

Co-authored-by: Miguel Cárdenas <[email protected]>

@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.

I took the liberty of pushing up a very minor change to use the numpydoc-style references and ensure that any remaining style nits were cleared up by pre-commit. Thanks @mbbolger and @miguelcsx for preparing this clarification!

@MridulS MridulS added this to the 3.4 milestone Sep 30, 2024
@MridulS
MridulS merged commit 312122c into networkx:main Sep 30, 2024
@mbbolger
mbbolger deleted the docstring-update-issue-7519 branch October 3, 2024 00:03
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.

Clarification of networkx.karate_club_graph() Dataset

7 participants