[Numpy-discussion] performance issue (again)

josef.pktd@gmai... josef.pktd@gmai...
Tue Apr 21 17:10:43 CDT 2009


On Tue, Apr 21, 2009 at 5:58 PM, Mathew Yeates <myeates@jpl.nasa.gov> wrote:

> Hi
> I posted something about this earlier
>
> Say I have 2 arrays X and Y with shapes (N,3) where N is large
> I am doing the following
>
> for row in range(N):
>    result=polyfit(X[row,:],Y[row,:],1,full=True) # fit 3 points with a line
>
> This takes forever and I was hoping to find a way to speed things up.
> But now I'm starting to wonder if this pointless. If the routine "poly
> fit takes a  long time, when compared with the time for a Python
> function call, then things can't be sped up.
>
>
ols with one regressor and 3 observations takes no time to calculate, I
think you  have (almost) only setup cost.

Josef
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20090421/3a210996/attachment.html 


More information about the Numpy-discussion mailing list