I have an [x,y] dataset and I would like to fit a function to it. This are x and y
parang = np.array([ 61.1725 , 62.140625, 62.93275 , 63.701625, 6
Since stndqu
is the result of a call to sympy.solve
, it is a symbolic object still. The numbers that you see when printing qval
from within your function are probably sympy floats (and thus generic objects to numpy). You should convert stndqu
into a numpy array before using it with scipy.curve_fit
:
stndqun = numpy.array([sympy.N(i) for i in stndqu])