turicreate.Vertex¶
-
class
turicreate.
Vertex
(vid, attr={}, _series=None)¶ A vertex object, consisting of a vertex ID and a dictionary of vertex attributes. The vertex ID can be an integer, string, or float.
Parameters: - vid : int or string or float
Vertex ID.
- attr : dict, optional
Vertex attributes. A Dictionary of string keys and values with one of the following types: int, float, string, array of floats.
Examples
>>> from turicreate import SGraph, Vertex, Edge >>> g = SGraph()
>>> verts = [Vertex(0, attr={'breed': 'labrador'}), Vertex(1, attr={'breed': 'labrador'}), Vertex(2, attr={'breed': 'vizsla'})] >>> g = g.add_vertices(verts)
Methods