Solution: Expected 2D array, got scalar array instead

I was trying to fit a basic machine learning model of linear regression. My code was simple. I got the following error. ValueError Traceback (most recent call last) /tmp/ipykernel_10591/ in <module> —-> 1 reg.predict(3300) ~/.local/lib/python3.8/site-packages/sklearn/linear_model/ in predict(self, X) 360 Returns predicted values. 361 “”” –> 362 return self._decision_function(X) 363 364 _preprocess_data = staticmethod(_preprocess_data) ~/.local/lib/python3.8/site-packages/sklearn/linear_model/ in … Read more