The easiest, easiest way is to manually extract two fragments of your array and add them together:
>>> arr = np.arange(5)
>>> x, y = 10, 1
>>> x*arr[:-1] + y*arr[1:]
array([ 1, 12, 23, 34])
This will turn into a pain if you want to generalize it to triples, quadruples ... But you can create your own array of pairs from the original array using as_stridedin a much more general form:
>>> from numpy.lib.stride_tricks import as_strided
>>> arr_pairs = as_strided(arr, shape=(len(arr)-2+1,2), strides=arr.strides*2)
>>> arr_pairs
array([[0, 1],
[1, 2],
[2, 3],
[3, 4]])
Of course, the nice thing about using it as_stridedis that, as in the case of arrays, there is no data copying, just messing with how the memory is viewed, so creating this array is practically cost-effective.
And now, probably the fastest is using np.dot:
>>> xy = [x, y]
>>> np.dot(arr_pairs, xy)
array([ 1, 12, 23, 34])