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

Should is_distance_regular and intersection_array have @not_implemented_for? #7172

Closed
rossbar opened this issue Dec 18, 2023 · 1 comment · Fixed by #7182
Closed

Should is_distance_regular and intersection_array have @not_implemented_for? #7172

rossbar opened this issue Dec 18, 2023 · 1 comment · Fixed by #7182
Labels
Question A question about NetworkX or network science in general

Comments

@rossbar
Copy link
Contributor

rossbar commented Dec 18, 2023

Something I noticed while reviewing #5849 :

The docstrings for is_distance_regular and intersection_array state that they are only defined for undirected graphs; however, the implementations do not check the type of the graph. The functions and definitions should be reviewed to determine whether these should get the not_implemented_for decorator.

@rossbar rossbar added the Question A question about NetworkX or network science in general label Dec 18, 2023
@dschult
Copy link
Member

dschult commented Dec 18, 2023

It looks like those two functions use @not_implemented_for("directed", "multigraph") which is almost certainly a bug that should be written:

@not_implemented_for("directed")
@not_implemented_for("multigraph")

See #6904 for others that should be checked too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question A question about NetworkX or network science in general
Development

Successfully merging a pull request may close this issue.

2 participants