SciPy

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

numpy.dtype.kind

attribute

dtype.kind

A character code (one of ‘biufcmMOSUV’) identifying the general kind of data.

b boolean
i signed integer
u unsigned integer
f floating-point
c complex floating-point
m timedelta
M datetime
O object
S (byte-)string
U Unicode
V void

Examples

>>>
>>> dt = np.dtype('i4')
>>> dt.kind
'i'
>>> dt = np.dtype('f8')
>>> dt.kind
'f'
>>> dt = np.dtype([('field1', 'f8')])
>>> dt.kind
'V'

Previous topic

numpy.dtype.type

Next topic

numpy.dtype.char