Quantcast
Channel: Data Science, Analytics and Big Data discussions - Latest topics
Viewing all articles
Browse latest Browse all 4448

ValueError: matmul: Input operand 1 has a mismatch in its core dimension 0, with gufunc signature (n?,k),(k,m?)->(n?,m?) (size 4 is different from 1)

$
0
0

The above error occurs when i run the following code:

x=df[[‘highwaympg’]]
z=df[[‘horsepower’,‘curbweight’,‘enginesize’,‘highwaympg’]]
lm.fit(z,df[‘price’])
yhat=lm.predict(x)

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles