Network.from_nodes_and_edges

classmethod Network.from_nodes_and_edges(nodes, edges)

Construct a network from nodes and edges.

Parameters
  • nodes (list , dict) – A list of node coordinates or a dictionary of keys pointing to node coordinates to specify keys.

  • edges (list of tuple of int)

Returns

Network – A network object.

Examples

>>>