xgi-org / xgi

CompleX Group Interactions (XGI) is a Python package for higher-order networks.
https://xgi.readthedocs.io
Other
181 stars 29 forks source link

Node positions for drawing could have an improved data structure #280

Open nwlandry opened 1 year ago

nwlandry commented 1 year ago

The current data structure is inherited from NetworkX and is key:val pairs of node ID:[x, y]. In the drawing functions, it can be inefficient to draw with a for-loop and in several places, the data structure is converted. I propose that the position be stored as pos = {"ids": np.array(ids), "x": np.array(x), "y": np.array(y)}.

nwlandry commented 1 year ago

Once #456 is merged, this might be easier to implement.