mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Don't call np.resize when length shouldn't change
This commit is contained in:
parent
c408adeefa
commit
d6a00bc32d
1 changed files with 2 additions and 0 deletions
|
@ -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:]))
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue