From d6a00bc32dfc31e3b7cab066fd1fcf640e6087d1 Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Mon, 11 Jan 2021 16:36:42 -1000 Subject: [PATCH] Don't call np.resize when length shouldn't change --- manimlib/utils/iterables.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/manimlib/utils/iterables.py b/manimlib/utils/iterables.py index 155fa7f2..2e7c776f 100644 --- a/manimlib/utils/iterables.py +++ b/manimlib/utils/iterables.py @@ -81,6 +81,8 @@ def listify(obj): def resize_array(nparray, length): + if len(nparray) == length: + return nparray return np.resize(nparray, (length, *nparray.shape[1:]))