numpy.dtype.subdtype¶
attribute
-
dtype.
subdtype
¶ Tuple
(item_dtype, shape)
if thisdtype
describes a sub-array, and None otherwise.The shape is the fixed shape of the sub-array described by this data type, and item_dtype the data type of the array.
If a field whose dtype object has this attribute is retrieved, then the extra dimensions implied by shape are tacked on to the end of the retrieved array.
See also
Examples
>>> x = numpy.dtype('8f') >>> x.subdtype (dtype('float32'), (8,))
>>> x = numpy.dtype('i2') >>> x.subdtype >>>