MCPcopy Create free account
hub / github.com/DEAP/deap / __deepcopy__

Method __deepcopy__

deap/creator.py:53–60  ·  view source on GitHub ↗

Overrides the deepcopy from numpy.ndarray that does not copy the object's attributes. This one will deepcopy the array and its :attr:`__dict__` attribute.

(self, memo)

Source from the content-addressed store, hash-verified

51else:
52 class _numpy_array(numpy.ndarray):
53 def __deepcopy__(self, memo):
54 """Overrides the deepcopy from numpy.ndarray that does not copy
55 the object's attributes. This one will deepcopy the array and its
56 :attr:`__dict__` attribute.
57 """
58 copy_ = numpy.ndarray.copy(self)
59 copy_.__dict__.update(copy.deepcopy(self.__dict__, memo))
60 return copy_
61
62 @staticmethod
63 def __new__(cls, iterable):

Callers

nothing calls this directly

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected