Skip to content

Commit

Permalink
fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
nwlandry committed Aug 23, 2024
1 parent fbeca48 commit 85ab2c5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions xgi/readwrite/hif.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@ def _empty_edge(network_type):

if network_type == "directed":
d = record["direction"]
G.add_node_to_edge(n, e, d)
G.add_node_to_edge(e, n, d)
else:
G.add_node_to_edge(n, e)
G.add_node_to_edge(e, n)

# import node attributes if they exist
if "nodes" in data:
Expand All @@ -200,7 +200,6 @@ def _empty_edge(network_type):
attr = record["attr"]
else:
attr = {}

if e not in G._edge:
G.add_edge(_empty_edge(network_type), e, **attr)
else:
Expand Down

0 comments on commit 85ab2c5

Please sign in to comment.