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

indentation #3

Open
euhruska opened this issue Oct 21, 2017 · 3 comments
Open

indentation #3

euhruska opened this issue Oct 21, 2017 · 3 comments

Comments

@euhruska
Copy link

when running on a small problem I get:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "build/bdist.macosx-10.9-x86_64/egg/Christofides/christofides.py", line 164, in compute
  File "build/bdist.macosx-10.9-x86_64/egg/Christofides/christofides.py", line 120, in Euler_Tour
UnboundLocalError: local variable 'edge' referenced before assignment

I looks like the lines 120-123 in Christofides/christofides.py are wrongly indented with the for loop, maybe they should be indented with if command above.

@dsrahul30
Copy link
Owner

dsrahul30 commented Oct 21, 2017 via email

@gagangoku
Copy link

Its a bug. Its not working even for the test cases mentioned in graph.py

@alfcar9
Copy link

alfcar9 commented Nov 29, 2018

SimonDeRidde has a pull request that works on that repository and fixes the bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants