def rowstack(seq, mode='<STR_LIT>', nullvals=None):
if nullvals == None:<EOL><INDENT>nullvals = utils.DEFAULT_NULLVALUEFORMAT<EOL><DEDENT>if len(seq) > <NUM_LIT:1>:<EOL><INDENT>assert mode in ['<STR_LIT>','<STR_LIT>','<STR_LIT>'],('<STR_LIT>')<EOL>if mode == '<STR_LIT>':<EOL><INDENT>if not all([set(l.dtype.names) == set(seq[<NUM_LIT:0>].dtype.names) <EOL>for l in seq]):<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>mode = '<STR_LIT>'<EOL><DEDENT><DEDENT>if mode == '<STR_LIT>':<EOL><INDENT>names =  utils.uniqify(utils.listunion([list(s.dtype.names) <EOL>for s in seq if s.dtype.names != None]))<EOL>formats = [max([s.dtype[att] for s in seq if s.dtype.names != None <EOL>and att in s.dtype.names]).str for att in names]         <EOL>dtype = np.dtype(list(zip(names,formats)))<EOL>return utils.fromarrays([utils.listunion([s[att].tolist() <EOL>if (s.dtype.names != None and att in s.dtype.names) <EOL>else [nullvals(format)] * len(s) for s in seq]) <EOL>for (att, format) in zip(names, formats)], type=np.ndarray,<EOL>dtype=dtype)<EOL><DEDENT>elif mode == '<STR_LIT>':<EOL><INDENT>names = [x for x in seq[<NUM_LIT:0>].dtype.names <EOL>if all([x in l.dtype.names for l in seq[<NUM_LIT:1>:]])]<EOL>formats = [max([a.dtype[att] for a in seq]).str for att in names]<EOL>return utils.fromrecords(utils.listunion(<EOL>[ar.tolist() for ar in seq]), type=np.ndarray,<EOL>names=names, formats=formats)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>return seq[<NUM_LIT:0>]<EOL><DEDENT>
Vertically stack a sequence of numpy ndarrays with structured dtype

Analog of numpy.vstack

Implemented by the tabarray method
:func:`tabular.tab.tabarray.rowstack` which uses 
:func:`tabular.tabarray.tab_rowstack`.

**Parameters**

        **seq** :  sequence of numpy recarrays

                List, tuple, etc. of numpy recarrays to stack vertically.

        **mode** :  string in ['nulls', 'commons', 'abort']

                Denotes how to proceed if the recarrays have different
                dtypes, e.g. different sets of named columns.

                *   if `mode` == ``nulls``, the resulting set of columns is
                    determined by the union of the dtypes of all recarrays
                    to be stacked, and missing data is filled with null 
                    values as defined by 
                    :func:`tabular.spreadsheet.nullvalue`; this is the 
                    default mode.

                *   elif `mode` == ``commons``, the resulting set of 
                    columns is determined by the intersection of the dtypes 
                    of all recarrays to be stacked, e.g. common columns.

                *   elif `mode` == ``abort``, raise an error when the
                    recarrays to stack have different dtypes.

**Returns**

        **out** :  numpy ndarray with structured dtype

                Result of vertically stacking the arrays in `seq`.

**See also:**  `numpy.vstack 
<http://docs.scipy.org/doc/numpy/reference/generated/numpy.vstack.html>`_.