-
Notifications
You must be signed in to change notification settings - Fork 257
improve from_networkx performance #402
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
Conversation
Benchmark:
then in ipython,
The speedup is from ~2.0 seconds to ~12 milliseconds. |
I notice that the name |
Why is the test for this functionality in Originally I messed up and forgot to convert vertex names to IDs, yet tests did not seem to fail. Assuming I ran the tests correctly, the tests should be improved to catch this mistake. |
The capitalization is a leftover from the early days of the development of the Python interface where I thought this would be a good idea to distinguish class methods from "normal" methods. Nowadays I don't use this convention in new code and prefer normal
Because I probably forgot to move them when I switched from the tests-within-the-package layout to the tests-outside-the-package layout as advocated here :) It should be in |
Thanks a lot! |
No preference from me, just want to note that if this is done, it should be |
Thank you. Let's not rename and break API and also go against Python conventions. |
This attempts to address #401. It only fixes
from_networkx
, notfrom_graph_tool
. I need some feedback before proceeding. I don't really know much Python, and this was merely an exercise for me. Take a very careful look before merging.