diff --git a/manim/mobject/types/vectorized_mobject.py b/manim/mobject/types/vectorized_mobject.py index f4d2c8b9dd..dd4de4f022 100644 --- a/manim/mobject/types/vectorized_mobject.py +++ b/manim/mobject/types/vectorized_mobject.py @@ -1769,7 +1769,9 @@ def align_points(self, vmobject: VMobject) -> Self: def get_nth_subpath(path_list, n): if n >= len(path_list): # Create a null path at the very end - return [path_list[-1][-1]] * nppcc + if len(path_list) == 0: + return np.tile(np.zeros(3), (nppcc, 1)) + return np.tile(path_list[-1][-1], (nppcc, 1)) path = path_list[n] # Check for useless points at the end of the path and remove them # https://github.com/ManimCommunity/manim/issues/1959