[Numpy-discussion] Why do weights in np.polyfit have to be 1D?

Andreas Hilboll lists at hilboll.de
Fri Jan 10 11:03:33 EST 2014


Hi,

in using np.polyfit (in version 1.7.1), I ran accross

   TypeError: expected a 1-d array for weights

when trying to fit k polynomials at once (x.shape = (4, ), y.shape = (4,
136), w.shape = (4, 136)). Is there any specific reason why this is not
supported?

-- Andreas.



More information about the NumPy-Discussion mailing list