W3cubDocs

/NumPy 1.17

numpy.dtype.num

attribute

dtype.num

A unique number for each of the 21 different built-in types.

These are roughly ordered from least-to-most precision.

Examples

>>> dt = np.dtype(str)
>>> dt.num
19
>>> dt = np.dtype(float)
>>> dt.num
12

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