Skip to content

Correcting the example given under subgraph_is_monomorphic.py - #7779

Merged
dschult merged 1 commit into
networkx:mainfrom
akshitasure12:fix-subgraph-monomorphism-docs
Dec 29, 2024
Merged

dschult merged 1 commit into
networkx:mainfrom
akshitasure12:fix-subgraph-monomorphism-docs

Conversation

@akshitasure12

@akshitasure12 akshitasure12 commented Dec 26, 2024 •

Copy link
Copy Markdown
Contributor

This pull request resolves a documentation issue in the NetworkX isomorphism module, where the functionality of subgraph_is_monomorphic was incorrectly described as checking for subgraph isomorphism.

Current Documentation :
The current example incorrectly implies that subgraph_is_monomorphic is used to check for isomorphism:

Check whether a subgraph of H is isomorphic to G:

        >>> isomatcher = nx.isomorphism.GraphMatcher(H, G)
        >>> isomatcher.subgraph_is_monomorphic()
        True

Expected Documentation Update :
The example should describe the functionality accurately as checking for monomorphism:

Check whether a subgraph of H is monomorphic to G:

        >>> isomatcher = nx.isomorphism.GraphMatcher(H, G)
        >>> isomatcher.subgraph_is_monomorphic()
        True

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

This looks right! Thanks!

@dschult
dschult merged commit 136f4ec into networkx:main Dec 29, 2024
@jarrodmillman jarrodmillman added this to the 3.5 milestone Dec 29, 2024
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.

3 participants