data_graph

utilipy.data_graph = <utilipy.data_utils.xfm.graph.TransformGraph object>

Graph representing the paths between data types.

Notes

Note that the _graph key-value order is “totype”: “fromtype”. This is the opposite type as Astropy’s since this TransformGraph needs to support:

  • catch-all conversions, such as converting from any sequence data to type list by applying list(data)

  • sub-type conversions, where the conversion a -> b (with types A, B) works on any subtype of A (like A1(A)).

Todo

  • catch-all conversions to a specific type

  • multiple input option conversions to a specific type

  • multiple output option conversions by choosing one with shortest path

  • pre-register basic conversions like None->None, list->tuple