From 3820e098c05bbc02f9eb6a745b32d3329a10b6d1 Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Wed, 18 Jan 2023 16:25:32 -0800 Subject: [PATCH] Tweak to type hints --- manimlib/utils/bezier.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manimlib/utils/bezier.py b/manimlib/utils/bezier.py index df7a900e..3685cf15 100644 --- a/manimlib/utils/bezier.py +++ b/manimlib/utils/bezier.py @@ -22,14 +22,14 @@ CLOSED_THRESHOLD = 0.001 def bezier( - points: Sequence[Scalable] | VectNArray -) -> Callable[[float], Scalable]: + points: Sequence[float | FloatArray] | VectNArray +) -> Callable[[float], float | FloatArray]: if len(points) == 0: raise Exception("bezier cannot be calld on an empty list") n = len(points) - 1 - def result(t: float) -> Scalable: + def result(t: float) -> float | FloatArray: return sum( ((1 - t)**(n - k)) * (t**k) * choose(n, k) * point for k, point in enumerate(points)