Hi, Are you sure that you need a copy operation? If I understand correctly what you are doing, you just need access to the x from the previous iteration.
Could you not just swap x and x_next and avoid the copy : X, x_next = x_next, x (so you create them once only).
