From a9c7064275a9b08538c4b3aab7afff91b044c620 Mon Sep 17 00:00:00 2001 From: jnke2016 Date: Mon, 30 Sep 2024 21:45:58 -0700 Subject: [PATCH] fix typo --- .../cugraph/structure/property_graph.py | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/python/cugraph/cugraph/structure/property_graph.py b/python/cugraph/cugraph/structure/property_graph.py index 80c1bd354f4..c187d668495 100644 --- a/python/cugraph/cugraph/structure/property_graph.py +++ b/python/cugraph/cugraph/structure/property_graph.py @@ -2011,17 +2011,27 @@ def edge_props_to_graph( # symmetrize function. # Symmetrize the internal representation of the edgelists - source_col, dest_col, value_col = symmetrize( - G.edgelist.edgelist_df, - "src", - "dst", - "weights", - symmetrize=not G.is_directed()) + + if edge_attr is not None: + source_col, dest_col, value_col = symmetrize( + G.edgelist.edgelist_df, + "src", + "dst", + "weights", + symmetrize=not G.is_directed()) + else: + source_col, dest_col = symmetrize( + G.edgelist.edgelist_df, + "src", + "dst", + symmetrize=not G.is_directed()) + renumbered_edge_prop_df = cudf.DataFrame() renumbered_edge_prop_df["src"] = source_col renumbered_edge_prop_df["dst"] = dest_col - renumbered_edge_prop_df["weights"] = value_col + if edge_attr: + renumbered_edge_prop_df["weights"] = value_col G.edgelist.edgelist_df = renumbered_edge_prop_df