From 6ca5daf7c12b88415b8687d14f154a2a9258050a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Manr=C3=ADquez?= Date: Fri, 6 Dec 2024 20:15:34 -0300 Subject: [PATCH] Use named function for ParametricFunction.function --- manim/mobject/graphing/functions.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/manim/mobject/graphing/functions.py b/manim/mobject/graphing/functions.py index b74129d067..83c48b1092 100644 --- a/manim/mobject/graphing/functions.py +++ b/manim/mobject/graphing/functions.py @@ -113,7 +113,11 @@ def __init__( use_vectorized: bool = False, **kwargs, ): - self.function: Callable[[float], Point3D] = lambda t: np.asarray(function(t)) + def internal_parametric_function(t: float) -> Point3D: + """Wrap ``function``'s output inside a NumPy array.""" + return np.asarray(function(t)) + + self.function = internal_parametric_function if len(t_range) == 2: t_range = (*t_range, 0.01)