【最小二乘法练习】ValueError: Expected 2D array, got scalar array instead:array=10.
目录报错代码:报错结果:问题:解决方案:报错代码model.predict(10)报错结果:ValueError:Expected2Darray,gotscalararrayinstead:array=10.Reshapeyourdataeitherusingarray.reshape(-1,1)ifyourdatahasasinglefeatureorarray.reshape(1,-1)ifi