def __new__(subtype, array=None, records=None, columns=None, SVfile=None,<EOL>binary=None, shape=None,<EOL>dtype=None, formats=None, names=None, titles=None,<EOL>aligned=False, byteorder=None, buf=None, offset=<NUM_LIT:0>,<EOL>strides=None, comments=None, delimiter=None,<EOL>lineterminator='<STR_LIT:\n>', escapechar=None, quoting=None,<EOL>quotechar=None, doublequote=True, skipinitialspace=False,<EOL>skiprows=<NUM_LIT:0>, uselines=None, usecols=None, excludecols=None,<EOL>toload=None, metametadata=None, kvpairs=None,<EOL>namesinheader=True, headerlines=None, valuefixer=None,<EOL>linefixer=None, colfixer=None, delimiter_regex=None, coloring=None, inflines=<NUM_LIT>, wrap=None,<EOL>typer=None, missingvalues=None, fillingvalues=None, renamer=None, verbosity=DEFAULT_VERBOSITY):
metadata = {}<EOL>if not array is None:<EOL><INDENT>if len(array) > <NUM_LIT:0>:<EOL><INDENT>DataObj = utils.fromrecords(array, type=np.ndarray, dtype=dtype,<EOL>shape=shape, formats=formats, names=names,<EOL>titles=titles, aligned=aligned, byteorder=byteorder)<EOL><DEDENT>else:<EOL><INDENT>DataObj = utils.fromarrays([[]]*len(array.dtype), type=np.ndarray,<EOL>dtype=dtype, shape=shape, formats=formats,<EOL>names=names, titles=titles, aligned=aligned,<EOL>byteorder=byteorder)<EOL><DEDENT><DEDENT>elif not records is None:<EOL><INDENT>DataObj = utils.fromrecords(records, type=np.ndarray, dtype=dtype, shape=shape,<EOL>formats=formats, names=names, titles=titles,<EOL>aligned=aligned, byteorder=byteorder)<EOL><DEDENT>elif not columns is None:<EOL><INDENT>DataObj = utils.fromarrays(columns, type=np.ndarray, dtype=dtype,<EOL>shape=shape, formats=formats, names=names, titles=titles,<EOL>aligned=aligned, byteorder=byteorder)<EOL><DEDENT>elif not kvpairs is None:<EOL><INDENT>DataObj = utils.fromkeypairs(<EOL>kvpairs, dtype=dtype, fillingvalues=fillingvalues)<EOL><DEDENT>elif not SVfile is None:<EOL><INDENT>chkExists(SVfile)<EOL>[DataObj, metadata] =io.loadSV(fname=SVfile, names=names, dtype=dtype, shape=shape,<EOL>formats=formats, titles=titles, aligned=aligned,<EOL>byteorder=byteorder, buf=buf, strides=strides,<EOL>comments=comments, delimiter=delimiter,<EOL>lineterminator=lineterminator, escapechar=escapechar,<EOL>quoting=quoting, quotechar=quotechar, doublequote=doublequote,<EOL>skipinitialspace=skipinitialspace, skiprows=skiprows,<EOL>uselines=uselines, usecols=usecols, excludecols=excludecols,<EOL>metametadata=metametadata, namesinheader=namesinheader,<EOL>headerlines=headerlines, valuefixer=valuefixer, colfixer=colfixer, linefixer=linefixer, missingvalues=missingvalues, fillingvalues=fillingvalues, typer=typer, delimiter_regex=delimiter_regex, inflines=inflines, renamer=renamer, verbosity=verbosity)<EOL>if (names is None) and '<STR_LIT>' in metadata.keys() and metadata['<STR_LIT>']:<EOL><INDENT>names = metadata['<STR_LIT>']<EOL><DEDENT>if (coloring is None) and '<STR_LIT>' in metadata.keys() and metadata['<STR_LIT>']:<EOL><INDENT>coloring = metadata['<STR_LIT>']<EOL><DEDENT><DEDENT>elif not binary is None:<EOL><INDENT>chkExists(binary)<EOL>[DataObj, givendtype, givencoloring] = io.loadbinary(fname=binary)<EOL>if (dtype is None) and (not givendtype is None):<EOL><INDENT>dtype = givendtype<EOL><DEDENT>if (coloring is None) and (not givencoloring is None):<EOL><INDENT>coloring = givencoloring<EOL><DEDENT>DataObj = utils.fromrecords(DataObj, type=np.ndarray, dtype=dtype, shape=shape,<EOL>formats=formats, names=names, titles=titles,<EOL>aligned=aligned, byteorder=byteorder)<EOL><DEDENT>else:<EOL><INDENT>DataObj = np.core.records.recarray.__new__(<EOL>subtype, shape, dtype=dtype,<EOL>formats=formats, names=names, titles=titles,<EOL>aligned=aligned, byteorder=byteorder, buf=buf,<EOL>offset=offset, strides=strides)<EOL><DEDENT>DataObj = DataObj.view(subtype)<EOL>DataObj.metadata = metadata<EOL>if not coloring is None:<EOL><INDENT>coloringsInNames =list(set(coloring.keys()).intersection(set(DataObj.dtype.names)))<EOL>if len(coloringsInNames) == <NUM_LIT:0>:<EOL><INDENT>DataObj.coloring = coloring<EOL><DEDENT>else:<EOL><INDENT>print("<STR_LIT>",<EOL>coloringsInNames, "<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>")<EOL>for c in coloringsInNames:<EOL><INDENT>coloring.pop(c)<EOL><DEDENT>DataObj.coloring = coloring<EOL><DEDENT><DEDENT>else:<EOL><INDENT>DataObj.coloring = {}<EOL><DEDENT>if not wrap is None:<EOL><INDENT>DataObj.coloring[wrap] = DataObj.dtype.names<EOL><DEDENT>return DataObj<EOL>
Unified constructor for tabarrays.

   **Specifying the data:**

           Data can be passed to the constructor, or loaded from several 
           different file formats. 

           **array** :  two-dimensional arrays (:class:`numpy.ndarray`)


                   >>> import numpy
                   >>> x = numpy.array([[1, 2], [3, 4]])
                   >>> tabarray(array=x)
                   tabarray([(1, 2), (3, 4)], 
                         dtype=[('f0', '<i4'), ('f1', '<i4')])

                   **See also:**  `numpy.rec.fromrecords <http://docs.scipy.org/doc/numpy/reference/generated/numpy.core.records.fromrecords.html#numpy.core.records.fromrecords>`_

           **records** :  python list of records (elemets can be tuples or lists)

                   >>> tabarray(records=[('bork', 1, 3.5), ('stork', 2, -4.0)], names=['x','y','z'])
                   tabarray([('bork', 1, 3.5), ('stork', 2, -4.0)], 
                         dtype=[('x', '|S5'), ('y', '<i4'), ('z', '<f8')])

                   **See also:**  `numpy.rec.fromrecords <http://docs.scipy.org/doc/numpy/reference/generated/numpy.core.records.fromrecords.html#numpy.core.records.fromrecords>`_


           **columns** :  list of python lists or 1-D numpy arrays 

                   Fastest when passed a list of numpy arrays, rather than
                   a list of lists.

                   >>> tabarray(columns=[['bork', 'stork'], [1, 2], [3.5, -4.0]], names=['x','y','z']) 
                   tabarray([('bork', 1, 3.5), ('stork', 2, -4.0)], 
                         dtype=[('x', '|S5'), ('y', '<i4'), ('z', '<f8')])


           **kvpairs** : list of list of key-value pairs

                   For loading key-value pairs (e.g. as from an XML file).    Missing values can be specified using the **fillingvalues** argument.  

           **See also:**  `numpy.rec.fromarrays <http://docs.scipy.org/doc/numpy/reference/generated/numpy.core.records.fromrecords.html#numpy.core.records.fromarrays>`_


           **SVfile** :  string

                   File path to a separated variable (CSV) text file.  
                   Load data from a CSV by calling::

                           tabular.io.loadSV(SVfile, comments, delimiter, 
                           lineterminator, skiprows, usecols, metametadata, 
                           namesinheader, valuefixer, linefixer)

                   **See also:**  :func:`saveSV`, 
                   :func:`tabular.io.loadSV`


           **binary** :  string

                   File path to a binary file. Load a ``.npz`` binary file 
                   created by the :func:`savebinary` by calling::

                           tabular.io.loadbinary(binary)

                   which uses :func:`numpy.load`.

                   **See also:** :func:`savebinary`, 
                   :func:`tabular.io.loadbinary`

   **Additional parameters:**

           **names** : list of strings

                   Sets the names of the columns of the resulting tabarray.   If not specified, `names` value is determined first by looking for metadata in the header of the file, and if that is not found, are assigned by NumPy's `f0, f1, ... fn` convention.     See **namesinheader** parameter below.

           **formats** :  string or list of strings

               Sets the datatypes of the columns.  The value of `formats` can be a list or comma-delimited string of values describing values for each column (e.g. "str,str,int,float" or ["str", "str", "int", "float"]), a single value to apply to all columns, or anything that can be used in numpy.rec.array constructor.   

               If the **formats** (or **dtype**) parameter are not  specified, typing is done by inference.   (See also **typer** parameter below).  


           **dtype** : numpy dtype object

               Sets the numpy dtype of the resulting tabarray, combining 
               column format and column name information.  If dtype is set, any **names** and **formats** specifications will be overriden.   If the **dtype** (or **formats**) parameter are not  specified, typing is done by inference.   (See also **typer** parameter below).   

           The **names**, **formats** and **dtype** parameters duplicate parameters of the NumPy record array creation inferface.   Additional paramters of the NumPy inferface that are passed through are **shape**, **titles**, **byteorder** and **aligned** (see NumPy documentation for more information.)


           **delimiter** : single-character string

               When reading text file, character to use as delimiter to split fields.  If not specified, the delimiter is determined first by looking for special-format metadata specifying the delimiter, and then if no specification is found, attempts are made to infer delimiter from file contents.   (See **inflines** parameter below.)  

           **delimiter_regex** :  regular expression (compiled or in string format)                    

               Regular expression to use to recognize delimiters, in place of a single character.   (For instance, to have whitespace delimiting, using delimiter_regex = '[\s*]+' )

           **lineterminator** : single-character string

               Line terminator to use when reading in using SVfile

           **skipinitialspace** : boolean
               If true, strips whitespace following the delimiter from field.   

          The **delimiter**, **linterminator** and **skipinitialspace** 
          parameters are passed on as parameters to the python CSV module, 
          which is used for reading in delimited text files.   Additional 
          parameters from that interface that are replicated in this constructor include **quotechar**, **escapechar**, **quoting**, **doublequote** and **dialect** (see CSV module documentation for more information.)

           **skiprows** :  non-negative integer, optional

               When reading from a text file, the first `skiprows` lines are ignored.  Default is 0, e.g no rows are skipped. 

           **uselines** : pair of non-negative integer, optional

               When reading from a text file, range of lines of data to load.  (In constrast to **skiprows**, which specifies file rows to ignore before looking for header information, **uselines** specifies which data (non-header) lines to use, after header has been striped and processed.)   See **headerlines** below.

           **usecols** :  sequence of non-negative integers or strings, optional

               When reading from a text file, only the columns in *usecols* are loaded and processed.   Columns can be described by number, with 0 being the first column; or if name metadata is present, then by name ; or, if color group information is present in the file, then by color group name.   (Default is None, e.g. all columns are loaded.)

           **excludecols** :  sequence of non-negative integers or strings, optional

               Converse of **usecols**, e.g. all columns EXCEPT those listed will be loaded. 

           **comments** : single-character string, optional

               When reading from a text file, character used to distinguish header lines.  If specified, any lines beginning with this character at the top of the file are assumed to contain header information and not row data. 

           **headerlines** : integer, optional

               When reading from a text file, the number of lines at the top of the file (after the first  `skiprows` lines) corresponding to the header of the file, where metadata can be found.   Lines after headerlines are assumed to contain row contents.   If not specified, value is determined first by looking for special metametadata  in first line of file (see Tabular reference documentation for more information about this), and if no such metadata is found, is inferred by looking at file contents.    

           **namesinheader** : Boolean, optional

               When reading from a text file, if `namesinheader == True`, then assume the column names are in the last header line (unless overridden by existing metadata or metametadata directive).    Default is True.                        

           **linefixer** : callable, optional

              When reading from a text file, this callable is applied to every line in the file.  This option is passed on all the way to the call to `io.loadSVrecord` function, and is applied directly to the strings in the file, after they're split in lines but before they're split into fields or any typing is done.   The purpose is to make lines with errors or mistakes amenable to delimiter inference and field-splitting. 

           **valuefixer**  :  callable, or list or dictionary of callables, optional

              When reading from a text file, these callable(s) are applied to every value in each field.   The application is done after line strings are loaded and split into fields, but before any typing or missing-value imputation is done.  The purpose of the **valuefixer** is to prepare column values for typing and imputation.   The valuefixer callable can return a string or a python object.   If `valuefixer` is a single callable, then that same callable is applied to values in all column; if it is a dictionary, then the keys can be either numbers or names and the value for the key will be applied to values in the corresponding column with that name or number; if it is a list, then the list elements must be in 1-1 correponsdence with the loaded columns, and are applied to each respectively.

           **colfixer** : callable, or list or dictionary of callables, optional

               Same as **valuefixer**,  but instead of being applied to individual values, are applied to whole columns (and must return columns or numpy arrays of identical length).    Like valuefixer, colfixer callable(s) are applied before typing and missing-value imputation.  

           **missingvalues** : string, callable returning string, or list or dictionary of strings or string-valued callable

               When reading from text file, string value to consider as "missing data" and to be replaced before typing is done.   If specified as a callable, the callable will be applied to the column(s) to determine missing value.   If specified as a dictionary, keys are expected to be numbers of names of columns, and values are individual missing values for those columns (like **valuefixer** inferface).   


           **fillingvalues** : string, pair of strings, callable returning string, or list or dictionary of strings or string-valued callable

               When reading from text file, values to be used to replace missing data before typing is done.   If specified as a  single non-callable, non-tuple value, this value is used to replace all missing data.  If specified as a callable, the callable is applied to the column and returns the fill value (e.g. to allow the value to depend on the column type).    If specified as a pair of values, the first value acts as the missing value and the second as the value to replace with.   If a dictionary or list of values, then values are applied to corresponding columns.  

           NOTE:  all the **missingvalues** and **fillingvalues** functionalities can be replicated (and generalized) using the **valuefixer** or **colfixer** parameters, by specifying function(s) which identify and replace missing values.   While more limited, using **missingvalues** and **fillingvalues**  interface is easier and gives better performance.   

           **typer**  :   callable taking python list of strings (or other values) and returning 1-dnumpy array ; or list dictionary of such callables  

              Function used to infer type and convert string lists into typed numpy arrays, if no format information has been provided.   When applied at all, this function is applied after string have been loaded and split into fields.   This function is expected to impute missing values as well, and will override any setting of **missingvalues** or **fillingvalues**.    If a callable is passed,  it is used as typer for all columns, while if a dictionary (or list) of callables is passed, they're used on corresponding columns.    If needed (e.g. because formatting information hasn't been supplied) but **typer** isn't specified (at least, for a given column), the constructor defaults to using the `utils.DEFAULT_TYPEINFERER` function.      


           **inflines** :  integer, optional

               Number of lines of file to use as sample data when inferring delimiter and header.   

           **metametadata** :  dictionary of integers or pairs of integers

               Specifies supplementary metametadata information for use 
               with SVfile loading.  See Tabular reference documentation for more information

           **coloring**:  dictionary

                   Hierarchical column-oriented structure.  

              *	Colorings can be passed as argument:

                   *	In the *coloring* argument, pass a dictionary. Each 
                           key is a string naming a color whose corresponding
                           value is a list of column names (strings) in that 
                           color.

                   *	If colorings are passed as argument, they override
                           any colorings inferred from the input data.

              *	Colorings can be inferred from the input data:

                   *	If constructing from a CSV file (e.g. ``.tsv``, 
                           ``.csv``) created by :func:`saveSV`, colorings are 
                           automatically parsed from the header when present.

                   *	If constructing from a numpy binary file (e.g. 
                           ``.npz``) created by :func:`savebinary`, colorings 
                           are automatically loaded from a binary file 
                           (``coloring.npy``) in the ``.npz`` directory.

           **wrap**:  string

                   Adds a color with name  *wrap* listing all column 
                   names. 

           **verbosity** :  integer, optional

              Sets how much detail from messages will be printed.

**Special column names:**

                   Column names that begin and end with double
                   underscores, e.g. '__column_name__' are used
                   to hold row-by-row metadata and specify  arbitrary higher-level groups of rows, in analogy to how the `coloring` attribute specifies groupings of columns.

                   One use of this is for formatting
                   and communicating "side" information to other
                   :class:`tabarray` methods.  For instance:

                   *	A '__color__' column is interpreted by the 
                       tabular.web.tabular2html function to specify row color in making html representations of tabarrays.   It is expected in each row to contain a web-safe hex triplet color specification, e.g. a string of the form '#XXXXXX' (see  http://en.wikipedia.org/wiki/Web_colors).

                   *	The '__aggregates__' column is used to disambiguate
                           rows that are aggregates of data in other sets of
                           rows for the ``.aggregate_in`` method (see comments 
                           on that method).