espaloma.graphs.utils.read_heterogeneous_graph.duplicate_index_ordering

espaloma.graphs.utils.read_heterogeneous_graph.duplicate_index_ordering(indices: numpy.ndarray) numpy.ndarray[source]

For every (a,b,c,d) add a (d,c,b,a)

TODO: is there a way to avoid this duplication?

>>> indices = np.array([[0, 1, 2, 3], [1, 2, 3, 4]])
>>> duplicate_index_ordering(indices)
array([[0, 1, 2, 3],
       [1, 2, 3, 4],
       [3, 2, 1, 0],
       [4, 3, 2, 1]])