dwave-networkx
dwave-networkx copied to clipboard
Inconsistent existence of coordinate systems in node attributes
Graph node attributes contain inconsistent node attributes depending on initialization. This makes downstream code unnecessarily complex and unreliable
Example:
import dwave_networkx as dnx
P = dnx.pegasus_graph(6, coordinates=False)
print(P.nodes[20])
P = dnx.pegasus_graph(6, coordinates=True)
print(P.nodes[0, 0, 4, 0])
P = dnx.pegasus_graph(6, nice_coordinates=True)
print(P.nodes[0, 0, 0, 0, 0])
outputs
{'pegasus_index': (0, 0, 4, 0)}
{'linear_index': 20}
{'linear_index': 20, 'pegasus_index': (0, 0, 4, 0)}