def _npy_string2fits(d, table_type='<STR_LIT>'):
dim = None<EOL>name = d[<NUM_LIT:0>]<EOL>npy_dtype = d[<NUM_LIT:1>][<NUM_LIT:1>:]<EOL>if npy_dtype[<NUM_LIT:0>] != '<STR_LIT:S>' and npy_dtype[<NUM_LIT:0>] != '<STR_LIT>':<EOL><INDENT>raise ValueError("<STR_LIT>" % npy_dtype[<NUM_LIT:0>])<EOL><DEDENT>string_size_str = npy_dtype[<NUM_LIT:1>:]<EOL>string_size = int(string_size_str)<EOL>if string_size <= <NUM_LIT:0>:<EOL><INDENT>raise ValueError('<STR_LIT>'<EOL>'<STR_LIT>' % (npy_dtype, name))<EOL><DEDENT>if len(d) == <NUM_LIT:2>:<EOL><INDENT>if table_type == '<STR_LIT:ascii>':<EOL><INDENT>form = '<STR_LIT:A>'+string_size_str<EOL><DEDENT>else:<EOL><INDENT>form = string_size_str+'<STR_LIT:A>'<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if table_type == '<STR_LIT:ascii>':<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>" % str(d))<EOL><DEDENT>if isinstance(d[<NUM_LIT:2>], tuple):<EOL><INDENT>count = reduce(lambda x, y: x*y, d[<NUM_LIT:2>])<EOL>count = string_size*count<EOL>form = '<STR_LIT>' % count<EOL>dim = list(reversed(d[<NUM_LIT:2>]))<EOL>dim = [string_size_str] + [str(e) for e in dim]<EOL>dim = '<STR_LIT:(>' + '<STR_LIT:U+002C>'.join(dim)+'<STR_LIT:)>'<EOL><DEDENT>else:<EOL><INDENT>count = string_size*d[<NUM_LIT:2>]<EOL>form = '<STR_LIT>' % count<EOL>dim = [string_size_str, str(d[<NUM_LIT:2>])]<EOL>dim = '<STR_LIT:(>' + '<STR_LIT:U+002C>'.join(dim)+'<STR_LIT:)>'<EOL><DEDENT><DEDENT>return name, form, dim<EOL>
d is the full element from the descr

form for strings is the total number of bytes followed by A.  Thus
for vector or array columns it is the size of the string times the
total number of elements in the array.

Then the dim is set to
    (sizeofeachstring, dim1, dim2, ...)
So it is treated like an extra dimension