shapes (127,1) and (13,) not aligned: 1 (dim 1) != 13 (dim 0) i am try to find score of linear regression 
it gives me this type error my code is below

from sklearn import datasets
bostan=datasets.load_boston()

x=bostan.data
y=bostan.target

from sklearn import preprocessing

x_scale=preprocessing.scale(x)

yfrom sklearn import model_selection

x_train,x_test,y_train,y_test=model_selection.train_test_split(x_scale,)

from sklearn.linear_model import LinearRegression

clf=LinearRegression()

clf.fit(x_train,y_train)

y_pred=clf.predict(x_test)

y_pred=y_pred.reshape(-1,1)

y_test=y_test.reshape(-1,1)


y=clf.score(y_pred,y_test)   # problem is in this line 
```
The score method of the classifier object does not work the way you are trying it to. You need to directly give x_test as input and that it will calculate y_pred on its own and give you the result with y_test. So, you do not need to reshape and the correct syntax would be:

y = clf.score(x_test, y_test)


If for any reason you need to calculate the score using y_pred then take a look at sklearn.metrics module.