Python数据类型: What does '|S...' Mean?

标签 python numpy

一个菜鸟问题,但在这个 numpy 数组中:

array(['22', '38', '26', '35', '35', '', '54', '2', '27', '14', '4', '58',    '20', '39', '14'], dtype='|S82')

“|S82”是什么意思?

最佳答案

the docs它定义了数据类型的字节顺序、种类和大小。在这种情况下:

byte-order: |   not applicable
kind:       S   (byte-)string
size:       82  (characters long)

关于Python数据类型: What does '|S...' Mean?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34909463/

相关文章:

python - "Lazy"Python中的列表项评估

python - Python 3 中的 configparser 中的 read 和 read_file 有什么区别?

python - 为什么我的 tanh 激活函数表现如此糟糕?

python - 如何在numpy数组中用空白替换np.nan

python - 如何在正确的 python 版本中安装 numpy 和 matplotlib?

python - 如何转置 3D np 数组中的每个元素

python - 变换|字典中的分隔值

python - 使用 f.next() 迭代时倒带多行

python - 当使用 genfromtxt 指定 dtype 时,二维数组变为一维 - 如何防止这种情况?

python - 如何读取 10 位 Raw 图像?其中包含 RGB-IR 数据