def circular(adjacency_mat, directed=False):
 if issparse(adjacency_mat):
  adjacency_mat = adjacency_mat.tocoo()
 num_nodes = adjacency_mat.shape[0]
 t = np.linspace(0, (2 * np.pi), num_nodes, endpoint=False, dtype=np.float32)
 node_coords = ((0.5 * np.array([np.cos(t), np.sin(t)])) + 0.5).T
 (line_vertices, arrows) = _straight_line_vertices(adjacency_mat, node_coords, directed)
 (yield (node_coords, line_vertices, arrows))

def circular ( adjacency_mat , directed = False ) : if issparse ( adjacency_mat ) : adjacency_mat = adjacency_mat . tocoo ( ) num_nodes = adjacency_mat . shape [ 0 ] t = np . linspace ( 0 , ( 2 * np . pi ) , num_nodes , endpoint = False , dtype = np . float32 ) node_coords = ( ( 0.5 * np . array ( [ np . cos ( t ) , np . sin ( t ) ] ) ) + 0.5 ) . T ( line_vertices , arrows ) = _straight_line_vertices ( adjacency_mat , node_coords , directed ) ( yield ( node_coords , line_vertices , arrows ) )
places all nodes on a single circle .