ValueError: operands could not be broadcast together with shapes (0) (26) when using optimize.curve

前端 未结 2 2063
时光取名叫无心
时光取名叫无心 2021-01-21 01:47

I\'m trying to get a best fit line to some data my script generates. This is what I have:

import numpy as np
import scipy as sp
.
.
.
def func(x, a, b, c):
             


        
2条回答
  •  甜味超标
    2021-01-21 02:22

    I had the same problem until I realized I had been using lists instead of Numpy arrays. Converting to arrays fixed it for me.

提交回复
热议问题