[Numpy-discussion] Numpy and iterative procedures

Charles R Harris charlesr.harris@gmail....
Thu Feb 15 10:10:59 CST 2007


On 2/15/07, Geoffrey Zhu <gzhu@peak6.com> wrote:
>
> Hi,
>
> I am new to numpy. I'd like to know if it is possible to code efficient
> iterative procedures with numpy.
>
> Specifically, I have the following problem.
>
> M is an N*N matrix. Q is a N*1 vector. V is an N*1 vector I am trying to
> find iteratively from the initial value V_0. The procedure is simply to
> calculate
>
> V_{n+1}[i]=3D1/M[I,i]*(q[i]-
> (M[i,1]*v_{n+1}[1]+M[I,2]*v_{n+1}[2]+..+M[i,i-1]*v_{n+1}[i-1]) -
> (M[I,i+1]*v_{n}[i+1]+M[I,i+2]*v_{n}[i+2]+..+M[I,N]*v_{n}[N]))
>
> I do not see that this is something that can esaily be vectorized, is
> it?


I think it would be better if you stated what the actual problem is. Is it a
differential equation, for instance. That way we can determine what the
problem class is and what algorithms are available to solve it.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20070215/7b7db58c/attachment.html 


More information about the Numpy-discussion mailing list