On Thu, Mar 20, 2008 at 5:44 AM, Peter Creasey
<[EMAIL PROTECTED]> wrote:
> > > I'm trying to do a PDE style calculation with numpy arrays
> > >
> > > y = a * x[:-2] + b * x[1:-1] + c * x[2:]
> > >
> > > with a,b,c constants. I realise I could use correlate for this, i.e
> > >
> > >
> > I'm trying to do a PDE style calculation with numpy arrays
> >
> > y = a * x[:-2] + b * x[1:-1] + c * x[2:]
> >
> > with a,b,c constants. I realise I could use correlate for this, i.e
> >
> > y = numpy.correlate(x, array((a, b, c)))
>
> The relative performance seems to vary dependi
On Wed, Mar 19, 2008 at 12:57 PM, Peter Creasey
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm trying to do a PDE style calculation with numpy arrays
>
> y = a * x[:-2] + b * x[1:-1] + c * x[2:]
>
> with a,b,c constants. I realise I could use correlate for this, i.e
>
> y = numpy.correlate(x, array((
Hi,
I'm trying to do a PDE style calculation with numpy arrays
y = a * x[:-2] + b * x[1:-1] + c * x[2:]
with a,b,c constants. I realise I could use correlate for this, i.e
y = numpy.correlate(x, array((a, b, c)))
however the performance doesn't seem as good (I suspect correlate is
optimised fo