dgl.DGLHeteroGraph.get_etype_id

DGLHeteroGraph.get_etype_id(etype)[source]

Return the id of the given edge type.

etype can also be None. If so, there should be only one edge type in the graph.

Parameters:etype (str or tuple of str) – Edge type
Returns:
Return type:int