'Get the table data from an input HDU object.'

def _get_tbdata(self):

    columns = self.columns
    if (any(((type(r) in (_FormatP, _FormatQ)) for r in columns._recformats)) and (self._data_size is not None) and (self._data_size > self._theap)):
        raw_data = self._get_raw_data(self._data_size, np.uint8, self._data_offset)
        data = raw_data[:self._theap].view(dtype=columns.dtype, type=np.rec.recarray)
    else:
        raw_data = self._get_raw_data(self._nrows, columns.dtype, self._data_offset)
        if (raw_data is None):
            raw_data = np.array([], dtype=columns.dtype)
        data = raw_data.view(np.rec.recarray)
    self._init_tbdata(data)
    data = data.view(self._data_type)
    columns._add_listener(data)
    return data
