#

Note

This documents the development version of NetworkX. Documentation for the current release can be found here.

#

networkx.algorithms.triads.random_triad

random_triad(G)[source]

Returns a random triad from a directed graph.

Parameters

G (digraph) – A NetworkX DiGraph

Returns

G2 – A randomly selected triad (order-3 NetworkX DiGraph)

Return type

subgraph