From f0a61beaf5e844f6478b2eade8fc8e95d3f1d81b Mon Sep 17 00:00:00 2001 From: german2020 Date: Mon, 28 Aug 2023 10:10:51 +0800 Subject: [PATCH] fix VShowPassingFlash index out of bounds issue --- manimlib/animation/indication.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manimlib/animation/indication.py b/manimlib/animation/indication.py index cd01c359..87988df1 100644 --- a/manimlib/animation/indication.py +++ b/manimlib/animation/indication.py @@ -244,7 +244,8 @@ class VShowPassingFlash(Animation): gaussian = np.exp(-0.5 * zs * zs) gaussian[abs(xs - mu) > 3 * sigma] = 0 - submobject.set_stroke(width=widths * gaussian) + if len(widths * gaussian) !=0: + submobject.set_stroke(width=widths * gaussian) def finish(self) -> None: