Don't call np.resize when length shouldn't change

This commit is contained in:
Grant Sanderson 2021-01-11 16:36:42 -10:00
parent c408adeefa
commit d6a00bc32d

View file

@ -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:]))