class numpy.format_parser(formats, names, titles, aligned=False, byteorder=None)

Class to convert formats, names, titles description to a dtype

After constructing the format_parser object, the dtype attribute is
the converted data-type.

dtype = format_parser(formats, names, titles).dtype


formats : string or list

comma-separated format descriptions — ‘f8, i4, a5’ list of format description strings — [‘f8’, ‘i4’, ‘a5’]

names : string or (list or tuple of strings)

comma-separated field names — ‘col1, col2, col3’ list or tuple of field names

titles : sequence

sequence of title strings or unicode

aligned : bool

align the fields by padding as the C-compiler would

byteorder : :

If specified, all the fields will be changed to the provided byteorder. Otherwise, the default byteorder is used.


object :

A Python object whose dtype attribute is a data-type.

Previous topic


Next topic


This Page

Quick search