diff --git a/manim/mobject/mobject.py b/manim/mobject/mobject.py index 0359f66045..16e12d31e7 100644 --- a/manim/mobject/mobject.py +++ b/manim/mobject/mobject.py @@ -1771,7 +1771,7 @@ def put_start_and_end_on(self, start: Point3D, end: Point3D) -> Self: curr_start, curr_end = self.get_start_and_end() curr_vect = curr_end - curr_start if np.all(curr_vect == 0): - self.points = start + self.points = np.array([start]) return self target_vect = np.array(end) - np.array(start) axis = ( diff --git a/tests/module/mobject/graphing/test_number_line.py b/tests/module/mobject/graphing/test_number_line.py index 1f0f7c343c..e43868c54f 100644 --- a/tests/module/mobject/graphing/test_number_line.py +++ b/tests/module/mobject/graphing/test_number_line.py @@ -126,7 +126,8 @@ def test_point_to_number(): def test_start_and_end_at_same_point(): - line = DashedLine(np.zeros(3), np.zeros(3)) - line.put_start_and_end_on(np.zeros(3), np.array([0, 0, 0])) + point = [1.0, 2.0, 3.0] + line = Line(point, point) + line.put_start_and_end_on(point, point) - np.testing.assert_array_equal(np.round(np.zeros(3), 4), np.round(line.points, 4)) + np.testing.assert_array_equal(np.round([point], 4), np.round(line.points, 4))