属性
dtype.
subdtype
元组 (item_dtype, shape) 如果这样 dtype 描述子数组,否则不描述。
(item_dtype, shape)
dtype
这个 形状 是此数据类型描述的子数组的固定形状,并且 item_dtype 数组的数据类型。
如果检索其dtype对象具有此属性的字段,则 形状 附加到检索到的数组的末尾。
参见
dtype.base
实例
>>> x = numpy.dtype('8f') >>> x.subdtype (dtype('float32'), (8,))
>>> x = numpy.dtype('i2') >>> x.subdtype >>>