python中关于Np.hstack()错误的ValueError: all the input arrays must have same number of dimensions

    发生这种错误大概率是因为hstack(a,b)中的a和b存在sparse情况,为了解决此类问题,我们可以将np.hstack(a, b)换成np.column_stack(a, b)。

你可能感兴趣的:(python中关于Np.hstack()错误的ValueError: all the input arrays must have same number of dimensions)