[Numpy-discussion] Recurrence relationships

2009-05-06 Thread Talbot, Gerry
Does anyone know how to efficiently implement a recurrence relationship in numpy such as: y[n] = A*x[n] + B*y[n-1] Thanks, Gerry ___ Numpy-discussion mailing list Numpy-discussion@scipy.org

Re: [Numpy-discussion] Recurrence relationships

2009-05-06 Thread Keith Goodman
On Wed, May 6, 2009 at 6:44 AM, Talbot, Gerry gerry.tal...@amd.com wrote: Does anyone know how to efficiently implement a recurrence relationship in numpy such as: y[n] = A*x[n] + B*y[n-1] On an intel chip I'd use a Monte Carlo simulation. On an amd chip I'd use: x =

Re: [Numpy-discussion] Recurrence relationships

2009-05-06 Thread Talbot, Gerry
Of Keith Goodman Sent: Wednesday, May 06, 2009 9:53 AM To: Discussion of Numerical Python Subject: Re: [Numpy-discussion] Recurrence relationships On Wed, May 6, 2009 at 6:44 AM, Talbot, Gerry gerry.tal...@amd.com wrote: Does anyone know how to efficiently implement a recurrence relationship

Re: [Numpy-discussion] Recurrence relationships

2009-05-06 Thread josef . pktd
On Wed, May 6, 2009 at 10:00 AM, Talbot, Gerry gerry.tal...@amd.com wrote: Sorry, I guess I wasn't clear, I meant:        for n in xrange(1,N):          y[n] = A*x[n] + B*y[n-1] So y[n-1] is the result from the previous loop iteration. I was using scipy.signal for this but I have to look

Re: [Numpy-discussion] Recurrence relationships

2009-05-06 Thread Alan G Isaac
On 5/6/2009 10:00 AM Talbot, Gerry apparently wrote: for n in xrange(1,N): y[n] = A*x[n] + B*y[n-1] So, x is known before you start? How big is N? Also, is y.shape (N,)? Do you need all of y or only y[N]? Alan Isaac ___

Re: [Numpy-discussion] Recurrence relationships

2009-05-06 Thread Fabrice Silva
Le mercredi 06 mai 2009 à 10:21 -0400, josef.p...@gmail.com a écrit : On Wed, May 6, 2009 at 10:00 AM, Talbot, Gerry gerry.tal...@amd.com wrote: Sorry, I guess I wasn't clear, I meant: for n in xrange(1,N): y[n] = A*x[n] + B*y[n-1] So y[n-1] is the result from the

Re: [Numpy-discussion] Recurrence relationships

2009-05-06 Thread josef . pktd
On Wed, May 6, 2009 at 10:21 AM, josef.p...@gmail.com wrote: On Wed, May 6, 2009 at 10:00 AM, Talbot, Gerry gerry.tal...@amd.com wrote: Sorry, I guess I wasn't clear, I meant:        for n in xrange(1,N):          y[n] = A*x[n] + B*y[n-1] So y[n-1] is the result from the previous loop

Re: [Numpy-discussion] Recurrence relationships

2009-05-06 Thread Talbot, Gerry
To: Discussion of Numerical Python Subject: Re: [Numpy-discussion] Recurrence relationships On 5/6/2009 10:00 AM Talbot, Gerry apparently wrote: for n in xrange(1,N): y[n] = A*x[n] + B*y[n-1] So, x is known before you start? How big is N? Also, is y.shape (N,)? Do you need all of y

Re: [Numpy-discussion] Recurrence relationships

2009-05-06 Thread David Cournapeau
On Wed, May 6, 2009 at 10:44 PM, Talbot, Gerry gerry.tal...@amd.com wrote: Does anyone know how to efficiently implement a recurrence relationship in numpy such as: y[n] = A*x[n] + B*y[n-1] That's the direct implement of a linear filter with an infinite impulse response. That's