属性
dtype.
alignment
根据编译器,此数据类型所需的对齐方式(字节)。
有关更多信息,请参阅本手册的C-API部分。
实例
>>> x = np.dtype('i4') >>> x.alignment 4
>>> x = np.dtype(float) >>> x.alignment 8