Ask Your Question

to_directed() affects original graph

asked 2017-02-23 04:27:23 -0500

Acksl gravatar image

updated 2017-07-31 15:09:09 -0500

FrédéricC gravatar image

I've stumbled on what I think is a bug. When you create a directed graph from some original graph and then making changes on the new, this can affect the old one. I'm not sure if it should be like this and one should always copy the graph first. Here's a minimal example that for be gives an error "KeyError: 0".

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2017-02-23 05:57:39 -0500

kcrisman gravatar image

updated 2017-02-23 11:08:03 -0500

What is REALLY weird about this is that the plotting itself seems to cause the problem! The documentation gives no clue that there should be side effects, so I've opened Trac 22424.

Edit: There is already (!) a patch up, which with a little luck will be ready for merging soon.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2017-02-23 04:27:23 -0500

Seen: 42 times

Last updated: Feb 23