def forward_diff(p):
    """Forward difference scheme

    Parameters
    ----------
    p : ~numpy.ndarray
        The array to be processed.

    Returns
    -------
    p_x, p_y : tuple[~numpy.ndarray]
        The horizontal and vertical gradient components.

    """
    p_x = p.copy()
    p_x[:, 1:] -= p[:, :-1]
    p_x[:, (0)] = 0
    p_x[:, (-1)] = 0
    p_y = p.copy()
    p_y[1:, :] -= p[:-1, :]
    p_y[(0), :] = 0
    p_y[(-1), :] = 0
    return p_x, p_y
