MCPcopy Create free account
hub / github.com/alibaba/GraphScope / number_of_selfloops

Function number_of_selfloops

python/graphscope/nx/classes/function.py:156–160  ·  view source on GitHub ↗
(G)

Source from the content-addressed store, hash-verified

154
155@patch_docstring(func.number_of_selfloops)
156def number_of_selfloops(G):
157 if G.is_multigraph():
158 # we forward the MultiGraph nd MultiDiGraph
159 return sum(1 for _ in selfloop_edges(G))
160 return G.number_of_selfloops()
161
162
163@patch_docstring(func.set_node_attributes)

Callers

nothing calls this directly

Calls 2

number_of_selfloopsMethod · 0.80
is_multigraphMethod · 0.45

Tested by

no test coverage detected