def descr2tabledef(descr, table_type='<STR_LIT>', write_bitcols=False):
names = []<EOL>formats = []<EOL>dims = []<EOL>for d in descr:<EOL><INDENT>"""<STR_LIT>"""<EOL>if d[<NUM_LIT:1>][<NUM_LIT:1>] == '<STR_LIT:O>':<EOL><INDENT>raise ValueError(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>name, form, dim = _npy2fits(<EOL>d, table_type=table_type, write_bitcols=write_bitcols)<EOL>if name == '<STR_LIT>':<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>"""<STR_LIT>"""<EOL>names.append(name)<EOL>formats.append(form)<EOL>dims.append(dim)<EOL><DEDENT>return names, formats, dims<EOL>
Create a FITS table def from the input numpy descriptor.

parameters
----------
descr: list
    A numpy recarray type descriptor  array.dtype.descr

returns
-------
names, formats, dims: tuple of lists
    These are the ttyp, tform and tdim header entries
    for each field.  dim entries may be None