# dgl.DGLHeteroGraph.get_ntype_id¶

DGLHeteroGraph.get_ntype_id(ntype)[source]

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 int