Throughout the code, the inefficient deepcopy is used. The goal is to ensure the new variable stays the same even when the old variable is changed.
In some cases, this is unnecessary (when used for single value assignments, when the original array is a local variable and cannot be altered). In other cases, it's simply inefficient, as numpy's internal np.copy can be 10-100x faster. I think about 95% of deepcopy's can be replaced or removed.
Throughout the code, the inefficient deepcopy is used. The goal is to ensure the new variable stays the same even when the old variable is changed.
In some cases, this is unnecessary (when used for single value assignments, when the original array is a local variable and cannot be altered). In other cases, it's simply inefficient, as numpy's internal np.copy can be 10-100x faster. I think about 95% of deepcopy's can be replaced or removed.