from hindemith.types.hmarray import hmarray, zeros, indices
import numpy as np

from hindemith.operations.structured_grid import structured_grid

@structured_grid(border='zero')
def dx(src, output):
    for y, x in output:
        output[y, x] = src[y, x + 1] - src[y, x]


@structured_grid(border='zero')
def dy(src, output):
    for y, x in output:
        output[y, x] = src[y + 1, x] - src[y, x]

