def fromrecords(recList, dtype=None, shape=None, formats=None, names=None,<EOL>titles=None, aligned=False, byteorder=None):
nfields = len(recList[<NUM_LIT:0>])<EOL>if formats is None and dtype is None:  <EOL><INDENT>obj = sb.array(recList, dtype=object)<EOL>arrlist = [sb.array(obj[..., i].tolist()) for i in range(nfields)]<EOL>return fromarrays(arrlist, formats=formats, shape=shape, names=names,<EOL>titles=titles, aligned=aligned, byteorder=byteorder)<EOL><DEDENT>if dtype is not None:<EOL><INDENT>descr = sb.dtype((record, dtype))<EOL><DEDENT>else:<EOL><INDENT>descr = format_parser(formats, names, titles, aligned, byteorder)._descr<EOL><DEDENT>try:<EOL><INDENT>retval = sb.array(recList, dtype=descr)<EOL><DEDENT>except TypeError:  <EOL><INDENT>if (shape is None or shape == <NUM_LIT:0>):<EOL><INDENT>shape = len(recList)<EOL><DEDENT>if isinstance(shape, (int, long)):<EOL><INDENT>shape = (shape,)<EOL><DEDENT>if len(shape) > <NUM_LIT:1>:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>_array = recarray(shape, descr)<EOL>for k in range(_array.size):<EOL><INDENT>_array[k] = tuple(recList[k])<EOL><DEDENT>return _array<EOL><DEDENT>else:<EOL><INDENT>if shape is not None and retval.shape != shape:<EOL><INDENT>retval.shape = shape<EOL><DEDENT><DEDENT>res = retval.view(recarray)<EOL>return res<EOL>
create a recarray from a list of records in text form

        The data in the same field can be heterogeneous, they will be promoted
        to the highest data type.  This method is intended for creating
        smaller record arrays.  If used to create large array without formats
        defined

        r=fromrecords([(2,3.,'abc')]*100000)

        it can be slow.

        If formats is None, then this will auto-detect formats. Use list of
        tuples rather than list of lists for faster processing.

    >>> r=np.core.records.fromrecords([(456,'dbe',1.2),(2,'de',1.3)],
    ... names='col1,col2,col3')
    >>> print r[0]
    (456, 'dbe', 1.2)
    >>> r.col1
    array([456,   2])
    >>> r.col2
    chararray(['dbe', 'de'],
          dtype='|S3')
    >>> import pickle
    >>> print pickle.loads(pickle.dumps(r))
    [(456, 'dbe', 1.2) (2, 'de', 1.3)]