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 for both arguments being long arrays). Is the first thing I wrote probably the best? Or is there a better numpy function for this case? Regards, Peter _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion