'Construct a FITS record array from a recarray.'

def __new__(subtype, input):

    if (input.dtype.subdtype is None):
        self = np.recarray.__new__(subtype, input.shape, input.dtype, buf=input.data)
    else:
        self = np.recarray.__new__(subtype, input.shape, input.dtype, buf=input.data, strides=input.strides)
    self._init()
    if self.dtype.fields:
        self._nfields = len(self.dtype.fields)
    return self
