Global AI and Data Science

 View Only
Expand all | Collapse all

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)

  • 1.  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)

    Posted Mon July 27, 2020 11:20 AM
    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)

    ------------------------------
    A K
    ------------------------------

    #GlobalAIandDataScience
    #GlobalDataScience


  • 2.  RE: 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)

    Posted Wed July 29, 2020 10:03 AM
    Anyone? Please do help if you see this question.

    ------------------------------
    A K
    ------------------------------