[SciPy-User] polyval, polyfit on 2D array
markus.proeller at ifm.com
markus.proeller at ifm.com
Thu Sep 3 03:40:49 EDT 2009
Hello everyone,
I have a two dimensional array with a shape of (600,800) and want to apply
polyval and polyfit on each of the 600 lines.
Is there an elegant way to avoid a for loop over axis 0?
So for one line my code would be this:
>>> x=arange(800)
>>> p = polyfit(x, y[0,:])
>>> y_new = polyval(p, x)
Thanks for help,
Markus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20090903/af8653ba/attachment.html>
More information about the SciPy-User
mailing list