dwavesystems / dwavesystems/dwave-graphs
Inconsistent existence of coordinate systems in node attributes
Open
- Dominant language
- Python
- Stars
- 95
- Forks
- 62
- Avg merge
- 7d 18h
- Merged PRs (30d)
- 1
Description
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)}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.