def __reduce__(self):
        super_class = np.ndarray
        reconst_func, reconst_func_args, state = super_class.__reduce__(self)

        # Define FITS_rec-specific attrs that get added to state
        column_state = []
        meta = []

        if '_coldefs' in self.__dict__:
            meta.append('_coldefs')
            column_state.append(self._coldefs.__deepcopy__(None))

        for attr in set(dir(self))-set(dir(self.__class__)):
            # _coldefs can be Delayed, and file objects cannot be
            # picked, it needs to be deepcopied first
            if attr == '_col_weakrefs':
                continue
            else:
                column_state.append(getattr(self, attr))
            meta.append(attr)

        state = state + (column_state, meta)

        return reconst_func, reconst_func_args, state
Return a 3-tuple for pickling a FITS_rec. Use the super-class
dataset/ETHPy150Open spacetelescope/PyFITS/pyfits/fitsrec.py/FITS_rec.__reduce__