文章目录 1 列表转numpy,尺寸不均匀问题 1 列表转numpy,尺寸不均匀问题 ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (4,) + inhomogeneous part. 解决方法 data = np.array([[1, 2, 3, 4],[2, 3, 1],[5, 5, 5, 5],[1, 1]],dtype=object)