pyt-team / TopoNetX

Computing on Topological Domains
https://pyt-team.github.io/toponetx/
MIT License
179 stars 34 forks source link

Inconsistencies in `__getitem__` implementation across complex types #270

Closed ffl096 closed 3 months ago

ffl096 commented 1 year ago

Similar to #266, the __getitem__ method is not implemented consistently across different complex types:

ffl096 commented 4 months ago

For context, NetworkX works as follows:

That being said, I am not sure we want to mirror that API exactly. For example, SC[node][neighbour] is ill-defined, as there can be multiple connections between two nodes and it is not clear what attributes to return.