ValueError: setting an array element with a sequence.

这个问题主要出现在于要将list转换为numpy.array做一些数学计算时候,出现list的某一个维度上元素的个数不一致,就会转换失败。

解决方法;请确保list的shape没问题,他能够有正常的shape表示,也就是是一个矩阵而不是一个序列

猜你喜欢

转载自blog.csdn.net/touch_dream/article/details/80922251