0
点赞
收藏
分享

微信扫一扫

using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains

雷亚荣 2022-02-15 阅读 157

alueError: Expected 2D array, got 1D array instead:
array=[0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.].
Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.

修改

X_test = X_test.reshape(1, -1)

举报

相关推荐

0 条评论