def __deepcopy__(self, memo): s = self.__new__(self.__class__, input_array=self.view(np.ndarray).copy()) memo[id(self)] = s import copy Pickleable.__setstate__(s, copy.deepcopy(self.__getstate__(), memo)) return s
def __deepcopy__(self, memo): s = self.__new__(self.__class__, name=self.name, input_array=self.view(numpy.ndarray).copy()) memo[id(self)] = s import copy Pickleable.__setstate__(s, copy.deepcopy(self.__getstate__(), memo)) return s
def __setstate__(self, state): np.ndarray.__setstate__(self, state[0]) Pickleable.__setstate__(self, state[1])