dgl.DGLHeteroGraph.etypesΒΆ

DGLHeteroGraph.etypesΒΆ

Return the list of edge types of this graph.

Returns:
Return type:list of str

Examples

>>> follows_g = dgl.graph([(0, 1), (1, 2)], 'user', 'follows')
>>> plays_g = dgl.bipartite([(0, 0), (1, 0), (1, 1), (2, 1)], 'user', 'plays', 'game')
>>> g = dgl.hetero_from_relations([follows_g, plays_g])
>>> g.etypes
['follows', 'plays']