You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got the following errors when running the code:
File “main.py”, line 165, in
main()
File “main.py”, line 152, in main
board_img = grab_board()
File “main.py”, line 97, in grab_board
game_board[y][x] = recognizer.predict(cell)
File “D:\python27\CCrush-Bot-master\sklearn_decoder.py”, line 80, in predict
return int(self.svc.predict(np_img))
File “D:\python27\lib\site-packages\sklearn\svm\base.py”, line 548, in predict
y = super(BaseSVC, self).predict(X)
File “D:\python27\lib\site-packages\sklearn\svm\base.py”, line 308, in predict
X = self._validate_for_predict(X)
File “D:\python27\lib\site-packages\sklearn\svm\base.py”, line 439, in _valida
te_for_predict
X = check_array(X, accept_sparse=’csr’, dtype=np.float64, order=”C”)
File “D:\python27\lib\site-packages\sklearn\utils\validation.py”, line 441, in
check_array
“if it contains a single sample.”.format(array))
ValueError: Expected 2D array, got 1D array instead:
array=[ 52. 76. 96. … 105. 114. 126.].
Reshape your data either using array.reshape(-1, 1) if your data has a single fe
ature or array.reshape(1, -1) if it contains a single sample.
The text was updated successfully, but these errors were encountered:
I've got the following errors when running the code:
The text was updated successfully, but these errors were encountered: