Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 3
0
 def __setstate__(self, state):
     np.ndarray.__setstate__(self, state[0])
     Pickleable.__setstate__(self, state[1])
Ejemplo n.º 4
0
 def __reduce__(self):
     func, args, state = super(ObsAr, self).__reduce__()
     return func, args, (state, Pickleable.__getstate__(self))
Ejemplo n.º 5
0
 def __setstate__(self, state):
     np.ndarray.__setstate__(self, state[0])
     Pickleable.__setstate__(self, state[1])
Ejemplo n.º 6
0
 def __reduce__(self):
     func, args, state = super(ObsAr, self).__reduce__()
     return func, args, (state, Pickleable.__getstate__(self))