pymnet.density

pymnet.density(net)

Returns the density of the network.

Density is defined as the number of edges in the network divided by the number of possible edges in a general multilayer network with the same set of nodes and layers.