dgl.DGLHeteroGraph.long

DGLHeteroGraph.long()[source]

Return a heterograph object use int64 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='int32')
>>> g_long = g.long() # Convert g to int64 indexed, not changing the original `g`

See also

int(), idtype()