numpy.dtype.base#

attribute

dtype.base#

返回子数组的基本元素的 dtype,无论其维度或形状如何.

示例

>>> import numpy as np
>>> x = np.dtype('8f')
>>> x.base
dtype('float32')
>>> x =  np.dtype('i2')
>>> x.base
dtype('int16')