Skip to content

Correct all_simple_paths docstring #2762 - #7676

Closed
manulera wants to merge 1 commit into
networkx:mainfrom
manulera:patch-1
Closed

manulera wants to merge 1 commit into
networkx:mainfrom
manulera:patch-1

Conversation

@manulera

@manulera manulera commented Oct 14, 2024 •

Copy link
Copy Markdown

As mentioned in #2762

Please update the documentation to state explicitly that the function by default searches for paths with cutoff=(number of nodes in graph -1). You must inspect the source code in order to find that, which may lead, as in my case, to a couple of hours of debugging.

This is the behaviour in the example:

>>> paths = nx.all_simple_paths(G, source=0, target=3, cutoff=2)
>>> print(list(paths))
[[0, 1, 3], [0, 2, 3], [0, 3]]

@rossbar

rossbar commented Oct 17, 2024

Copy link
Copy Markdown
Contributor

There is already a PR open related to this topic - see #7487 . Since there's already been quite a bit of discussion there, I'll go ahead and close this - please don't hesitate to weigh in on the discussion there!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants