<jupyter_start><jupyter_text>Array.reshape(-1,1)<jupyter_code>x =np.arange(0,100)
y =np.arange(0,100)
x
lr = LinearRegression()
x.shape
lr.fit(x,y)
x = x.reshape(-1,1)
x.shape
lr.fit(x,y)
plt.scatter(x,y , color = 'r')
plt.plot(x, lr.predict(x), color = 'b')
plt.title('Linear regression done')
plt.xlabel('x')
plt.ylabel('y')
plt.show()<jupyter_output><empty_output>