Replies: 1 comment 2 replies
-
Hi @scigeek72 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am building a graph data from a .csv file. Once the data is built (it is directed at this point), I am using
to_undirected
to convert it to anundirected
graph. Below is what I am getting depending on whether I am usingnum_nodes
parameter into_undirected
.now with
num_nodes
Note that the number of directed edges is 16641. So, without
num_nodes
, the code seems to produce the correct shape.When I am using
num_nodes
, the shape of theedge_index
changes (my guess is that this is causingis_undirected()
to beFalse
as for some edges, the inverse is not getting included in the output of the function).I looked at the source code for
to_undirected()
(here) but couldn't resolve this behavior.Can
num_nodes
change the behavior ofto_undirected()
?Your help is greatly appreciated. Thanks.
Beta Was this translation helpful? Give feedback.
All reactions