Answers for "ValueError: Expected 2D array, got scalar array instead: array=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."

0

ValueError: Expected 2D array, got scalar array instead: array=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.

regression.predict([[60]])
Posted by: Guest on April-22-2022

Code answers related to "ValueError: Expected 2D array, got scalar array instead: array=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."

Browse Popular Code Answers by Language