Example #1
0
    def __reduce__(self):
        """Necessary for making this object picklable"""
        object_state = list(ndarray.__reduce__(self))

        subclass_state = (self.index, self.fill_value, self.sp_index, self.name)
        object_state[2] = (object_state[2], subclass_state)
        return tuple(object_state)
Example #2
0
File: frame.py Project: zhouy5/pims
 def __reduce__(self):
     """Necessary for making this object picklable"""
     object_state = list(ndarray.__reduce__(self))
     saved_attr = ['frame_no', 'metadata']
     subclass_state = {a: getattr(self, a) for a in saved_attr}
     object_state[2] = (object_state[2], subclass_state)
     return tuple(object_state)
Example #3
0
    def __reduce__(self):
        """Necessary for making this object picklable"""
        object_state = list(ndarray.__reduce__(self))

        subclass_state = (self.index, self.fill_value, self.sp_index,
                          self.name)
        object_state[2] = (object_state[2], subclass_state)
        return tuple(object_state)
    def __reduce__(self):
        """Necessary for making this object picklable"""
        print("__reduce__")

        object_state = list(ndarray.__reduce__(self))
        saved_attr = chain(_axis_attrs, _array_attrs)
        subclass_state = {a: getattr(self, a) for a in saved_attr}
        object_state[2] = (object_state[2], subclass_state)
        return tuple(object_state)