def _npy2fits(d, table_type='<STR_LIT>', write_bitcols=False):
npy_dtype = d[<NUM_LIT:1>][<NUM_LIT:1>:]<EOL>if npy_dtype[<NUM_LIT:0>] == '<STR_LIT:S>' or npy_dtype[<NUM_LIT:0>] == '<STR_LIT>':<EOL><INDENT>name, form, dim = _npy_string2fits(d, table_type=table_type)<EOL><DEDENT>else:<EOL><INDENT>name, form, dim = _npy_num2fits(<EOL>d, table_type=table_type, write_bitcols=write_bitcols)<EOL><DEDENT>return name, form, dim<EOL>
d is the full element from the descr