turicreate.SGraph.summary

SGraph.summary()

Return the number of vertices and edges as a dictionary.

Returns:
out : dict

A dictionary containing the number of vertices and edges.

See also

Vertex, Edge

Examples

>>> from turicreate import SGraph, Vertex
>>> g = SGraph().add_vertices([Vertex(i) for i in range(10)])
>>> n_vertex = g.summary()['num_vertices']
10
>>> n_edge = g.summary()['num_edges']
0