[10, 20, 30],
[15, 25, 35],
[20, 40, 60]
import numpy
if __name__ == '__main__':
a = numpy.array([[10, 20, 30],
[15, 25, 35],
[20, 40, 60]])
xdiff = numpy.zeros_like(a)
xdiff[:, 1:-1] = a[:, 2:]-a[:, :-2]
print(xdiff)