dgl.DGLGraph.get_ntype_id

DGLGraph.get_ntype_id(ntype)

Return the ID of the given node type.

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

Parameters

ntype (str) – Node type

Returns

Return type

int