# dgl.DGLGraph.in_degrees¶

DGLGraph.in_degrees(v='__ALL__')

Return the array d of in-degrees of the node array v.

d[i] is the in-degree of node v[i].

Parameters: v (list, tensor, optional.) – The node ID array. Default is to return the degrees of all the nodes. d – The in-degree array. tensor

Examples

The following example uses PyTorch backend.

>>> G = dgl.DGLGraph()