Exemple #1
0
 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
Exemple #2
0
 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
Exemple #3
0
 def __setstate__(self, state):
     np.ndarray.__setstate__(self, state[0])
     Pickleable.__setstate__(self, state[1])
Exemple #4
0
 def __setstate__(self, state):
     np.ndarray.__setstate__(self, state[0])
     Pickleable.__setstate__(self, state[1])