type_conversions#

dtype_to_gtype(dtype)[source]#

Convert a data type to a graph_tool data type.

edge_property_map_from_python(source, graph, dtype=None)[source]#

Create an edge property map from a python source.

edge_property_map_to_python(property_map, as_array=True)[source]#

Convert edge property map to a python array or list.

gtype_from_source(source, vectorize=True, graph_property=False)[source]#

Determines the graph_tool data type from a data source.

ndim_from_source(source)[source]#

Determines the dimension of a source appropriate for graph_tool.

ndim_to_gtype(ndim, gtype)[source]#

Convert a scalar gtype to a vector one if necessary.

set_edge_property_map(property_map, source)[source]#

Set values for edge property map.

set_vertex_property_map(property_map, source)[source]#

Set values for vertex property map.

vertex_property_map_from_python(source, graph, dtype=None)[source]#

Create a vertex property map from a python source.

vertex_property_map_to_python(property_map, as_array=True)[source]#

Convert vertex property map to a python array or list.