Copyable¶
-
class
menpo.base.
Copyable
[source]¶ Bases:
object
Efficient copying of classes containing numpy arrays.
Interface that provides a single method for copying classes very efficiently.
-
copy
()[source]¶ Generate an efficient copy of this object.
Note that Numpy arrays and other
Copyable
objects onself
will 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.
- Returns
type(self)
– A copy of this object
-