Closed
Description
Description of bug / unexpected behavior
In graph.py::_tree_layout
root_vertex is used before the corresponding check for None meaning the intended error message is never printed.
Expected behavior
When a Graph with layout="tree" is used without specifying a root node, the appropriate ValueError should be thrown.
How to reproduce the issue
Create a Graph object with the "tree" layout and do not specify a root node.
Code for reproducing the problem
from manim import *
class ChangeGraphLayout(Scene):
def construct(self):
G = Graph([1, 2, 3, 4, 5], [(1, 2), (1, 3), (2, 4), (2, 5)], layout="tree")
self.wait()
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
🆕 New