我有一个numpy.array,我想知道在底层表示中使用了什么endianness。
byteorder属性是文档化的这里,但是没有一个给定的示例显示它与数组一起使用。
发布于 2015-12-04 21:50:50
byteorder是一个数据类型对象dtype属性,因此您需要这样做:
In [10]: import numpy as np
In [11]: arr = np.array([1,2,3])
In [12]: arr.dtype.byteorder
Out[12]: '='https://stackoverflow.com/questions/34097845
复制相似问题