Confused by output from Polyval
up vote
1
down vote
favorite
I have some data from which I have fitted a 2nd order polynomial using numpy.polynomial.polynomial.polyfit data_fit = poly.polyfit(length_spline_a, temp_spline_b, 2) I am examining changes in length, and have a list of 10% changes in length len_steps = 0.0, -0.012573565669572757, -0.025147131339145513, -0.03772069700871827... print (len(len_steps) >>>>11 My assumption was that polyval would solve for y for each of the x values in the len_steps list y_data = poly.polyval(data_fit, len_steps) However this provides a list with only 3 data points rather than the 11 I expected. print(y_data) >>>>[-5.34112443e+21 -2.50395581e+28 -6.75169134e+28] Have I mis understood the purpose of polyval or have I done something wrong?
...