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

Consistent conversion to undirected graphs #301

Merged
merged 13 commits into from
Apr 16, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[pre-commit.ci] auto fixes from pre-commit.com hooks
  • Loading branch information
pre-commit-ci[bot] committed Apr 10, 2023
commit e156ade38b15bd7f409078afa901c0871356d9b5
3 changes: 1 addition & 2 deletions graphein/ml/conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,7 @@ def convert_nx_to_pyg(self, G: nx.Graph) -> Data:
key = f"edge_index_{kind}"
if key in self.columns:
edge_index_kind = to_undirected(
getattr(data, key),
num_nodes=data.num_nodes
getattr(data, key), num_nodes=data.num_nodes
)
setattr(data, key, edge_index_kind)

Expand Down