成功解決ValueError: Expected 2D array, got 1D array instead: Reshape your data either using array.reshaphtml
目錄python
解決問題ide
解決思路code
解決方法htm
ValueError: Expected 2D array, got 1D array instead:
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.it
ValueError: Expected 2D array, got 1D array instead: ar