##python中numpy格式数组维度问题
labels = np.empty((0,4))
xml_names = os.listdir(path)
for xml_name in xml_names:
image_path, label = parse_xml(os.path.join(path, xml_name))
print(label)
label = np.array(label)
print(label)
labels = np.append(labels, label, axis=0)
label是这个格式:
[[128 230 188 328 0]
[297 199 366 299 0]]
然后和labels append的时候报错,提示维度不匹配,请问为什么