def _read_rec_with_var(<EOL>self, colnums, rows, dtype, offsets, isvar, vstorage):
colnumsp = colnums+<NUM_LIT:1><EOL>if rows is None:<EOL><INDENT>nrows = self._info['<STR_LIT>']<EOL><DEDENT>else:<EOL><INDENT>nrows = rows.size<EOL><DEDENT>array = numpy.zeros(nrows, dtype=dtype)<EOL>wnotvar, = numpy.where(isvar == False)  <EOL>if wnotvar.size > <NUM_LIT:0>:<EOL><INDENT>thesecol = colnumsp[wnotvar]<EOL>theseoff = offsets[wnotvar]<EOL>self._FITS.read_columns_as_rec_byoffset(self._ext+<NUM_LIT:1>,<EOL>thesecol,<EOL>theseoff,<EOL>array,<EOL>rows)<EOL>for i in xrange(thesecol.size):<EOL><INDENT>name = array.dtype.names[wnotvar[i]]<EOL>colnum = thesecol[i]-<NUM_LIT:1><EOL>self._rescale_and_convert_field_inplace(<EOL>array,<EOL>name,<EOL>self._info['<STR_LIT>'][colnum]['<STR_LIT>'],<EOL>self._info['<STR_LIT>'][colnum]['<STR_LIT>'])<EOL><DEDENT><DEDENT>array = self._maybe_decode_fits_ascii_strings_to_unicode_py3(array)<EOL>wvar, = numpy.where(isvar == True)  <EOL>if wvar.size > <NUM_LIT:0>:<EOL><INDENT>thesecol = colnumsp[wvar]<EOL>for i in xrange(thesecol.size):<EOL><INDENT>colnump = thesecol[i]<EOL>name = array.dtype.names[wvar[i]]<EOL>dlist = self._FITS.read_var_column_as_list(<EOL>self._ext+<NUM_LIT:1>, colnump, rows)<EOL>if (isinstance(dlist[<NUM_LIT:0>], str) or<EOL>(IS_PY3 and isinstance(dlist[<NUM_LIT:0>], bytes))):<EOL><INDENT>is_string = True<EOL><DEDENT>else:<EOL><INDENT>is_string = False<EOL><DEDENT>if array[name].dtype.descr[<NUM_LIT:0>][<NUM_LIT:1>][<NUM_LIT:1>] == '<STR_LIT:O>':<EOL><INDENT>for irow, item in enumerate(dlist):<EOL><INDENT>if IS_PY3 and isinstance(item, bytes):<EOL><INDENT>item = item.decode('<STR_LIT:ascii>')<EOL><DEDENT>array[name][irow] = item<EOL><DEDENT><DEDENT>else:<EOL><INDENT>for irow, item in enumerate(dlist):<EOL><INDENT>if IS_PY3 and isinstance(item, bytes):<EOL><INDENT>item = item.decode('<STR_LIT:ascii>')<EOL><DEDENT>if is_string:<EOL><INDENT>array[name][irow] = item<EOL><DEDENT>else:<EOL><INDENT>ncopy = len(item)<EOL>if IS_PY3:<EOL><INDENT>ts = array[name].dtype.descr[<NUM_LIT:0>][<NUM_LIT:1>][<NUM_LIT:1>]<EOL>if ts != '<STR_LIT:S>' and ts != '<STR_LIT>':<EOL><INDENT>array[name][irow][<NUM_LIT:0>:ncopy] = item[:]<EOL><DEDENT>else:<EOL><INDENT>array[name][irow] = item<EOL><DEDENT><DEDENT>else:<EOL><INDENT>array[name][irow][<NUM_LIT:0>:ncopy] = item[:]<EOL><DEDENT><DEDENT><DEDENT><DEDENT><DEDENT><DEDENT>return array<EOL>
Read columns from a table into a rec array, including variable length
columns.  This is special because, for efficiency, it involves reading
from the main table as normal but skipping the columns in the array
that are variable.  Then reading the variable length columns, with
accounting for strides appropriately.

row and column numbers should be checked before calling this function