tinygraph / tinygraphio

Tiny graph data interchange file format
https://tinygraph.org
Creative Commons Attribution 4.0 International
1 stars 0 forks source link

Add convenient Tinygraph construction functions #5

Open daniel-j-h opened 1 year ago

daniel-j-h commented 1 year ago

At the moment the Python impl. Tinygraph can only be constructed from the two arrays: an offsets array and a targets array.

We should - for convenience - provide construction e.g. from an iterable of (from, to) tuples or construction from two parallel iterables of [from0, from1, ..] and [to0, to1, ..] shape.

Note: we might want to look into networkx and scipy's sparse matrices and how to convert from/to them. Maybe split off into new ticket.