-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
BUG: fix Johnson's algorithm #17863
BUG: fix Johnson's algorithm #17863
Conversation
It's not my area so I would defer to other maintainers. There is a release flag so it will eventually get more attention. @j-bowhay @WarrenWeckesser are you able to look into it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks pretty solid to me. I confirmed that the original reproducer fails on latest main
and passes on the branch here, and the new regression test looks pretty similar. I've added a backport label--this issue has been around since 1.7.x
series it looks like.
The fact that no old tests were modified builds some confidence that there are no unintended breaks introduced by this, from the perspective of a non-expert anyway. There are a fair number of shortest_path
tests in the suite already too.
We could ask @perimosocordiae to take a quick look--looks like they poked around here a while ago.
Even in the absence of an expert review though, this seems fairly solid.
Remove unnecessary reset of dist_array during Bellman-Ford weight updates. Add unit test for negative weighted shortest paths. See scipy#14980
This looks pretty solid and I think I'd like to backport it, so in it goes. More details on justification in comment above. |
Reference issue
Closes #14980
What does this implement/fix?
Remove unnecessary reset of dist_array during Bellman-Ford weight updates.
Add unit test for negative weighted shortest paths.