SciPy

This is documentation for an old release of NumPy (version 1.9.2). Read this page in the documentation of the latest stable release (version > 1.17).

numpy.dtype.names

dtype.names

Ordered list of field names, or None if there are no fields.

The names are ordered according to increasing byte offset. This can be used, for example, to walk through all of the named fields in offset order.

Examples

>>>
>>> dt = np.dtype([('name', np.str_, 16), ('grades', np.float64, (2,))])
>>> dt.names
('name', 'grades')

Previous topic

numpy.dtype.name

Next topic

numpy.dtype.shape