dgl.DGLHeteroGraph.int

DGLHeteroGraph.int()[source]

Return a heterograph object use int32 as index dtype, with the ndata and edata as the original object

Returns:The graph object
Return type:DGLHeteroGraph

Examples

>>> g = dgl.bipartite(([0, 1, 1], [0, 0, 2]), 'user', 'plays', 'game',
>>>                   index_dtype='int64')
>>> g_int = g.int() # Convert g to int32 indexed, not changing the original `g`

See also

long(), idtype()