Efficient copying of classes containing numpy arrays.
Interface that provides a single method for copying classes very efficiently.
Generate an efficient copy of this object.
Note that Numpy arrays and other
selfwill be deeply copied. Dictionaries and sets will be shallow copied, and everything else will be assigned (no copy will be made).
Classes that store state other than numpy arrays and immutable types should overwrite this method to ensure all state is copied.
type(self)– A copy of this object