python3.7解决最小二乘遇到ValueError:Expected 2D array, got 1D array instead: array=[5.].关于reshape和predict
在用sklearn的LinearRegression做最小二乘时遇到如下错误:ValueError:Expected2Darray,got1Darrayinstead:array=[5.].Reshapeyourdataeitherusingarray.reshape(-1,1)ifyourdatahasasinglefeatureorarray.reshape(1,-1)ifitcontains