W3cubDocs

/NumPy 1.17

numpy.dtype.descr

attribute

dtype.descr

__array_interface__ description of the data-type.

The format is that required by the ‘descr’ key in the __array_interface__ attribute.

Warning: This attribute exists specifically for __array_interface__, and is not a datatype description compatible with np.dtype.

Examples

>>> x = np.dtype(float)
>>> x.descr
[('', '<f8')]
>>> dt = np.dtype([('name', np.str_, 16), ('grades', np.float64, (2,))])
>>> dt.descr
[('name', '<U16'), ('grades', '<f8', (2,))]

© 2005–2019 NumPy Developers
Licensed under the 3-clause BSD License.
https://docs.scipy.org/doc/numpy-1.17.0/reference/generated/numpy.dtype.descr.html