Open Table Of Contents

viz Package

astviz Module

Visualize an AST.

class numba.viz.astviz.ASTGraphAdaptor

Bases: object

children(node)
class numba.viz.astviz.ASTGraphRenderer

Bases: object

render(node)
render_edge(source, dest)
class numba.viz.astviz.SomeConstant(value)

Bases: object

numba.viz.astviz.fields(node)
numba.viz.astviz.is_ast(node)
numba.viz.astviz.make_list(node)
numba.viz.astviz.nodes(node)
numba.viz.astviz.render_ast(ast, output_file)
numba.viz.astviz.strval(val)

cfgviz Module

Visualize a CFG.

class numba.viz.cfgviz.CFGGraphAdaptor

Bases: numba.viz.graphviz.GraphAdaptor

children(node)
class numba.viz.cfgviz.CFGGraphRenderer

Bases: numba.viz.graphviz.GraphRenderer

render(node)
numba.viz.cfgviz.cf_from_source(source, func_globals)

Render the SSA graph given python source code

numba.viz.cfgviz.render_cfg(cfflow, output_file)

Render the SSA graph given the flow.CFGFlow and the symbol table

numba.viz.cfgviz.render_cfg_from_source(source, output_file, func_globals=())

Render the SSA graph given python source code

graphviz Module

Graph visualization for abitrary graphs. An attempt to unify all the many different graphs we want to visualize (numba.control_flow.graphviz, numba.minivect.graphviz, etc).

class numba.viz.graphviz.GraphAdaptor

Bases: object

Allow traversal of a foreign AST.

children(node)

Return the children for this graph node

class numba.viz.graphviz.GraphRenderer

Bases: object

Allow traversal of a foreign AST.

render(node)

Return the label for this graph node

render_edge(source, dest)

Return the label for this edge or None

class numba.viz.graphviz.GraphvizGenerator(graph_adaptor, graph_renderer, graph_name, graph_type)

Bases: object

Render an arbitrary graph as a graphviz tree.

Nodes must be hashable.

add_edge(source, dest)

Add an edge between two pydot nodes and set the colors

counter = 0
create_node(node)

Create a graphviz node from the miniast node

dfs(node)

Visit children and add edges to their Graphviz nodes.

numba.viz.graphviz.render(G, output_file, adaptor, renderer, graph_name='G', graph_type='digraph')

G: The graph: [node] output_file: output dot file name adaptor: GraphAdaptor renderer: GraphRenderer

numba.viz.graphviz.write_image(dot_output)

ssaviz Module

Visualize an SSA graph (the def/use chains).

class numba.viz.ssaviz.SSAGraphAdaptor

Bases: object

children(node)
class numba.viz.ssaviz.SSAGraphRenderer

Bases: object

render(node)
render_edge(source, dest)
numba.viz.ssaviz.render_ssa(cfflow, symtab, output_file)

Render the SSA graph given the flow.CFGFlow and the symbol table

numba.viz.ssaviz.render_ssa_from_source(source, output_file, func_globals=())

Render the SSA graph given python source code