Copy.deepcopy() vs clone()

I never understood this. Why would one ever want to have clone be in the computation graph? It’s just the identity!

When I make a copy of something I usually expect a brand new object, with new memory allocation and new instance of the object class it belongs. Not just copying pointers/references around. Can you clarify?

1 Like