【发布时间】:2020-11-10 01:37:54
【问题描述】:
我有 numpy 数据
x = [[1. 2.2 3.4] [3. 4. 5. ]]
和
y = [[2.6660993 3.6791213 3.7325573]]
只想把这些串联起来,结果应该是这样的。
[[1. 2.2 3.4] [3. 4. 5. ] [2.6660993 3.6791213 3.7325573] ]
但是,np.concatenate(x,y) 显示错误。
only integer scalar arrays can be converted to a scalar index
【问题讨论】:
-
concatenate的第二个参数是axis,它必须是一个整数!